Buffers, shm and tees

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

Buffers, shm and tees

Peter Maersk-Moller-2
Hi

Is it correct to assume that the following pipeline works with zero copying, that is shmsink provides buffer to queue that provide same buffer to videoconvert to fill out?

    ... videoconvert ! queue ! shmsink

Then what happens if you have a tee?

    ... videoconvert ! tee name=t ! queue ! shmsink t. ! queue shmsink

Obviously there has to be at least one copy of each frame to the second shmsink, but is there only one copying of a frame or will the tee result in a frame from videoconvert being actually copied to both buffers from shmsink 1 and 2?

Are there any mechanism with the GStreamer framework so two or more shmsrc can be fed data from same shmsink so the two shmsrc and one shmsink shares same shared memory area?

Reason for asking is to see how t ooptimize the flow of raw video frames in a mixer system with many sources and multiple consuming separate processes using the same data streams.

Best regards
Peter MM

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Buffers, shm and tees

Olivier Crête-3
Hi,

On Tue, 2016-08-23 at 17:46 +0200, Peter Maersk-Moller wrote:
> Is it correct to assume that the following pipeline works with zero
> copying, that is shmsink provides buffer to queue that provide same
> buffer to videoconvert to fill out?
>
>     ... videoconvert ! queue ! shmsink

Yes

> Are there any mechanism with the GStreamer framework so two or more
> shmsrc can be fed data from same shmsink so the two shmsrc and one
> shmsink shares same shared memory area?

That should work just fine, if you give the same "socket-path" to both
shmsrc, they should get the same data from the shmsink. You can even
"connect" shmsrc while it's running. This should all be documented much
better.


--
Olivier Crête
[hidden email]
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel