mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
b08b8ddae3
Currently a gst buffer has one mfxFrameSurface when it's allocated and can't be changed. This is based on that the life of gst buffer and mfxFrameSurface would be same. But it's not true. Sometimes even if a gst buffer of a frame is finished on downstream, mfxFramesurface coupled with the gst buffer is still locked, which means it's still being used in the driver. So this patch does this. Every time a gst buffer is acquired from the pool, it confirms if the surface coupled with the buffer is unlocked. If not, replace it with new unlocked one. In this way, user(decoder or encoder) doesn't need to manage gst buffers including locked surface. To do that, this patch includes the following: 1. GstMsdkContext - Manages MSDK surfaces available, used, locked respectively as the following: 1\ surfaces_avail : surfaces which are free and unused anywhere 2\ surfaces_used : surfaces coupled with a gst buffer and being used now. 3\ surfaces_locked : surfaces still locked even after the gst buffer is released. - Provide an api to get MSDK surface available. - Provide an api to release MSDK surface. 2. GstMsdkVideoMemory - Gets a surface available when it's allocated. - Provide an api to get an available surface with new unlocked one. - Provide an api to release surface in the msdk video memory. 3. GstMsdkBufferPool - In acquire_buffer, every time a gst buffer is acquired, get new available surface from the list. - In release_buffer, it confirms if the buffer's surface is unlocked or not. - If unlocked, it is put to the available list. - If still locked, it is put to the locked list. This also fixes bug #793525. https://bugzilla.gnome.org/show_bug.cgi?id=793413 https://bugzilla.gnome.org/show_bug.cgi?id=793525 |
||
---|---|---|
.. | ||
gstmsdk.c | ||
gstmsdkallocator.h | ||
gstmsdkallocator_d3d.c | ||
gstmsdkallocator_libva.c | ||
gstmsdkbufferpool.c | ||
gstmsdkbufferpool.h | ||
gstmsdkcontext.c | ||
gstmsdkcontext.h | ||
gstmsdkcontextutil.c | ||
gstmsdkcontextutil.h | ||
gstmsdkdec.c | ||
gstmsdkdec.h | ||
gstmsdkenc.c | ||
gstmsdkenc.h | ||
gstmsdkh264dec.c | ||
gstmsdkh264dec.h | ||
gstmsdkh264enc.c | ||
gstmsdkh264enc.h | ||
gstmsdkh265dec.c | ||
gstmsdkh265dec.h | ||
gstmsdkh265enc.c | ||
gstmsdkh265enc.h | ||
gstmsdkmjpegdec.c | ||
gstmsdkmjpegdec.h | ||
gstmsdkmjpegenc.c | ||
gstmsdkmjpegenc.h | ||
gstmsdkmpeg2dec.c | ||
gstmsdkmpeg2dec.h | ||
gstmsdkmpeg2enc.c | ||
gstmsdkmpeg2enc.h | ||
gstmsdksystemmemory.c | ||
gstmsdksystemmemory.h | ||
gstmsdkvc1dec.c | ||
gstmsdkvc1dec.h | ||
gstmsdkvideomemory.c | ||
gstmsdkvideomemory.h | ||
gstmsdkvp8dec.c | ||
gstmsdkvp8dec.h | ||
gstmsdkvp8enc.c | ||
gstmsdkvp8enc.h | ||
Makefile.am | ||
meson.build | ||
msdk-enums.c | ||
msdk-enums.h | ||
msdk.c | ||
msdk.h | ||
msdk_d3d.c | ||
msdk_libva.c | ||
msdk_libva.h | ||
README |
# gst-msdk gst-msdk is a plugin for [Intel Media SDK](https://software.intel.com/en-us/media-sdk), a cross-platform API for developing media applications. The plugin has multiple elements for video hardware encoding leveraging latest Intel processors through Intel Media SDK. - MPEG2 encoding (*msdkmpeg2enc*) - H.264 encoding (*msdkh264enc*) - H.265 encoding (*msdkh265enc*) - VP8 encoding (*msdkvp8enc*) It requires: - Intel Media SDK # Giving it a try Encoding a simple video test source and saving it to a file. $ gst-launch-1.0 videotestsrc ! msdkh264enc ! filesink location=test.h264 # License gst-mdk is freely available for download under the terms of the [BSD-3-Clause License](https://spdx.org/licenses/BSD-3-Clause.html).