<div dir="ltr"><div><div><div><div><div><div><div><div><div><div>Thanks Sebastian<br><br></div>I followed your sugestions but I cant get it to work. <br><br></div>tthe scenario is:<br><br></div><div><br></div><div>v4l2src ----------><br></div>filesrcbin ------> input-selector--->pipeline----tee ---->autovideosink<br></div>              ------> audiomixer                             ----->rtmpsink<br>alsasrc  --------><br><br></div><div>all video stream are connected to a input-selector, and audio to audiomixer.<br></div><div><br></div>alsa and v4l2src have the do-timestamp properties set true. and sinks the sync property true.<br></div>input-selector has the default properties, sync all income streams, the same for audiomixer.<br><br></div><div>for seeking I do the follow:<br><br></div><div>1. add a probe in a src pad of a filesrc bin (the ghos pad connected to a input-selector) the probe is the type downstream <br></div><div>2. in the callback function, if there a eos event then perform the seek of type segment<br></div>the seek is implemented as follow:<br><br>    if (GST_EVENT_TYPE (GST_PAD_PROBE_INFO_DATA (info)) == GST_EVENT_EOS){<br>        GstSeekFlags seek_flags;<br>        gboolean ret;<br>        gint64 duration;<br>        gst_element_query_duration(v->decoder, GST_FORMAT_TIME, &duration);<br>        seek_flags = GST_SEEK_FLAG_SEGMENT;<br>        gint64 start = 0;<br>        GstEvent *event = gst_event_new_seek(1.0, GST_FORMAT_TIME, seek_flags,<br>                                 GST_SEEK_TYPE_SET, start, GST_SEEK_TYPE_SET, duration);<br>        gst_debug_set_threshold_from_string ("*:6", TRUE);<br>        ret = gst_pad_send_event (v->videosrc, event);<br>        gst_debug_set_threshold_from_string ("*:0", TRUE);<br><br></div>"videosrc" is a src pad connected to a input-selector.<br></div>with GST_DEBUG using the functions I can see how the event is sended to all elements in the bin until qtdemux , see the logs bellow<br><br><a href="http://pastebin.com/WzMRv31g">http://pastebin.com/WzMRv31g</a><br><br></div>and in the logs:<br><br><div class=""><span class="">0</span>:00:<span class="">53.868032558</span> <span class="">21438</span>      0x1fc0c00 DEBUG                qtdemux qtdemux.c:<span class="">1580</span>:gst_qtdemux_do_seek:<span class=""><</span>qtdemux1<span class="">></span> configuring seek</div><div class=""><span class="">0</span>:00:<span class="">53.868058679</span> <span class="">21438</span>      0x1fc0c00 DEBUG                default gstsegment.c:<span class="">317</span>:gst_segment_do_seek: updated segment.base: <span class="">42887979166</span></div><div class=""><span class="">0</span>:00:<span class="">53.868082708</span> <span class="">21438</span>      0x1fc0c00 INFO                 default gstsegment.c:<span class="">372</span>:gst_segment_do_seek: segment updated: <span class="">time</span> segment <span class="">start</span>=<span class="">0</span>:00:<span class="">00.000000000</span>, <span class="">offset</span>=<span class="">0</span>:00:<span class="">00.000000000</span>, <span class="">stop</span>=<span class="">0</span>:00:<span class="">42.902000000</span>, <span class="">rate</span>=<span class="">1</span>,000000, <span class="">applied_rate</span>=<span class="">1</span>,000000, <span class="">flags</span>=0x08, <span class="">time</span>=<span class="">0</span>:00:<span class="">00.000000000</span>, <span class="">base</span>=<span class="">0</span>:00:<span class="">42.887979166</span>, position <span class="">0</span>:00:<span class="">00.000000000</span>, duration <span class="">0</span>:00:<span class="">42.902000000</span></div><div class=""><span class="">0</span>:00:<span class="">53.868125630</span> <span class="">21438</span>      0x1fc0c00 DEBUG                qtdemux qtdemux.c:<span class="">1473</span>:gst_qtdemux_perform_seek:<span class=""><</span>qtdemux1<span class="">></span> seeking to <span class="">0</span>:00:<span class="">00.000000000<br><br></span></div><div class=""><span class="">and then in the bus there is a segment-done message, but on the autovideosink if the sink pad which is connected videosrc ghost pad, is active, the image on the screen is frezze. so I dont now what happen here.<br></span></div><div class=""><span class="">I thing the seek was performed but input-selector or audiomixer has another time-stamp, and in this case the file is very short(~1:30 min) so, the time-stamp of the pipeline is <br></span></div><div class=""><span class="">higher. It is correct? what is the error in my implementation?<br></span></div><div class=""><span class="">the source bins are added dinamically in any time. by default the pipeline begin with alsa and videosrc. <br></span></div><div class=""><span class="">Using gstreamer-1.8 and c++<br><br></span></div><div class=""><span class="">thanks !!!! (Muchas Gracias)<br></span></div><div><div><div><div><div><div><div><br><br></div><div><br></div><div><br><br></div><div><br><br></div><br><br><br><br><br><br><br><br><br><br></div></div></div></div></div></div></div>