RTSP source pipeline not working in static mode
Marcin Woźniak
marcin.wozniak at intermania.pl
Fri Jun 24 15:32:56 UTC 2016
Hello and hi to all,
I am fighting with latest 1.8 gstreamer tree to have a pipe to get RTSP
H264 stream and put it into a filesink.
All works well when i compile 1.8 branch using dynamic linking (.so
modules). But as i need to move it further and crosscompile it to ARM
board - i need it to compile as a static executable.
I studied this group, compiled gstreamer with --enable-static and
---disable-registry and plugins trees with --enable-static-plugins.
Then i created a small piece of code to test with:
pipeline = gst_parse_launch ("rtspsrc location=rtsp://XXXXX/
protocols=GST_RTSP_LOWER_TRANS_TCP ! rtph264depay ! fakesink", NULL);
and ran it.
And voila - it works well when all is compiled as dynamic modules.
In static mode i added:
GST_PLUGIN_STATIC_DECLARE(rtsp);
GST_PLUGIN_STATIC_DECLARE(rtp);
GST_PLUGIN_STATIC_DECLARE(coreelements);
GST_PLUGIN_STATIC_DECLARE(videoparsersbad);
static void
registerGstStaticPlugins()
{
GST_PLUGIN_STATIC_REGISTER(rtsp);
GST_PLUGIN_STATIC_REGISTER(rtp);
GST_PLUGIN_STATIC_REGISTER(coreelements);
GST_PLUGIN_STATIC_REGISTER(videoparsersbad);
}
and linked it against corresponding .a files:
-lgstreamer-1.0 \
-l:/usr/local/lib/gstreamer-1.0/libgstrtsp.a \
-l:/usr/local/lib/libgstrtsp-1.0.a \
-l:/usr/local/lib/gstreamer-1.0/libgstrtp.a \
-l:/usr/local/lib/libgstsdp-1.0.a \
-l:/usr/local/lib/libgio-2.0.a \
-l:/usr/local/lib/libgstrtp-1.0.a \
-l:/usr/local/lib/libgstnet-1.0.a \
-l:/usr/local/lib/gstreamer-1.0/libgstcoreelements.a \
-l:/usr/local/lib/libgstbase-1.0.a \
-l:/usr/local/lib/libgstcodecparsers-1.0.a \
-l:/usr/local/lib/gstreamer-1.0/libgstvideoparsersbad.a \
-l:/usr/local/lib/libgstvideo-1.0.a \
-l:/usr/local/lib/libgstcodecparsers-1.0.a \
-l:/usr/local/lib/libgstbase-1.0.a \
-l:/usr/local/lib/gstreamer-1.0/libgstvideoparsersbad.a \
-l:/usr/local/lib/libgstpbutils-1.0.a \
-l:/usr/local/lib/libgsttag-1.0.a \
-l:/usr/local/lib/libgstvideo-1.0.a \
-l:/usr/local/lib/libgstaudio-1.0.a \
Compiled well. But after static compile of the same code (just adding
STATIC DECLARE and STATIC_REGISTER differs) - it wont work.
Wierd things happens. First is that if i switch RTSP source into UDP
transport mode - binary will fail with "cannot allocate udp port"'.
Switich to TCP mode will move forward but stuck soon at:
(gst:4638): GLib-GObject-WARNING **: gsignal.c:2462: signal
'on-npt-stop' is invalid for instance '0x96af800' of type 'GstRTPDec'
(gst:4638): GLib-GObject-WARNING **: gsignal.c:2462: signal
'request-rtp-decoder' is invalid for instance '0x96af800' of type
'GstRTPDec'
(gst:4638): GLib-GObject-WARNING **: gsignal.c:2462: signal
'request-rtcp-decoder' is invalid for instance '0x96af800' of type
'GstRTPDec'
(gst:4638): GLib-GObject-WARNING **: gsignal.c:2462: signal
'request-rtcp-encoder' is invalid for instance '0x96af800' of type
'GstRTPDec'
(gst:4638): GLib-GObject-WARNING **: gsignal.c:2462: signal
'request-rtp-decoder' is invalid for instance '0x96af800' of type
'GstRTPDec'
(gst:4638): GLib-GObject-WARNING **: gsignal.c:2462: signal
'request-rtcp-decoder' is invalid for instance '0x96af800' of type
'GstRTPDec'
(gst:4638): GLib-GObject-WARNING **: gsignal.c:2462: signal
'request-rtcp-encoder' is invalid for instance '0x96af800' of type
'GstRTPDec'
(gst:4638): GLib-GObject-WARNING **: gsignal.c:2462: signal
'request-rtp-decoder' is invalid for instance '0x96af800' of type
'GstRTPDec'
(gst:4638): GLib-GObject-WARNING **: gsignal.c:2462: signal
'request-rtcp-decoder' is invalid for instance '0x96af800' of type
'GstRTPDec'
(gst:4638): GLib-GObject-WARNING **: gsignal.c:2462: signal
'request-rtcp-encoder' is invalid for instance '0x96af800' of type
'GstRTPDec'
(gst:4638): GLib-GObject-WARNING **: gsignal.c:3408: signal name
'reset-sync' is invalid for instance '0x96af800' of type 'GstRTPDec'
ERROR from element rtph264depay0: No RTP format was negotiated.
Debugging info: gstrtpbasedepayload.c(450): gst_rtp_base_depayload_chain
(): /GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0:
Input buffers need to have RTP caps set on them. This is usually
achieved by setting the 'caps' property of the upstream source element
(often udpsrc or appsrc), or by putting a capsfilter element before the
depayloader and setting the 'caps' property on that. Also see
http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/gst/rtp/README
No matter what i do, i cannot pass it further. I tried also 1.4 branch
just to check - same happens.
Any clues?
As i said - if I recompile Gstreamer with dynami plugins - same code
works well.
Marcin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: marcin_wozniak.vcf
Type: text/x-vcard
Size: 291 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160624/5c0bf438/attachment.vcf>
More information about the gstreamer-devel
mailing list