During encoding process, oneVPL runtime will call GetHDL callback function.
This patch implements this function for the use of msdk.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3231>
mfxStatus
gst_msdk_frame_get_hdl (mfxHDL pthis, mfxMemId mid, mfxHDL * hdl)
{
+ GstMsdkMemoryID *mem_id;
+ mfxHDLPair *pair;
+
+ if (!hdl || !mid)
+ return MFX_ERR_INVALID_HANDLE;
+
+ mem_id = (GstMsdkMemoryID *) mid;
+ pair = (mfxHDLPair *) hdl;
+ pair->first = (mfxHDL) mem_id->texture;
+ pair->second = (mfxHDL) GUINT_TO_POINTER (mem_id->subresource_index);
+
return MFX_ERR_NONE;
}