BUG - Pjsip 2.1 on Ubuntu 13.10, 12.04, 12.10 - Python 2.7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please add a method from Python to execute this:
*pjmedia_aud_subsys_init(&cp.factory);*

*which is a BUG causing no audio playback/capture. *

"""1) When C used: *pjmedia_aud_subsys_init(&cp.factory);*  Audio
playback/capture works: see the code:
http://svn.pjsip.org/repos/pjproject/trunk/pjsip-apps/src/samples/auddemo.c

check the log where it saying: ALSA intialized

# ./auddemo 09:12:22.763 os_core_unix.c !pjlib 2.1 for POSIX
initializedAdded sound device pulseAdded sound device defaultAdded
sound device sysdefault:CARD=PCHAdded sound device
front:CARD=PCH,DEV=0Added sound device surround40:CARD=PCH,DEV=0Added
sound device surround41:CARD=PCH,DEV=0Added sound device
surround50:CARD=PCH,DEV=0Added sound device
surround51:CARD=PCH,DEV=0Added sound device
surround71:CARD=PCH,DEV=0Added sound device hdmi:CARD=PCH,DEV=0Added
sound device hdmi:CARD=NVidia,DEV=0Added sound device
sysdefault:CARD=U0x11110x2222Added sound device
front:CARD=U0x11110x2222,DEV=0Added sound device
surround40:CARD=U0x11110x2222,DEV=0Added sound device
surround41:CARD=U0x11110x2222,DEV=0Added sound device
surround50:CARD=U0x11110x2222,DEV=0*ALSA driver found 16 devices
ALSA initialized*PortAudio sound library initialized,
status=0PortAudio host api count=1Sound device count=0Found 16
devices:  0: ALSA [pulse] (1/1)  1: ALSA [default] (1/1)  2: ALSA
[sysdefault:CARD=PCH] (1/1)  3: ALSA [front:CARD=PCH,DEV=0] (1/1)  4:
ALSA [surround40:CARD=PCH,DEV=0] (1/1)  5: ALSA
[surround41:CARD=PCH,DEV=0] (1/1)  6: ALSA [surround50:CARD=PCH,DEV=0]
(1/1)  7: ALSA [surround51:CARD=PCH,DEV=0] (1/1)  8: ALSA
[surround71:CARD=PCH,DEV=0] (1/1)  9: ALSA [hdmi:CARD=PCH,DEV=0] (0/1)
10: ALSA [hdmi:CARD=NVidia,DEV=0] (0/1) 11: ALSA
[sysdefault:CARD=U0x11110x2222] (1/1) 12: ALSA
[front:CARD=U0x11110x2222,DEV=0] (1/1) 13: ALSA
[surround40:CARD=U0x11110x2222,DEV=0] (1/1) 14: ALSA
[surround41:CARD=U0x11110x2222,DEV=0] (1/1) 15: ALSA
[surround50:CARD=U0x11110x2222,DEV=0] (1/1)
Audio demo menu:

2) when python is used there is no way to call the
pjmedia_aud_subsys_init(&cp.factory);  as a result i am getting: no
audio

see the log: check the log where it saying: ALSA intialized is not there

# python /tmp/pj.py 09:13:11.924 os_core_unix.c !pjlib 2.1 for POSIX
initialized09:13:11.925 sip_endpoint.c  .Creating endpoint
instance...09:13:11.925          pjlib  .select() I/O Queue created
(0xfc9da0)09:13:11.925 sip_endpoint.c  .Module "mod-msg-print"
registered09:13:11.925 sip_transport.  .Transport manager
created.09:13:11.925   pjsua_core.c  .PJSUA state changed: NULL -->
CREATED09:13:11.925 sip_endpoint.c  .Module "mod-pjsua-log"
registered09:13:11.925 sip_endpoint.c  .Module "mod-tsx-layer"
registered09:13:11.925 sip_endpoint.c  .Module "mod-stateful-util"
registered09:13:11.925 sip_endpoint.c  .Module "mod-ua"
registered09:13:11.925 sip_endpoint.c  .Module "mod-100rel"
registered09:13:11.925 sip_endpoint.c  .Module "mod-pjsua"
registered09:13:11.925 sip_endpoint.c  .Module "mod-invite"
registered*09:13:11.926       pa_dev.c  ..PortAudio sound library
initialized, status=0
09:13:11.926       pa_dev.c  ..PortAudio host api count=1
09:13:11.926       pa_dev.c  ..Sound device count=0
09:13:11.926          pjlib  ..select() I/O Queue created
(0xfd4df8)*09:13:11.931 sip_endpoint.c  .Module "mod-evsub"
registered09:13:11.931 sip_endpoint.c  .Module "mod-presence"
registered09:13:11.931 sip_endpoint.c  .Module "mod-mwi"
registered09:13:11.931 sip_endpoint.c  .Module "mod-refer"
registered09:13:11.931 sip_endpoint.c  .Module "mod-pjsua-pres"
registered09:13:11.932 sip_endpoint.c  .Module "mod-pjsua-im"
registered09:13:11.932 sip_endpoint.c  .Module "mod-pjsua-options"
registered09:13:11.932   pjsua_core.c  .No SIP worker threads
created09:13:11.932   pjsua_core.c  .pjsua version 2.1 for
Linux-3.5.0.17/x86_64/glibc-2.15 initialized09:13:11.932
pjsua_core.c  .PJSUA state changed: CREATED --> INIT09:13:11.932
pjsua_aud.c  Set sound device: capture=11, playback=1109:13:11.932
pjsua_aud.c  .Error retrieving default audio device parameters:
Invalid audio device (PJMEDIA_EAUD_INVDEV) [status=420004]Traceback
(most recent call last):  File "/tmp/pj.py", line 13, in <module>
lib.set_snd_dev(11,11)  File
"/usr/local/lib/python2.7/dist-packages/pjsua.py", line 2301, in
set_snd_dev    self._err_check("set_current_sound_devices()", self,
err)  File "/usr/local/lib/python2.7/dist-packages/pjsua.py", line
2625, in _err_check    raise Error(op_name, obj, err_code,
err_msg)pjsua.Error: Object: Lib,
operation=set_current_sound_devices(), error=Invalid audio device
(PJMEDIA_EAUD_INVDEV)Exception AttributeError: "'NoneType' object has
no attribute 'destroy'" in <bound method Lib.__del__ of <pjsua.Lib
instance at 0x7f3f34ae1098>> ignored


"""import pjsua as pj
def log_cb(level, str, len):
    print str,
lib = pj.Lib()uaConfig = pj.UAConfig()logConfig =
pj.LogConfig()logConfig.callback = log_cbmediaConfig =
pj.MediaConfig()

"""

It never works because the Python is not allowing

*ALSA driver found 16 devices
ALSA initialized*


*which is missing *

"""# lib.set_snd_dev(1,1)lib.init(ua_cfg = uaConfig, log_cfg =
logConfig, media_cfg = mediaConfig)lib.set_snd_dev(11,11)print
lib.get_snd_dev()#lib.set_null_snd_dev()lib.start()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20131205/45c67090/attachment-0001.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux