Problem in running streamutil.c and playfile from samples.

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

 



I tried to debug more and what I got is:
An assertion in function pjmedia_codec_param_clone in file codec.c is
failing
the assertion is PJ_ASSERT_RETURN(src, NULL);
where src is defined as:
const pjmedia_codec_param *src and is passed in the function arguments.
So i think it means that the passed value of src is NULL but I am not
getting that from where this value is being passed to this function. In
streamutil.c, the problem occurs when the pjmedia_create_stream function is
called in create_stream function.
And if i remove this assertion, I got segmentation fault. Why is it running
without passing a valid pjmedia_codec_param even though it is defined to be
optional in documentation :
http://www.pjsip.org/pjmedia/docs/html/structpjmedia__stream__info.htm#a3f9fbe46d06caa083a77baec4aeb21de

please somebody help.


On Thu, Apr 11, 2013 at 11:55 PM, Udit Agarwal <uditiiita at gmail.com> wrote:

> Now it say invalid audio device.. :(
>
> Unable to open sound device: Invalid audio device (PJMEDIA_EAUD_INVDEV)
> [code=420004]
>
>
> On Thu, Apr 11, 2013 at 11:19 PM, Ted Gerold <tedgerold at icloud.com> wrote:
>
>> for playfile find this block of code:
>>
>> /* Create sound player port. */
>>     status = pjmedia_snd_port_create_player(
>> 		 pool,				    /* pool		    */
>> 		 -1,				    /* use default dev.	    */
>> 		 PJMEDIA_PIA_SRATE(&file_port->info),/* clock rate.	    */
>> 		 PJMEDIA_PIA_CCNT(&file_port->info),/* # of channels.	    */
>> 		 PJMEDIA_PIA_SPF(&file_port->info), /* samples per frame.   */
>> 		 PJMEDIA_PIA_BITS(&file_port->info),/* bits per sample.	    */
>> 		 0,				    /* options		    */
>> 		 &snd_port			    /* returned port	    */
>> 		 );
>>
>>
>>
>> change -1 to 0 and try it
>>
>> On Apr 11, 2013, at 6:40 AM, Udit Agarwal <uditiiita at gmail.com> wrote:
>>
>> Hello,
>> I am trying to run streamutil.c and playfile from samples but i am
>> getting the errors on running them.
>> On running streamutil, I got this error:
>>
>> 19:07:43.822 os_core_unix.c !pjlib 2.1 for POSIX initialized
>> PJLIB INIT COMPLETE
>> 19:07:43.825       pa_dev.c  PortAudio sound library initialized, status=0
>> 19:07:43.825       pa_dev.c  PortAudio host api count=1
>> 19:07:43.825       pa_dev.c  Sound device count=0
>> 19:07:43.825          pjlib  select() I/O Queue created (0x7c87b8)
>> a.out: ../src/pjmedia/codec.c:53: pjmedia_codec_param_clone: Assertion
>> `pool && src' failed.
>>
>> And on running playfile, I got the following error:
>> 19:08:35.703 os_core_unix.c !pjlib 2.1 for POSIX initialized
>> 19:08:35.705       pa_dev.c  PortAudio sound library initialized, status=0
>> 19:08:35.705       pa_dev.c  PortAudio host api count=1
>> 19:08:35.705       pa_dev.c  Sound device count=0
>> 19:08:35.706          pjlib  select() I/O Queue created (0x13db7b8)
>> 19:08:35.706   wav_player.c  File player '/home/udit/pjsip/alarma.wav'
>> created: samp.rate=22050, ch=1, bufsize=4KB, filesize=265KB
>> 19:08:35.706     playfile.c  Unable to open sound device: Unable to find
>> default audio device (PJMEDIA_EAUD_NODEFDEV) [code=420006]
>>
>> I have searched a lot in the lists and tried many solutions but none them
>> worked. I thought there is some problem with my audio device but audio
>> device is fine(checked with some commands like aplay-l, etc).
>> Please someone tell me what should I do to make it run.
>> Thanking you
>>
>> --
>> Udit Agarwal
>> B.Tech. ( Information Technology ) , 8th Semester,
>> Indian Institute of Information Technology
>> Allahabad - 211012, India
>> Email : uditiiita at gmail.com
>> Mobile: +91-9411656264
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip at lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>>
>>
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip at lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>>
>
>
> --
> Udit Agarwal
> B.Tech. ( Information Technology ) , 8th Semester,
> Indian Institute of Information Technology
> Allahabad - 211012, India
> Email : uditiiita at gmail.com
> Mobile: +91-9411656264
>



-- 
Udit Agarwal
B.Tech. ( Information Technology ) , 8th Semester,
Indian Institute of Information Technology
Allahabad - 211012, India
Email : uditiiita at gmail.com
Mobile: +91-9411656264
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20130412/44364187/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