msdk: add function to get the format list

This static format list will be used to check the formats
supported by the platform.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4177>
This commit is contained in:
Yinhang Liu 2022-11-15 18:08:12 +08:00 committed by GStreamer Marge Bot
parent 97e081c9d6
commit 3f47cdaee8
2 changed files with 19 additions and 0 deletions

View file

@ -595,6 +595,22 @@ gst_msdk_get_video_format_from_mfx_fourcc (mfxU32 fourcc)
return GST_VIDEO_FORMAT_UNKNOWN;
}
void
gst_msdk_get_video_format_list (GValue * formats)
{
GValue gfmt = G_VALUE_INIT;
const struct map *m = gst_msdk_video_format_to_mfx_map;
g_value_init (&gfmt, G_TYPE_UINT);
for (; m->format != 0; m++) {
g_value_set_uint (&gfmt, m->format);
gst_value_list_append_value (formats, &gfmt);
}
g_value_unset (&gfmt);
}
void
gst_msdk_update_mfx_frame_info_from_mfx_video_param (mfxFrameInfo * mfx_info,
mfxVideoParam * param)

View file

@ -136,6 +136,9 @@ gst_msdk_is_va_mem (GstMemory * mem);
GstVideoFormat
gst_msdk_get_video_format_from_mfx_fourcc (mfxU32 fourcc);
void
gst_msdk_get_video_format_list (GValue * formats);
void
gst_msdk_update_mfx_frame_info_from_mfx_video_param (mfxFrameInfo * mfx_info,
mfxVideoParam * param);