gstreamer got SIGSEGV when run on android

Xu Peter xzpeter at gmail.com
Tue Jun 14 02:05:49 PDT 2011


Hi, all,

With the help of gstreamer wiki, I have successfully ported gstreamer to
android gingerbread. (by fixing some gst-plugin-base version checks both in
gst-editing-services and gst-plugins-good, and change SO_MAX to 512 in
bionic/linker/linker.c) However, I failed to run a gst-launch script and got
SIGSEGV.

Firstly, I tried gst-inspect to see if gstreamer works. It seems ok (but
with some warnings):

=====================START=======================
xzpeter at xzpeter-HP-Compaq-8100-Elite-SFF-PC:~$ adb shell gst-inspect

(gst-inspect-0.10:437): GStreamer-WARNING **: External plugin loader failed.
This most likely means that the plugin loader helper binary was not found or
could not be run.

** (gst-inspect-0.10:437): WARNING **: could not find config file
'/system/gst-openmax.conf'.. using defaults!
cdxaparse:  cdxaparse: (S)VCD parser
cdxaparse:  vcdparse: (S)VCD stream parser
replaygain:  rganalysis: ReplayGain analysis
replaygain:  rglimiter: ReplayGain limiter
replaygain:  rgvolume: ReplayGain volume
...... (skip many modules here)
adder:  adder: Adder
staticelements:  bin: Generic bin
staticelements:  pipeline: Pipeline object

Total count: 131 plugins, 494 features
=======================END=====================

Then, I tried to run a demo script on it. The script is retrieved from
gstreamer examples (with some small modifications by me) and works well on
PC, whose main work is to generate a test video stream->encode->send via udp
packages. The server script is shown below(named server.sh):

====================START========================
# change this to send the RTP data and RTCP to another host
# this is the host addr in android emulator
DEST=10.0.2.2

# tuning parameters to make the sender send the streams out of sync. Can be
used
# ot test the client RTCP synchronisation.
#VOFFSET=900000000
VOFFSET=0
AOFFSET=0

# H264 encode from the source
VELEM="videotestsrc"
#VELEM="peterfilter"
#VCAPS="video/x-raw-yuv,width=352,height=288,framerate=15/1"
VCAPS="video/x-raw-yuv,framerate=5/1"
#VSOURCE="$VELEM ! queue ! videorate ! ffmpegcolorspace ! $VCAPS"
VSOURCE="$VELEM ! ffmpegcolorspace ! $VCAPS"
VENC="x264enc tune=zerolatency byte-stream=true bitrate=300 ! rtph264pay"

VRTPSINK="udpsink port=5000 host=$DEST ts-offset=$VOFFSET name=vrtpsink"
VRTCPSINK="udpsink port=5001 host=$DEST sync=false async=false
name=vrtcpsink"
VRTCPSRC="udpsrc port=5005 name=vrtpsrc"

# PCMA encode from the source
#AELEM="autoaudiosrc"
AELEM="audiotestsrc is-live=1"
ASOURCE="$AELEM ! queue ! audioresample ! audioconvert"
AENC="alawenc ! rtppcmapay"

ARTPSINK="udpsink port=5002 host=$DEST ts-offset=$AOFFSET name=artpsink"
ARTCPSINK="udpsink port=5003 host=$DEST sync=false async=false
name=artcpsink"
ARTCPSRC="udpsrc port=5007 name=artpsrc"

PLUGIN_PATH="/home/xzpeter/intel/gstreamer/gst-template/gst-plugin"

gst-launch -v --gst-plugin-path=$PLUGIN_PATH gstrtpbin name=rtpbin \
    $VSOURCE ! $VENC ! rtpbin.send_rtp_sink_0
              \
        rtpbin.send_rtp_src_0 ! $VRTPSINK
              \
        rtpbin.send_rtcp_src_0 ! $VRTCPSINK
              \
      $VRTCPSRC ! rtpbin.recv_rtcp_sink_0
              \
    $ASOURCE ! $AENC ! rtpbin.send_rtp_sink_1
              \
        rtpbin.send_rtp_src_1 ! $ARTPSINK
              \
        rtpbin.send_rtcp_src_1 ! $ARTCPSINK
              \
      $ARTCPSRC ! rtpbin.recv_rtcp_sink_1
======================END======================

I stored the server.sh to /data/server.sh on android emulator by adb push
and ran it. However, this time gstreamer got SIGSEGV:

====================START========================
xzpeter at xzpeter-HP-Compaq-8100-Elite-SFF-PC:~$ adb shell sh /data/server.sh

(gst-launch-0.10:430): GStreamer-WARNING **: External plugin loader failed.
This most likely means that the plugin loader helper binary was not found or
could not be run.

** (gst-launch-0.10:430): WARNING **: could not find config file
'/system/gst-openmax.conf'.. using defaults!
Caught SIGSEGV accessing address 0xdc
Spinning.  Please run 'gdb gst-launch 430' to continue debugging, Ctrl-C to
quit, or Ctrl-\ to dump core.
========================END====================

I want to figure out what is the problem here. but how should I do the
debugging? (I know android SDK provide some way on debugging, and ndk-gdb
too. Nevertheless, these two ways seems not suitable for gstreamer
debugging?)

Or, can anyone give me any suggestion on resolving this?

Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110614/b1177c5a/attachment-0001.htm>


More information about the gstreamer-devel mailing list