Hi,
I use this pipeline: #define DEF_PIPELINE "concat name=c ! avdec_h264 name=avdec_h264 skip-frame=1 ! videorate max-rate=6 name=videorate ! x264enc speed-preset=1 pass=5 bitrate=300
key-int-max=6 name=x264enc ! rtph264pay config-interval=1 pt=96 name=rtph264pay ! udpsink name=udpsink filesrc name=fsrc ! qtdemux ! h264parse ! c." After I initialize fsrc location, udp port…. And finally I add a second video with:
GstPadTemplate *sink_pad_template;
GstElement * fsrcAux;
GstElement * qtdemuxAux;
GstElement * h264parseAux;
GstPad *pad;
GstPad *srcpad; fsrcAux =
gst_element_factory_make ("filesrc",
NULL);
g_object_set (fsrcAux, "location", video.c_str() ,
NULL); qtdemuxAux =
gst_element_factory_make ("qtdemux",
NULL); h264parseAux =
gst_element_factory_make ("h264parse",
NULL);
GstElement *gSc; gSc=gst_bin_get_by_name(GST_BIN(m_gstPipeline),
"c");
if(!gSc) { LOG(ERROR)<<"gSc created failed.";
return ; }
gst_element_link_many (fsrcAux, qtdemuxAux, h264parseAux,
NULL); pad=
gst_element_get_request_pad (gSc, "sink_%u");
if(pad==NULL){ LOG(ERROR)<<"pad NULL";
return ; } srcpad =
gst_element_get_static_pad (h264parseAux, "src");
if(srcpad==NULL){ LOG(ERROR)<<"sink NULL";
return ; }
gst_pad_link (srcpad, pad); I can see first streaming but no second. EOS is not publish so second sink is active but no data.
I activate DEBUG_LEVEL_LOG and last lines are: concat gstconcat.c:495:gst_concat_switch_pad:<c>[00m <c:sink_0> to <c:sink_1> 0:00:53.703260401 [334m21777[00m 0x1622a80 [33;01mLOG [00m [00;01;37;44m GST_PROPERTIES gstobject.c:448:gst_object_dispatch_properties_changed:<pipeline0>[00m deep notification from c (active-pad) 0:00:53.703344451 [334m21777[00m 0x1622a80 [33;01mLOG [00m [00;01;37;41m GST_MESSAGE gstmessage.c:301:gst_message_new_custom:[00m source c: creating new message 0x169c600 duration-changed 0:00:53.703443576 [334m21777[00m 0x1622a80 [37mDEBUG [00m [00;43m GST_BUS gstbus.c:318:gst_bus_post:<bus15>[00m [msg 0x169c600] posting on bus duration-changed message: 0x169c600, time 99:99:99.999999999,
seq-num 729, element 'c', GstMessageDurationChanged; 0:00:53.703509371 [334m21777[00m 0x1622a80 [37mDEBUG [00m [00;01m bin gstbin.c:3717:gst_bin_handle_message_func:<pipeline0>[00m [msg 0x169c600] handling child c message of type duration-changed 0:00:53.703611256 [334m21777[00m 0x1622a80 [37mDEBUG [00m [00;01m bin gstbin.c:4054:gst_bin_handle_message_func:<pipeline0>[00m posting message upward 0:00:53.703694331 [334m21777[00m 0x1622a80 [37mDEBUG [00m [00;43m GST_BUS gstbus.c:318:gst_bus_post:<bus16>[00m [msg 0x169c600] posting on bus duration-changed message: 0x169c600, time 99:99:99.999999999,
seq-num 729, element 'c', GstMessageDurationChanged; 0:00:53.703748431 [334m21777[00m 0x1622a80 [37mDEBUG [00m [00;43m GST_BUS gstbus.c:357:gst_bus_post:<bus16>[00m [msg 0x169c600] pushing on async queue 0:00:53.703794111 [334m21777[00m 0x1622a80 [33;01mLOG [00m [00m GST_POLL gstpoll.c:290:raise_wakeup:[00m 0x1668230: raise 0:00:53.703868461 [334m21777[00m 0x1622a80 [37mDEBUG [00m [00;43m GST_BUS gstbus.c:360:gst_bus_post:<bus16>[00m [msg 0x169c600] pushed on async queue 0:00:53.703925076 [334m21777[00m 0x1622a80 [37mDEBUG [00m [00;43m GST_BUS gstbus.c:353:gst_bus_post:<bus15>[00m [msg 0x169c600] dropped 0:00:53.703968346 [334m21777[00m 0x164e930 [33;01mLOG [00m [00;43m GST_BUS gstbus.c:522:gst_bus_timed_pop_filtered:<bus16>[00m have 1 messages 0:00:53.703981956 [334m21777[00m 0x1622a80 [37mDEBUG [00m [00;01;31;41m GST_PADS gstpad.c:5776:gst_pad_send_event_unchecked:<c:sink_0>[00m sent event, ret ok 0:00:53.704074871 [334m21777[00m 0x164e930 [33;01mLOG [00m [00m GST_POLL gstpoll.c:314:release_wakeup:[00m 0x1668230: release 0:00:53.704153156 [334m21777[00m 0x1622a80 [33;01mLOG [00m [00;01;31;41m GST_PADS gstpad.c:5219:store_sticky_event:<c:sink_0>[00m stored sticky event eos 0:00:53.704193406 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;43m GST_BUS gstbus.c:546:gst_bus_timed_pop_filtered:<bus16>[00m got message 0x169c600, duration-changed from c, type mask is 4294967295 0:00:53.704227396 [334m21777[00m 0x1622a80 [33;01mLOG [00m [00;01;31;41m GST_PADS gstpad.c:5412:gst_pad_push_event_unchecked:<h264parse3:src>[00m sent event 0x7fe6dc002e00 (eos) to peerpad <c:sink_0>,
ret ok 0:00:53.704264471 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;43m GST_BUS gstbus.c:839:gst_bus_source_dispatch:<bus16>[00m source 0x16b3dc0 calling dispatch with duration-changed message: 0x169c600,
time 99:99:99.999999999, seq-num 729, element 'c', GstMessageDurationChanged; 0:00:53.704274766 [334m21777[00m 0x1622a80 [37mDEBUG [00m [00;01;31;41m GST_PADS gstpad.c:3932:push_sticky:<h264parse3:src>[00m event eos marked received 0:00:53.704323291 [334m21777[00m 0x164e930 [33;01mLOG [00m [00;01;37;41m GST_MESSAGE gstmessage.c:208:_gst_message_free:[00m finalize message 0x169c600, duration-changed from c 0:00:53.704362847 [334m21777[00m 0x1622a80 [37mDEBUG [00m [00m baseparse gstbaseparse.c:1474:gst_base_parse_sink_event_default:<h264parse3>[00m event handled 0:00:53.704436707 [334m21777[00m 0x1622a80 [37mDEBUG [00m [00;01;31;41m GST_PADS gstpad.c:5776:gst_pad_send_event_unchecked:<h264parse3:sink>[00m sent event, ret ok 0:00:53.704471502 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;43m GST_BUS gstbus.c:844:gst_bus_source_dispatch:<bus16>[00m source 0x16b3dc0 handler returns 1 0:00:53.704485602 [334m21777[00m 0x1622a80 [33;01mLOG [00m [00;01;31;41m GST_PADS gstpad.c:5219:store_sticky_event:<h264parse3:sink>[00m stored sticky event eos 0:00:53.704584507 [334m21777[00m 0x1622a80 [33;01mLOG [00m [00;01;31;41m GST_PADS gstpad.c:5412:gst_pad_push_event_unchecked:<qtdemux3:video_0>[00m sent event 0x7fe6dc002e00 (eos) to peerpad <h264parse3:sink>,
ret ok 0:00:53.704632242 [334m21777[00m 0x1622a80 [37mDEBUG [00m [00;01;31;41m GST_PADS gstpad.c:3932:push_sticky:<qtdemux3:video_0>[00m event eos marked received 0:00:53.704687372 [334m21777[00m 0x1622a80 [36mINFO [00m [00m task gsttask.c:316:gst_task_func:<qtdemux3:sink>[00m Task going to paused 0:01:01.835966280 [334m21777[00m 0x164e930 [37mDEBUG [00m [00m query gstquery.c:675:gst_query_new_custom:[00m creating new query 0x1616540 position 0:01:01.836036435 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;01;37;41m GST_ELEMENT_PADS gstelement.c:1962:gst_element_query:[00m send query on element pipeline0 0:01:01.836120275 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;01m bin gstbin.c:4375:gst_bin_query:<pipeline0>[00m Sending query 0x1616540 (type position) to sink children 0:01:01.836226600 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;01;31m GST_STATES gstbin.c:1971:bin_element_is_sink:<pipeline0>[00m child h264parse3 is not sink 0:01:01.836317900 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;01;31m GST_STATES gstbin.c:1971:bin_element_is_sink:<pipeline0>[00m child qtdemux3 is not sink 0:01:01.836438600 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;01;31m GST_STATES gstbin.c:1971:bin_element_is_sink:<pipeline0>[00m child fsrc is not sink 0:01:01.836550255 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;01;31m GST_STATES gstbin.c:1971:bin_element_is_sink:<pipeline0>[00m child udpsink is sink 0:01:01.836619220 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;01;37;41m GST_ELEMENT_PADS gstelement.c:1962:gst_element_query:[00m send query on element udpsink 0:01:01.836718030 [334m21777[00m 0x164e930 [37mDEBUG [00m [00m basesink gstbasesink.c:4816:default_element_query:<udpsink>[00m position query in format time 0:01:01.836767810 [334m21777[00m 0x164e930 [37mDEBUG [00m [00m basesink gstbasesink.c:4608:gst_base_sink_get_position:<udpsink>[00m using clock and base time 17:52:50.354297402 0:01:01.836812026 [334m21777[00m 0x164e930 [37mDEBUG [00m [00m basesink gstbasesink.c:4643:gst_base_sink_get_position:<udpsink>[00m in PLAYING using last 0:10:05.550566666 0:01:01.836860656 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;01;33m GST_CLOCK gstclock.c:1046:gst_clock_get_internal_time:<GstSystemClock>[00m internal time 17:53:18.001321654 0:01:01.836906326 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;01;33m GST_CLOCK gstclock.c:1091:gst_clock_get_time:<GstSystemClock>[00m adjusted time 17:53:18.001321654 0:01:01.836990921 [334m21777[00m 0x164e930 [37mDEBUG [00m [00m basesink gstbasesink.c:4725:gst_base_sink_get_position:<udpsink>[00m now 17:53:18.001321654 - base_time 17:52:50.354297402 - base 0:00:00.000000000
+ time 0:09:44.710911111 last 0:10:05.550566666 0:01:01.837037331 [334m21777[00m 0x164e930 [37mDEBUG [00m [00m basesink gstbasesink.c:4738:gst_base_sink_get_position:<udpsink>[00m res: 1, POSITION: 0:10:05.550566666 0:01:01.837083031 [334m21777[00m 0x164e930 [37mDEBUG [00m [00m basesink gstbasesink.c:4935:default_element_query:<udpsink>[00m query position returns 1 0:01:01.837138441 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;01m bin gstbin.c:4152:bin_query_position_fold:<udpsink>[00m got position 605550566666 0:01:01.837183921 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;01;31m GST_STATES gstbin.c:1971:bin_element_is_sink:<pipeline0>[00m child rtph264pay is not sink 0:01:01.837230186 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;01;31m GST_STATES gstbin.c:1971:bin_element_is_sink:<pipeline0>[00m child x264enc is not sink 0:01:01.837282456 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;01;31m GST_STATES gstbin.c:1971:bin_element_is_sink:<pipeline0>[00m child videorate is not sink 0:01:01.837334481 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;01;31m GST_STATES gstbin.c:1971:bin_element_is_sink:<pipeline0>[00m child avdec_h264 is not sink 0:01:01.837390686 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;01;31m GST_STATES gstbin.c:1971:bin_element_is_sink:<pipeline0>[00m child c is not sink 0:01:01.837450806 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;01m bin gstbin.c:4170:bin_query_position_done:<pipeline0>[00m max position 605550566666 0:01:01.837501381 [334m21777[00m 0x164e930 [37mDEBUG [00m [00;01m bin gstbin.c:4397:gst_bin_query:<pipeline0>[00m query 0x1616540 result 1 Many thabks! P Please consider the environment before printing this e-mail. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |