memory not being freed?

Spruyt, Randy Randy.Spruyt at christiedigital.com
Wed May 6 11:48:06 PDT 2015


Hey Everyone,

This is my first source filter. The filter "produces" H.264 frames (from the nvidia frame buffer capture api). The frames show up in the d3dvideosink renderer correctly. When using a fakesink, memory usage is stable. However,  when using a avdec_h264 ! d3dvideosink, memory usage continually grows.

The only function we override from the base source class is the _fill() function.

If we have the _fill function do nothing and simply return GST_FLOW_OK, we have the same memory gowth problem, suggesting there is some kind of frame information missing designating the end of the frame. It seems like the element is holding on to the buffer and waiting for the remaining data in a subsequent buffer, that is never received, and thus the previous buffers are never freed. Everything renders correctly when using avdec_h264 ! d3dvideosink.

The question is: What is gstreamer looking for? What does it need to release the buffer references to previous frames so they can be freed? Maybe the caps are defined incorrectly?

Memory usage is fine:
gst-launch-1.0 christiedesktopcapturefilter ! fakesink

Memory usage grows continually:
Gst-launch-1.0 christiedesktopcapturefilter ! avdec_h264 ! fakesink
Gst-launch-1.0 christiedesktopcapturefilter ! h264parse ! fakesink
Gst-launch-1.0 christiedesktopcapturefilter ! avdec_h264 ! d3dvideosink

Cheers,
Randy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150506/fc800fc1/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gstchristiedesktopcapturefilter.c
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150506/fc800fc1/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gstchristiedesktopcapturefilter.h
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150506/fc800fc1/attachment.h>


More information about the gstreamer-devel mailing list