<div dir="ltr"><div>Hi</div><div><br></div><div>You can do something like this:</div><div><br></div><div>     gst-launch-1.0 -v videotestsrc ! queue ! x264enc ! queue ! shmsink socket-path=/tmp/video-ctr wait-for-connection=0</div><div><br></div><div>The "videotestsrc ! queue ! x264enc" is here the stand-in for your capture device. And shmsink is your stand-in for mmap.</div><div><br></div><div>Then the clients would be something like this:</div><div><br></div><div>    gst-launch-1.0 -v shmsrc socket-path=/tmp/pmm ! identity silent=0 ! h264parse ! queue ! decodebin ! queue ! videoconvert ! autovideosink</div><div><br></div><div>The client is just an example. You need to consider shm size, security, optimization and a lot more.</div><div><br></div><div>Best regards</div><div>Peter Maersk-Moller<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jul 18, 2020 at 2:55 PM Psychesnet Hsieh <<a href="mailto:psychesnet@gmail.com">psychesnet@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Joshi,<div><br></div><div>Thanks. First of all, I think I need to describe my question more and we can fully address what I need. Thanks.</div><div><br></div><div>CAPTURE  -> mmap -> service 1</div><div>                             | ----> service 2</div><div>                             | ----> service 3</div><div>Above layout, it is our design for now. We have CAPTURE which always capture H264 video frames from DSP(via special ioctl, not v4l2).</div><div>There are a lot of server X can access H264 video frames at same time. The middle interface is mmap. It is working now.</div><div><br></div><div>Now, we would like to design a source element and it can satisfy following requirements.</div><div>1. All service X still can access H264 video frames at same time.</div><div>2. Gstreamer can work with this source element.</div><div>3. CAPTURE, for platform, we still need this part which capture H264 video frames via ioctl.</div><div><br></div><div>@Joshi,</div><div><br></div><div>According to your reply, I think I still need to keep my mmap and create a source element which can access mmap and delivery data through whole pipeline, right?</div><div><br></div><div>Thanks. Have a good day. ^^</div><div><br>Mandar Joshi <<a href="mailto:emailmandar@gmail.com" target="_blank">emailmandar@gmail.com</a>> 於 2020年7月17日 星期五寫道:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Hi,</div><div>I've done something similar recently. Could you please go through this discussion <a href="https://lists.freedesktop.org/archives/gstreamer-devel/2020-July/075481.html" target="_blank">https://lists.freedesktop.org/archives/gstreamer-devel/2020-July/075481.html</a> Since this is recent, I should be able to answer any queries you have about the approach.</div><div><br></div><div>For your first question, this is my suggestion<br></div><div>So, create a source element based on GstPushSrc (like neonhttpsrc) and in the _create function, the following should work.</div><div>Map the buffer and write what you need to it. Make sure you set the SRC CAPS of the element to the correct ones so that a right element to decode/view the video data can be linked to the source element.</div><div><br></div></div><div>For your second question, I don't think I completely understand it. But maybe the answer to the first question will allow you to come up with the answer to the second one.</div><div><br></div><div>Feel free to ask any questions.</div><div><br></div><div>Regards</div>Mandar Joshi<div dir="ltr"><div dir="ltr"><div>Czar Softech</div><div><i><a href="https://www.czarsoftech.com" target="_blank">https://www.czarsoftech.com</a></i><br></div></div></div></div>
</blockquote></div>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div>