Playing/pausing bins within a running pipeline

Guillaume Dorchies guillaume.dorchies at gmail.com
Tue May 29 02:35:41 PDT 2012


It's work very well

But now I try to do a seek :)

If I make directly my seek on the souce of binB or on the bin nothing
happens.

I try to block pad , seek , unblock pad  but this don't work

Do you have any ideas ?

PS:
Code to block
  pad = gst_element_get_static_pad(binB, "src");
  gst_pad_set_blocked(pad,TRUE);
  gst_pad_unlink(pad,adder_pad);
  gst_element_release_request_pad(adder,adder_pad);
  gst_object_unref(adder_pad);
  gst_object_unref(pad);


Code to unlock
  adder_pad = gst_element_get_request_pad(adder, "sink%d");
  g_assert(adder_pad != NULL);
  gst_pad_link(gst_element_get_pad(bin,"src"),adder_pad);
  gst_pad_set_blocked(pad,FALSE);
  gst_object_unref(pad);


2012/5/29 Wim Taymans <wim.taymans at gmail.com>
>
>> On 05/29/2012 10:19 AM, Guillaume Dorchies wrote:
>>
>>> Hello,
>>>
>>> I have this pipeline I add bin B dynamicly
>>>
>>> |-----------------------------**|
>>> |bin A                      |
>>> |  source -> queue ->|\
>>> |-----------------------------**| \
>>>                                  -> Adder -> queue -> sink
>>> |-----------------------------**| /
>>> |bin B                      |/
>>> |  source -> queue ->|
>>> |-----------------------------**|
>>>
>>> What I want to be able to do is pause "bin B", play it etc (without
>>> affecting "bin A")
>>>
>>> I try gst_element_set_state (binB, GST_STATE_PAUSED); but this don't work
>>>
>>> I try :
>>> pad = gst_element_get_static_pad(**binB, "src");
>>> gst_pad_set_blocked(pad,TRUE);
>>> But this block the pipeline
>>>
>>>  After you block the pad you need to unlink the pad to adder and release
>> the adder pad. Playback
>> will then continue again. If you want restart B, request a new adder pad,
>> link to B srcpad and
>> unblock the srcpad.
>>
>> Wim
>>
>>>
>>> Does someone know how to do this or where can I find an example ?
>>>
>>>
>>> Best regards
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120529/c385f422/attachment-0001.htm>


More information about the gstreamer-devel mailing list