Selective data processing in a pipeline

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Selective data processing in a pipeline

rad_e
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?

Thanks

Reply | Threaded
Open this post in threaded view
|

Re: Selective data processing in a pipeline

Edward Hervey
Administrator
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
>
>



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel