Udit Agarwal <uditiiita <at> gmail.com> writes: > > > I want to add something that i have found why this error was coming.It was coming because it was not initializing param of pjmedia_codec_param and because of which src was NULL which was make the assertion false. But I am not getting why is it required to be there as it is optional. > I have initialized the param using malloc in create_stream: > info.param = (pjmedia_codec_param *) malloc( sizeof(pjmedia_codec_param) ); > > > Now i am getting FLOATING POINT EXCEPTION without any other info. It is not even showing, where that error is coming. > > > On Fri, Apr 12, 2013 at 2:00 PM, Udit Agarwal <uditiiita <at> gmail.com> wrote: > 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#a3f 9fbe46d06caa083a77baec4aeb21de > > > > 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 AgarwalB.Tech. ( Information Technology ) , 8th Semester,Indian Institute of Information Technology > > > > Allahabad - 211012, IndiaEmail : uditiiita <at> gmail.comMobile: +91- 9411656264 > > > _______________________________________________Visit our blog: http://blog.pjsip.orgpjsip mailing listpjsip <at> lists.pjsip.orghttp://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > > > > _______________________________________________ > > > > Visit our blog: http://blog.pjsip.org > pjsip mailing listpjsip <at> lists.pjsip.orghttp://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > -- Udit AgarwalB.Tech. ( Information Technology ) , 8th Semester,Indian Institute of Information TechnologyAllahabad - 211012, IndiaEmail : uditiiita <at> gmail.com > > > Mobile: +91-9411656264 > > > > > -- Udit AgarwalB.Tech. ( Information Technology ) , 8th Semester,Indian Institute of Information TechnologyAllahabad - 211012, IndiaEmail : uditiiita <at> gmail.com > > Mobile: +91-9411656264 > > > > > -- Udit AgarwalB.Tech. ( Information Technology ) , 8th Semester,Indian Institute of Information TechnologyAllahabad - 211012, IndiaEmail : uditiiita <at> gmail.com > Mobile: +91-9411656264 > > > > <div> > <div dir="ltr">I want to add something that i have found why this error was coming.<div>It was coming because it was not initializing param of pjmedia_codec_param and because of which src was NULL which was make the assertion false. But I am not getting why is it required to be there as it is optional.</div> > <div>I have initialized the param using malloc in create_stream:</div> > <div>info.param = (pjmedia_codec_param *) malloc( sizeof(pjmedia_codec_param) );<br> > </div> > <div><br></div> > <div>Now i am getting FLOATING POINT EXCEPTION without any other info. It is not even showing, where that error is coming.</div> > </div> > <div class="gmail_extra"> > <br><br><div class="gmail_quote">On Fri, Apr 12, 2013 at 2:00 PM, Udit Agarwal <span dir="ltr"><<a href="mailto:uditiiita <at> gmail.com" target="_blank">uditiiita <at> gmail.com</a>></span> wrote:<br> <blockquote class="gmail_quote"> > <div dir="ltr">I tried to debug more and what I got is:<div>An assertion in function pjmedia_codec_param_clone in file codec.c is failing</div> > <div>the assertion is PJ_ASSERT_RETURN(src, NULL);</div> > <div> > where src is defined as:</div> > <div>const pjmedia_codec_param *src and is passed in the function arguments.</div> > <div>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.</div> > > <div>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 :?<a href="http://www.pjsip.org/pjmedia/docs/html/structpjmedia__stream__info.htm #a3f9fbe46d06caa083a77baec4aeb21de" target="_blank">http://www.pjsip.org/pjmedia/docs/html/structpjmedia__stream __info.htm#a3f9fbe46d06caa083a77baec4aeb21de</a> > </div> > > <div><br></div> > <div>please somebody help.</div> > </div> > <div class="HOEnZb"><div class="h5"> > <div class="gmail_extra"> > <br><br><div class="gmail_quote">On Thu, Apr 11, 2013 at 11:55 PM, Udit Agarwal <span dir="ltr"><<a href="mailto:uditiiita <at> gmail.com" target="_blank">uditiiita <at> gmail.com</a>></span> wrote:<br> <blockquote class="gmail_quote"> > <div dir="ltr">Now it say invalid audio device.. :(<div><br></div> > <div>Unable to open sound device: Invalid audio device (PJMEDIA_EAUD_INVDEV) [code=420004]<br> > </div> > </div> > <div><div> > <div class="gmail_extra"> > <br><br><div class="gmail_quote"> > On Thu, Apr 11, 2013 at 11:19 PM, Ted Gerold <span dir="ltr"><<a href="mailto:tedgerold <at> icloud.com" target="_blank">tedgerold <at> icloud.com</a>></span> wrote:<br><blockquote class="gmail_quote"> > > <div>for playfile find this block of code:<div><br></div> > <div>/* 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 */ > );<div><br></div> > <div><br></div> > <div>change -1 to 0 and try it</div> > <div><br></div> > <div> > <div><div> > <div>On Apr 11, 2013, at 6:40 AM, Udit Agarwal <<a href="mailto:uditiiita <at> gmail.com" target="_blank">uditiiita <at> gmail.com</a>> wrote:</div> > > <br> > </div></div> > <blockquote type="cite"> > <div><div><div dir="ltr">Hello,<div>I am trying to run streamutil.c and playfile from samples but i am getting the errors on running them.? </div> > <div>On running streamutil, I got this error:</div> > > <div> > <br clear="all"><div> > <div>19:07:43.822 os_core_unix.c !pjlib 2.1 for POSIX initialized</div> > <div>PJLIB INIT COMPLETE</div> > <div>19:07:43.825 ? ? ? pa_dev.c ?PortAudio sound library initialized, status=0</div> > <div>19:07:43.825 ? ? ? pa_dev.c ?PortAudio host api count=1</div> > <div>19:07:43.825 ? ? ? pa_dev.c ?Sound device count=0</div> > > <div>19:07:43.825 ? ? ? ? ?pjlib ?select() I/O Queue created (0x7c87b8)</div> > <div>a.out: ../src/pjmedia/codec.c:53: pjmedia_codec_param_clone: Assertion `pool && src' failed.</div> > </div> > <div><br></div> > <div> > And on running playfile, I got the following error:</div> > <div> > <div>19:08:35.703 os_core_unix.c !pjlib 2.1 for POSIX initialized</div> > <div>19:08:35.705 ? ? ? pa_dev.c ?PortAudio sound library initialized, status=0</div> > <div>19:08:35.705 ? ? ? pa_dev.c ?PortAudio host api count=1</div> > <div>19:08:35.705 ? ? ? pa_dev.c ?Sound device count=0</div> > <div>19:08:35.706 ? ? ? ? ?pjlib ?select() I/O Queue created (0x13db7b8)</div> > <div>19:08:35.706 ? wav_player.c ?File player '/home/udit/pjsip/alarma.wav' created: samp.rate=22050, ch=1, bufsize=4KB, filesize=265KB</div> > > <div>19:08:35.706 ? ? playfile.c ?Unable to open sound device: Unable to find default audio device (PJMEDIA_EAUD_NODEFDEV) [code=420006]</div> > <div><br></div> > <div>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).?</div> > > <div>Please someone tell me what should I do to make it run.?</div> > <div>Thanking you</div> > <div><br></div> > </div>-- <br>Udit Agarwal<br>B.Tech. ( Information Technology ) , 8th Semester,<br>Indian Institute of Information Technology<br> > > Allahabad - 211012, India<br>Email : <a href="mailto:uditiiita <at> gmail.com" target="_blank">uditiiita <at> gmail.com</a><br>Mobile: <a href="tel:%2B91-9411656264" value="+919411656264" target="_blank">+91- 9411656264</a> > </div> > </div></div></div> > _______________________________________________<br>Visit our blog: <a href="http://blog.pjsip.org" target="_blank">http://blog.pjsip.org</a><br> <br>pjsip mailing list<br><a href="mailto:pjsip <at> lists.pjsip.org" target="_blank">pjsip <at> lists.pjsip.org</a><br><a href="http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org" target="_blank">http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.or g</a><br> > </blockquote> > </div> > <br> > </div> > </div> > <br>_______________________________________________<br> > > Visit our blog: <a href="http://blog.pjsip.org" target="_blank">http://blog.pjsip.org</a><br><br> > pjsip mailing list<br><a href="mailto:pjsip <at> lists.pjsip.org" target="_blank">pjsip <at> lists.pjsip.org</a><br><a href="http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org" target="_blank">http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.or g</a><br><br> > </blockquote> > </div> > <br><br clear="all"><div><br></div>-- <br>Udit Agarwal<br>B.Tech. ( Information Technology ) , 8th Semester,<br>Indian Institute of Information Technology<br>Allahabad - 211012, India<br>Email : <a href="mailto:uditiiita <at> gmail.com" target="_blank">uditiiita <at> gmail.com</a><br> > > Mobile: <a href="tel:%2B91-9411656264" value="+919411656264" target="_blank">+91-9411656264</a> > </div> > </div></div> > </blockquote> > </div> > <br><br clear="all"><div><br></div>-- <br>Udit Agarwal<br>B.Tech. ( Information Technology ) , 8th Semester,<br>Indian Institute of Information Technology<br>Allahabad - 211012, India<br>Email : <a href="mailto:uditiiita <at> gmail.com" target="_blank">uditiiita <at> gmail.com</a><br> > > Mobile: <a href="tel:%2B91-9411656264" value="+919411656264" target="_blank">+91-9411656264</a> > </div> > </div></div> > </blockquote> > </div> > <br><br clear="all"><div><br></div>-- <br>Udit Agarwal<br>B.Tech. ( Information Technology ) , 8th Semester,<br>Indian Institute of Information Technology<br>Allahabad - 211012, India<br>Email : <a href="mailto:uditiiita <at> gmail.com" target="_blank">uditiiita <at> gmail.com</a><br> > Mobile: +91-9411656264 > </div> > </div> > I am also facing the same issue. Whenever I try to execute streamutil app from samples, it breaks with pool and src assertion. Did you find anything to debug this issue?