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

H Jumogehn via gstreamer-devel <[email protected]>
Newsgroups gmane.comp.video.gstreamer.devel
Message-ID <CAJp4miJ4sw9XcJH4XuSYAgBKEB-5ckZMOoj65Kv4j9XmPb=HtQ@mail.gmail.com>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.