<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 17, 2016 at 2:13 PM, Nicolas Dufresne <span dir="ltr"><<a href="mailto:nicolas.dufresne@gmail.com" target="_blank">nicolas.dufresne@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Le samedi 14 mai 2016 à 10:41 +0300, Sebastian Dröge a écrit :<br>
> On Fr, 2016-05-13 at 08:34 -0400, Aaron Boxer wrote:<br>
> ><br>
> > I have a question about how the streaming architecture works with<br>
> > GPU acceleration.<br>
> ><br>
> > Since discrete cards are sitting on the PCI bus, best performance<br>
> > happens when data is<br>
> > moved to the card in a pipeline and the host gets notified when<br>
> > data has been processed<br>
> > and moved back to the host.<br>
> ><br>
> > Also, it is sometimes more efficient to process N frames at a time.<br>
> ><br>
> > So, for best perf, the flow would be:<br>
> ><br>
> > A) host keeps a list of N host-side memory buffers<br>
> > B) host waits for a host buffer to become available<br>
> > C) when buffer is available, host copies memory into that buffer,<br>
> > and queues the buffer<br>
> > to be copied over to the card<br>
> > D) when N buffers have been processed, and copied back to host, the<br>
> > host receives an event<br>
> > E) host can use the processed buffers, and when it is finished,<br>
> > that buffers becomes available<br>
> > for another frame<br>
> ><br>
> > Would this workflow work with GStreamer? <br>
> Yes, you just need to ensure that latency is reported accordingly by<br>
> your element.<br>
<br>
</span>Note, it's arguably not the most efficient way. Ideally, you should<br>
implement a V4L2 mem-to-mem driver for your card. The videobuf2 and/or<br>
v4l2_mem2mem framework will provide you an appropriate queue mechanism,<br>
and efficient memory allocation model. Those drivers are already<br>
supported by GStreamer.<br></blockquote><div><br><br></div><div>Thanks, Nicolas. I am not completely sure about the actual workflow for J2K streaming,<br></div><div>but I don't think the encoding and capture would necessarily happen on the same machine.<br><br></div><div>So, one machine would capture uncompressed, then send to a second one to compress and stream<br></div><div>to others. And for viewing, one endpoint would receive the compressed stream, decompress, and display.<br><br></div><div>So, I don't think mem-to-mem copying from card is necessary. But, as I said, streaming is pretty new<br></div><div>to me, so perhaps more experience folks can chime in here.<br><br></div><div>Aaron<br></div><div><br><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
Nicolas<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">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>
</div></div></blockquote></div><br></div></div>