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