How does the tee element split data to multiple pads?

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

How does the tee element split data to multiple pads?

bboyavatar
Hi, I have a question about the tee element. It is said that this element splits the input data and feeds multiple output pads with the same data. I read the sourc code and find that it uses gst_pad_push_data()function to feed data to the srcpads. So, I wonder if it does the memcpy or just feeds the srcpads with the buffer reference.
Could someone answer me? Thanks so much!    
Reply | Threaded
Open this post in threaded view
|

Re: How does the tee element split data to multiple pads?

Stirling Westrup
On Mon, Nov 12, 2012 at 9:11 PM, bboyavatar <[hidden email]> wrote:
> Hi, I have a question about the tee element. It is said that this element
> splits the input data and feeds multiple output pads with the same data. I
> read the sourc code and find that it uses gst_pad_push_data()function to
> feed data to the srcpads. So, I wonder if it does the memcpy or just feeds
> the srcpads with the buffer reference.
> Could someone answer me? Thanks so much!
>

That's a more complex question than it sounds like. Whenever possible
gstreamer passes references to buffers rather than using memcpy, but
there are cases where this won't work. For example, if your tee
connects to sinks that produce hardware buffers to fill out, then
gstreamer will do memcpy operations to fill the hardware buffers.

--
Stirling Westrup
Programmer, Entrepreneur.
https://www.linkedin.com/e/fpf/77228
http://www.linkedin.com/in/swestrup
http://technaut.livejournal.com
http://sourceforge.net/users/stirlingwestrup
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How does the tee element split data to multiple pads?

bboyavatar
Hi, Thanks so much for your reply! Do you mean that if I link the tee element to gstomx component, such as omx_videomixer, it will do memcpy to fill the input buffer of omx_videomixer? 

2012/11/16 Stirling Westrup [via GStreamer-devel] <[hidden email]>
On Mon, Nov 12, 2012 at 9:11 PM, bboyavatar <[hidden email]> wrote:
> Hi, I have a question about the tee element. It is said that this element
> splits the input data and feeds multiple output pads with the same data. I
> read the sourc code and find that it uses gst_pad_push_data()function to
> feed data to the srcpads. So, I wonder if it does the memcpy or just feeds
> the srcpads with the buffer reference.
> Could someone answer me? Thanks so much!
>

That's a more complex question than it sounds like. Whenever possible
gstreamer passes references to buffers rather than using memcpy, but
there are cases where this won't work. For example, if your tee
connects to sinks that produce hardware buffers to fill out, then
gstreamer will do memcpy operations to fill the hardware buffers.

--
Stirling Westrup
Programmer, Entrepreneur.
https://www.linkedin.com/e/fpf/77228
http://www.linkedin.com/in/swestrup
http://technaut.livejournal.com
http://sourceforge.net/users/stirlingwestrup
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



If you reply to this email, your message will be added to the discussion below:
http://gstreamer-devel.966125.n4.nabble.com/How-does-the-tee-element-split-data-to-multiple-pads-tp4656880p4656933.html
To unsubscribe from How does the tee element split data to multiple pads?, click here.
NAML



--
刘冰