Linking elements on decodebin's pad-added signal
jmz
jmzheng at gmail.com
Mon Sep 25 03:40:07 UTC 2017
I am writing an application as follows:
a) Create elements Filesrc, Decodebin, Muxer, Filesink (Encoder is created
later).
b) Add all elements to pipeline, link Filesrc with Decodebin, and link Muxer
with Filesink.
c) Set pipeline PLAYING.
d) On Decodebin's pad-added signal, create Encoder element and add it to
pipeline, and link Encoder with Decodebin and Muxer.
However, the pipeline gets stuck!
The pipeline works well if I do not add Muxer and Filesink to the pipeline
in step b but later add them to the pipeline in step d (i.e., along with
Encoder).
The --gst-debug=4 logs show as follows:
INFO GST_STATES
gstbin.c:3112:bin_handle_async_done:<decodebin0> committing state from READY
to PAUSED, old pending PAUSED
INFO GST_STATES
gstbin.c:3132:bin_handle_async_done:<decodebin0> completed state change,
pending VOID
INFO GST_STATES
gstelement.c:2233:_priv_gst_element_state_changed:<decodebin0> notifying
about state-changed READY to PAUSED (VOID_PENDING pending)
INFO GST_EVENT
gstpad.c:5083:gst_pad_send_event_unchecked:<x264enc0:sink> Received event on
flushing pad. Discarding
INFO GST_PADS
gstpad.c:3675:gst_pad_peer_query:<decodebin0:src_1> pad has no peer
WARN GST_PADS
gstpad.c:3669:gst_pad_peer_query:<decodebin0:src_0> could not send sticky
events
INFO GST_PADS
gstpad.c:3675:gst_pad_peer_query:<decodebin0:src_1> pad has no peer
INFO basetransform
gstbasetransform.c:1335:gst_base_transform_setcaps:<capsfilter0> reuse caps
INFO GST_EVENT
gstpad.c:5083:gst_pad_send_event_unchecked:<x264enc0:sink> Received event on
flushing pad. Discarding
WARN GST_PADS
gstpad.c:3669:gst_pad_peer_query:<decodebin0:src_0> could not send sticky
events
INFO GST_EVENT
gstpad.c:5083:gst_pad_send_event_unchecked:<x264enc0:sink> Received event on
flushing pad. Discarding
INFO GST_EVENT
gstpad.c:5083:gst_pad_send_event_unchecked:<x264enc0:sink> Received event on
flushing pad. Discarding
INFO GST_EVENT
gstpad.c:5083:gst_pad_send_event_unchecked:<x264enc0:sink> Received event on
flushing pad. Discarding
INFO GST_EVENT
gstpad.c:5083:gst_pad_send_event_unchecked:<x264enc0:sink> Received event on
flushing pad. Discarding
INFO task
gsttask.c:300:gst_task_func:<multiqueue0:src_0> Task going to paused
INFO task gsttask.c:300:gst_task_func:<qtdemux0:sink>
Task going to paused
What's wrong with adding Muxer and Filesink to the pipeline in step b?
I only link Video Encoder with Decodebin on video/x-raw caps in step d, but
do not link any elements on audio/x-raw caps. Could this make any errors?
Best regards,
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list