How can I wait on the creation of shmsink pipe so that safely launch shmsrc pipe?

H Jumogehn jumogehn at gmail.com
Wed Jun 28 01:32:46 UTC 2023


Hello,

I've tested shm / shmsink / shmsrc pipes :

SENDER : gst-launch-1.0 -v videotestsrc ! "video/x-raw, format=YUY2,
color-matrix=sdtv, \ chroma-site=mpeg2, width=(int)320, height=(int)240,
framerate=(fraction)30/1" \ ! shmsink socket-path=/tmp/blah shm-size=2000000

RECEIVER : gst-launch-1.0 shmsrc socket-path=/tmp/blah ! \ "video/x-raw,
format=YUY2, color-matrix=sdtv, \ chroma-site=mpeg2, width=(int)320,
height=(int)240, framerate=(fraction)30/1" \ ! queue ! videoconvert !
autovideosink

But on the tests, I found one important thing. The shmsink pipe (SENDER)
has to be preceded. If shmsrc pipe (RECEIVER) runs first, shmsrc pipe
(RECEIVER) fails because the socket file doesn't exist.

So I think the shmsrc pipe (RECEIVER) must wait on the shmsink pipe
(SENDER) to be started.


So I want to ask you how I can make the shmsrc pipe (RECEIVER) wait on the
shmsink pipe (SENDER) to be started.

I guess I would be able to use the inotify-tools library on the control
socket file - /tmp/blah - above. I guess I can check the creation of the
control socket file - /tmp/blah before the program launches shmsrc pipe
(RECEIVER).


How can I achieve my goal?

Thank you in advance!


And I wonder if the license for the shm/shmsink/shmsrc is free enough to
use it on commercial products.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230628/40189646/attachment.htm>


More information about the gstreamer-devel mailing list