mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
msdkallocator_d3d: implement GetHDL callback function
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>
This commit is contained in:
parent
86d22b2e38
commit
7f18f11a90
1 changed files with 11 additions and 0 deletions
|
@ -60,6 +60,17 @@ gst_msdk_frame_unlock (mfxHDL pthis, mfxMemId mid, mfxFrameData * ptr)
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue