My guide for compiling PJSIP on the Raspberry Pi 3 with audio and video support

AR
Adam Rossi
Fri, Apr 6, 2018 9:57 PM

Howdy. Here is my writeup for compiling the PJSIP stable release on the
Raspberry Pi 3 / Raspian Stretch with the Raspberry Pi Camera module,
allowing audio and video sip calls:

https://github.com/acrossi/raspberry-pi-stuff/wiki/Compiling-PJSIP-with-Video-and-Audio-on-the-Raspberry-Pi-3---RPI-Camera-Module

I only have one issue at the moment. When hanging up from a video call, I
get a segmentation fault on the pjsua application when the SDL video stream
is closed:

16:29:24.742  pjsua_media.c  ......Call 2: deinitializing media..
16:29:24.757  pjsua_media.c  ........Media stream call02:0 is destroyed
16:29:24.757    pjsua_vid.c  ........Stopping video stream..
16:29:24.776    v4l2_dev.c  .........Stopping v4l2 video stream mmal
service 16.1
16:29:25.835    pjsua_vid.c  .........Window 1: destroying..
16:29:25.835    v4l2_dev.c  ..........Stopping v4l2 video stream mmal
service 16.1
16:29:25.835    vid_port.c  ..........Closing mmal service 16.1..
16:29:25.835    v4l2_dev.c  ..........Stopping v4l2 video stream mmal
service 16.1
16:29:25.835    v4l2_dev.c  ..........Destroying v4l2 video stream mmal
service 16.1
16:29:25.837      sdl_dev.c  ..........Stopping sdl video stream
16:29:25.837    vid_port.c  ..........Closing SDL renderer..
16:29:25.837      sdl_dev.c  ..........Stopping sdl video stream
16:29:25.854      sdl_dev.c  .........Stopping sdl video stream
16:29:25.854    pjsua_vid.c  .........Window 0: destroying..
16:29:25.854      sdl_dev.c  ..........Stopping sdl video stream
16:29:25.854    vid_port.c  ..........Closing SDL renderer..
16:29:25.854      sdl_dev.c  ..........Stopping sdl video stream
Segmentation fault

If anyone has a solution or I find one independently, I will update the
guide.

Regards, olivebreath

Howdy. Here is my writeup for compiling the PJSIP stable release on the Raspberry Pi 3 / Raspian Stretch with the Raspberry Pi Camera module, allowing audio and video sip calls: https://github.com/acrossi/raspberry-pi-stuff/wiki/Compiling-PJSIP-with-Video-and-Audio-on-the-Raspberry-Pi-3---RPI-Camera-Module I only have one issue at the moment. When hanging up from a video call, I get a segmentation fault on the pjsua application when the SDL video stream is closed: 16:29:24.742 pjsua_media.c ......Call 2: deinitializing media.. 16:29:24.757 pjsua_media.c ........Media stream call02:0 is destroyed 16:29:24.757 pjsua_vid.c ........Stopping video stream.. 16:29:24.776 v4l2_dev.c .........Stopping v4l2 video stream mmal service 16.1 16:29:25.835 pjsua_vid.c .........Window 1: destroying.. 16:29:25.835 v4l2_dev.c ..........Stopping v4l2 video stream mmal service 16.1 16:29:25.835 vid_port.c ..........Closing mmal service 16.1.. 16:29:25.835 v4l2_dev.c ..........Stopping v4l2 video stream mmal service 16.1 16:29:25.835 v4l2_dev.c ..........Destroying v4l2 video stream mmal service 16.1 16:29:25.837 sdl_dev.c ..........Stopping sdl video stream 16:29:25.837 vid_port.c ..........Closing SDL renderer.. 16:29:25.837 sdl_dev.c ..........Stopping sdl video stream 16:29:25.854 sdl_dev.c .........Stopping sdl video stream 16:29:25.854 pjsua_vid.c .........Window 0: destroying.. 16:29:25.854 sdl_dev.c ..........Stopping sdl video stream 16:29:25.854 vid_port.c ..........Closing SDL renderer.. 16:29:25.854 sdl_dev.c ..........Stopping sdl video stream Segmentation fault If anyone has a solution or I find one independently, I will update the guide. Regards, olivebreath
CH
Christian Hoff
Sat, Apr 7, 2018 3:13 PM

Hello Adam,

thank you very much for the guide! In fact I had already compiled PJSIP on the RPI 3 before and also faced the SSE2 problem that you mentioned in your writeup. I fixed the issue in a way similar to yours. However this is a bug that should ideally be fixed in PJSIP itself. It also made it a bit hard for me to get started with PJSIP...

I also have an issue with a segmentation fault at the end of the call and am currently investigating where it comes from. Fortunately I am a professional C++ software developer and I hope that my C++ debugging skills help me to find the root cause of the issue. From what you are telling me, your problem looks like a similar issue. You might want to run the PJSUA application from inside GDB, then you will also see a backtrace of the segmentation fault, which will be helpful to debug the issue.

I will keep you up to date with my progress on the segmentation fault. I think that this is a coding bug in PJSIP.

Kind regards,

Christian

Gesendet: Freitag, 06. April 2018 um 23:57 Uhr
Von: "Adam Rossi" <ac.rossi@gmail.com>
An: pjsip@lists.pjsip.org
Betreff: [pjsip] My guide for compiling PJSIP on the Raspberry Pi 3 with audio and video support

Howdy. Here is my writeup for compiling the PJSIP stable release on the Raspberry Pi 3 / Raspian Stretch with the Raspberry Pi Camera module, allowing audio and video sip calls:

https://github.com/acrossi/raspberry-pi-stuff/wiki/Compiling-PJSIP-with-Video-and-Audio-on-the-Raspberry-Pi-3---RPI-Camera-Module

I only have one issue at the moment. When hanging up from a video call, I get a segmentation fault on the pjsua application when the SDL video stream is closed:

16:29:24.742 pjsua_media.c ......Call 2: deinitializing media..
16:29:24.757 pjsua_media.c ........Media stream call02:0 is destroyed
16:29:24.757 pjsua_vid.c ........Stopping video stream..
16:29:24.776 v4l2_dev.c .........Stopping v4l2 video stream mmal service 16.1
16:29:25.835 pjsua_vid.c .........Window 1: destroying..
16:29:25.835 v4l2_dev.c ..........Stopping v4l2 video stream mmal service 16.1
16:29:25.835 vid_port.c ..........Closing mmal service 16.1..
16:29:25.835 v4l2_dev.c ..........Stopping v4l2 video stream mmal service 16.1
16:29:25.835 v4l2_dev.c ..........Destroying v4l2 video stream mmal service 16.1
16:29:25.837 sdl_dev.c ..........Stopping sdl video stream
16:29:25.837 vid_port.c ..........Closing SDL renderer..
16:29:25.837 sdl_dev.c ..........Stopping sdl video stream
16:29:25.854 sdl_dev.c .........Stopping sdl video stream
16:29:25.854 pjsua_vid.c .........Window 0: destroying..
16:29:25.854 sdl_dev.c ..........Stopping sdl video stream
16:29:25.854 vid_port.c ..........Closing SDL renderer..
16:29:25.854 sdl_dev.c ..........Stopping sdl video stream
Segmentation fault

If anyone has a solution or I find one independently, I will update the guide.

Regards, olivebreath

_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org