msdkvpp: Import buffer to msdk_surface
authorMengkejiergeli Ba <mengkejiergeli.ba@intel.com>
Mon, 9 May 2022 10:34:38 +0000 (18:34 +0800)
committerMengkejiergeli Ba <mengkejiergeli.ba@intel.com>
Fri, 2 Sep 2022 03:06:29 +0000 (11:06 +0800)
commit4c6b7194451ff6fbfe88834219d982302114d74b
tree8e9779b0ceb301e702d2ad3e47dff43ef7322e6d
parent45819899c301c92c65a2d47732f7349b766e6c3b
msdkvpp: Import buffer to msdk_surface

If the buffer is not msdk_buffer, we can try to directly import the
attached memory (i.e. va mem and dmabuf mem) by applying the common
uitl function: import_to_msdk_function ().

Here add a flag "from_qdata" in GstMsdkSurface to handle the cropping case,
we should avoid updating the crop values when msdk_surface is from the
memory's qdata, because the crop info from this surface is the already
updated one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2498>
subprojects/gst-plugins-bad/sys/msdk/gstmsdkallocator.h
subprojects/gst-plugins-bad/sys/msdk/gstmsdkallocator_libva.c
subprojects/gst-plugins-bad/sys/msdk/gstmsdkvpp.c