gstreamer/sys/msdk
Nirbheek Chauhan 1bcf44bb1f msdk: Fix increasing memory usage in dynamic pipelines
Our context is non-persistent, and we propagate it throughout the
pipeline. This means that if we try to reuse any gstmsdk element by
removing it from the pipeline and then re-adding it, we'll clone the
mfxSession and create a new gstmsdk context as a child of the old one
inside `gst_msdk_context_new_with_parent()`.

Normally this only allocates a few KB inside the driver, but on
Windows it seems to allocate tens of MBs which leads to linearly
increasing memory usage for each PLAYING->NULL->PLAYING state cycle
for the process. The contexts will only be freed when the pipeline
itself goes to `NULL`, which would defeat the purpose of dynamic
pipelines.

Essentially, we need to optimize the case in which the element is
removed from the pipeline and re-added and the same context is re-set
on it. To detect that case, we set the context on `old_context`, and
compare it to the new one when preparing the context. If they're the
same, we don't need to do anything.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/946
2020-01-21 00:38:41 +00:00
..
gstmsdk.c msdk: remove msdkvp8enc 2019-11-08 08:44:46 +00:00
gstmsdkallocator.h msdk: allocator: get dmabuf handle during allocation if required 2018-03-30 11:04:28 -08:00
gstmsdkallocator_d3d.c msdk: don't reset the external frame allocator 2019-01-08 09:11:47 +00:00
gstmsdkallocator_libva.c documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
gstmsdkallocator_libva.h msdk: Add method to replace internal VASurface of mfxFrameSurface 2018-05-30 16:23:44 -08:00
gstmsdkbufferpool.c documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
gstmsdkbufferpool.h msdk: dmabuf support 2018-03-30 11:06:05 -08:00
gstmsdkcontext.c msdk: make sure the found response meets the request 2020-01-06 02:16:53 +00:00
gstmsdkcontext.h msdk: fix for mfx frame alloc response 2019-09-23 09:58:28 +08:00
gstmsdkcontextutil.c msdk: Fix increasing memory usage in dynamic pipelines 2020-01-21 00:38:41 +00:00
gstmsdkcontextutil.h msdk: Reorganize context preparation code 2020-01-21 00:38:41 +00:00
gstmsdkdec.c msdk: Fix increasing memory usage in dynamic pipelines 2020-01-21 00:38:41 +00:00
gstmsdkdec.h msdk: Fix increasing memory usage in dynamic pipelines 2020-01-21 00:38:41 +00:00
gstmsdkdecproputil.c msdkdec: move output-order out of decode bass class. 2018-11-23 12:26:40 +00:00
gstmsdkdecproputil.h msdkdec: move output-order out of decode bass class. 2018-11-23 12:26:40 +00:00
gstmsdkenc.c msdk: Fix increasing memory usage in dynamic pipelines 2020-01-21 00:38:41 +00:00
gstmsdkenc.h msdk: Fix increasing memory usage in dynamic pipelines 2020-01-21 00:38:41 +00:00
gstmsdkh264dec.c msdk: add Hardware tag to element metadata 2019-02-19 23:44:42 +00:00
gstmsdkh264dec.h msdkdec: move output-order out of decode bass class. 2018-11-23 12:26:40 +00:00
gstmsdkh264enc.c msdkenc: set ROI region for msdk{h264, h265}enc 2020-01-15 00:47:12 +00:00
gstmsdkh264enc.h msdkenc: set ROI region for msdk{h264, h265}enc 2020-01-15 00:47:12 +00:00
gstmsdkh265dec.c msdk: ignore MFX_ERR_UNDEFINED_BEHAVIOR when loading a plugin 2019-12-10 17:23:53 +00:00
gstmsdkh265dec.h msdkdec: move output-order out of decode bass class. 2018-11-23 12:26:40 +00:00
gstmsdkh265enc.c msdkenc: set ROI region for msdk{h264, h265}enc 2020-01-15 00:47:12 +00:00
gstmsdkh265enc.h msdkenc: set ROI region for msdk{h264, h265}enc 2020-01-15 00:47:12 +00:00
gstmsdkmjpegdec.c msdk: Remove all DMABuf caps features on Windows 2019-09-10 13:29:11 +00:00
gstmsdkmjpegdec.h msdk: add mjpeg decoder 2016-12-13 00:06:42 +01:00
gstmsdkmjpegenc.c msdkmjpegenc: convert UYVY to YUY2 instead of NV12 2019-11-02 09:52:36 +00:00
gstmsdkmjpegenc.h msdk: add mjpeg encoder 2016-12-13 00:06:42 +01:00
gstmsdkmpeg2dec.c msdk: add Hardware tag to element metadata 2019-02-19 23:44:42 +00:00
gstmsdkmpeg2dec.h msdkdec: move output-order out of decode bass class. 2018-11-23 12:26:40 +00:00
gstmsdkmpeg2enc.c msdk: add Hardware tag to element metadata 2019-02-19 23:44:42 +00:00
gstmsdkmpeg2enc.h msdk: Create plugin for Intel's Media SDK 2016-11-14 15:16:45 +01:00
gstmsdksystemmemory.c documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
gstmsdksystemmemory.h msdk: supports bufferpool 2018-02-13 13:44:08 -09:00
gstmsdkvc1dec.c documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
gstmsdkvc1dec.h msdkdec: move output-order out of decode bass class. 2018-11-23 12:26:40 +00:00
gstmsdkvideomemory.c documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
gstmsdkvideomemory.h msdk: fix for mfx frame alloc response 2019-09-23 09:58:28 +08:00
gstmsdkvp8dec.c msdk: ignore MFX_ERR_UNDEFINED_BEHAVIOR when loading a plugin 2019-12-10 17:23:53 +00:00
gstmsdkvp8dec.h msdkdec: move output-order out of decode bass class. 2018-11-23 12:26:40 +00:00
gstmsdkvp9dec.c msdk: ignore MFX_ERR_UNDEFINED_BEHAVIOR when loading a plugin 2019-12-10 17:23:53 +00:00
gstmsdkvp9dec.h msdkdec: move output-order out of decode bass class. 2018-11-23 12:26:40 +00:00
gstmsdkvp9enc.c msdkvp9enc: fix 10bit encoding 2020-01-06 03:54:57 +00:00
gstmsdkvp9enc.h msdk: add msdkvp9enc element 2019-07-07 15:16:28 +00:00
gstmsdkvpp.c msdk: Fix increasing memory usage in dynamic pipelines 2020-01-21 00:38:41 +00:00
gstmsdkvpp.h msdk: Fix increasing memory usage in dynamic pipelines 2020-01-21 00:38:41 +00:00
gstmsdkvpputil.c documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
gstmsdkvpputil.h msdk: vpp: Add deinterlacing support 2018-04-03 10:38:52 -08:00
meson.build msdk: Fixes for meson include directory setup 2019-11-17 17:39:44 +00:00
msdk-enums.c msdkvpp: support video-direction property 2019-08-26 16:39:39 +00:00
msdk-enums.h msdk:dec: Add new propery to dump frames in decoded order 2018-05-07 14:12:10 -08:00
msdk.c msdk: ignore MFX_ERR_UNDEFINED_BEHAVIOR when loading a plugin 2019-12-10 17:23:53 +00:00
msdk.h msdk: ignore MFX_ERR_UNDEFINED_BEHAVIOR when loading a plugin 2019-12-10 17:23:53 +00:00
msdk_d3d.c msdk: implements GstMsdkContext. 2018-02-13 12:41:28 -09:00
msdk_libva.c msdk: support for MFX_FOURCC_BGR4 frame allocation 2019-11-02 09:52:36 +00:00
msdk_libva.h msdk: add mfx in include path 2019-01-08 12:59:45 +00:00