gstreamer/sys
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
..
androidmedia androidmedia: Add new effects and scene modes to Camera parameters 2019-11-19 07:54:16 +01:00
applemedia avfvideosrc: element requests camera permissions even with capture-screen property is true 2019-12-11 17:31:03 +00:00
bluez Remove autotools build system 2019-10-14 13:54:27 +01:00
d3d11 d3d11h265dec: Fix wrong NoRaslOutputFlag setting 2020-01-14 08:47:30 +00:00
d3dvideosink d3dvideosink: hold class lock for entire duration of class destruction 2019-12-18 13:15:06 -05:00
decklink decklink: Silence no driver / no SO messages 2020-01-10 08:00:05 +00:00
directsound bad: use of g_value_dup_string 2019-12-30 14:13:03 +00:00
dshowdecwrapper documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
dshowsrcwrapper bad: use of g_value_dup_string 2019-12-30 14:13:03 +00:00
dshowvideosink documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
dvb Don't pass default GLib marshallers for signals 2019-11-06 14:27:46 +00:00
fbdev Remove autotools build system 2019-10-14 13:54:27 +01:00
ipcpipeline ipcpipeline: Minimal fixes that allow building with MSVC 2020-01-14 09:23:02 +05:30
kms kmssink: Do not drain if imported buffer are from KMS 2019-11-11 22:20:28 +00:00
magicleap mlaudiosink: Fix crash when stopping pipeline 2019-12-06 15:29:29 +00:00
msdk msdk: Fix increasing memory usage in dynamic pipelines 2020-01-21 00:38:41 +00:00
nvcodec nvcodec: Print debug info when initializing nvenc 2020-01-20 17:15:55 +05:30
opensles Remove autotools build system 2019-10-14 13:54:27 +01:00
shm Don't pass default GLib marshallers for signals 2019-11-06 14:27:46 +00:00
tinyalsa Remove autotools build system 2019-10-14 13:54:27 +01:00
uvch264 remove various useless linefeed in logs 2019-12-11 10:51:29 +01:00
wasapi wasapisrc: Correctly handle BUFFERFLAGS_SILENT 2019-11-28 08:59:41 +00:00
winks documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
winscreencap documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
meson.build Add mlaudiosink element 2019-12-06 15:29:29 +00:00