[gst-devel] Selective data processing in a pipeline

Edward Hervey bilboed at gmail.com
Fri Oct 30 08:15:54 CET 2009


On Thu, 2009-10-29 at 20:20 -0700, rad_e wrote:
> I am trying to understand how I can selectively process data in a pipeline.
> For example, in a (src->A->B->sink) pipeline, there are packets coming from
> the src to plugin A. What I want to do is to pass these packets to plugin B
> only if the packet satisfies some condition, otherwise I want to drop the
> packet. I read about "sometimes pads". Should I implement such that plugin A
> has "sometimes source". Is this the proper way of doing this? Any pointers? 

  You've got two choices:
  * Either you modify the source code of A (and you decide there whether
to push your buffers downstream or not)
  * Or you use a buffer probe (gst_pad_add_buffer_probe) on A's source
pad (and you return FALSE if you don't want the buffer to go
downstreamer, or TRUE if you want it to go downstream).


    Edward

> 
> Thanks
> 
> 






More information about the gstreamer-devel mailing list