<p dir="ltr"><br>
Le 2016-06-14 17:11, "lucas.kinion" <<a href="mailto:lucas.s.kinion@nasa.gov">lucas.s.kinion@nasa.gov</a>> a écrit :<br>
><br>
> Hi,<br>
><br>
> I'm trying to write some test code that inserts video data into a pipeline<br>
> from a USB camera that is not V4L2 compatible, and instead uses its own API.<br>
> I've attached my code. I'm wondering if there's a way my code needs to be<br>
> optimized to increase performance, or if I am being processor limited. I am<br>
> using a TI Sitara AM5728 based single board computer, which has a hardware<br>
> encoder capable of 1080p@60fps, and a USB 3.0 camera which is also capable<br>
> of 1080p@60fps. I am currently only achieving 1080p@15fps.<br>
><br>
> The code does the following:<br>
> Initialize the pipeline, elements, and caps<br>
> kick off a thread that pulls UYVY video frames from the camera into an array<br>
> connects cb_need_data to the appsrc so that another thread can pull frames<br>
> from the array into the pipeline.<br>
><br>
> The pipeline looks like this, and seems to be working:<br>
> appsrc [caps] ! videoconvert ! [caps] ! ducatih264enc ! h264parse !<br>
> rtph264pay ! udpsink<br>
> And on the other machine I receive the UDP stream through VLC using an SDP<br>
> file.<br>
></p>
<p dir="ltr">When having performance issues, try to avoid conversion or copies. Don't you have a hw color converter on this platform? Are you sure you are not copying frames in your proprietary stack?</p>
<p dir="ltr">> The code works, but I believe it is slow. The max framerate it can push into<br>
> the pipeline is ~15fps when the camera is set to 1920x1080 resolution. At<br>
> lower resolutions, it can handle 30fps without issue. Is there some obvious<br>
> way I am missing to optimize my code so that it can handle 1080p@30fps or<br>
> 60fps, as my camera and hardware encoder support? Or am I just being limited<br>
> by something else?<br>
><br>
> I'm mainly looking at the cb_need_data for optimizations. Some basic<br>
> profiling leads me to believe that it is spending a lot of time on<br>
> gst_app_src_push_buffer, but I don't know of any way to optimize this<br>
> function. Is there something I'm missing?<br>
><br>
> Thank you<br>
> Lucas Kinion<br>
><br>
> pixelink_test.cpp<br>
> <<a href="http://gstreamer-devel.966125.n4.nabble.com/file/n4678040/pixelink_test.cpp">http://gstreamer-devel.966125.n4.nabble.com/file/n4678040/pixelink_test.cpp</a>><br>
><br>
><br>
><br>
> --<br>
> View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/Appsrc-video-performance-optimization-tp4678040.html">http://gstreamer-devel.966125.n4.nabble.com/Appsrc-video-performance-optimization-tp4678040.html</a><br>
> Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
> _______________________________________________<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">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</p>