va: caps: Expose gst_va_create_coded_caps as helper function.

And allow free indentation for array declaration.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>
This commit is contained in:
He Junyan 2021-10-05 01:45:25 +08:00 committed by Víctor Manuel Jáquez Leal
parent 1defc9ce6b
commit 83408cfdc8
2 changed files with 10 additions and 4 deletions

View file

@ -261,16 +261,18 @@ gst_va_create_raw_caps (GstVaDisplay * display, VAProfile profile,
return caps;
}
static GstCaps *
GstCaps *
gst_va_create_coded_caps (GstVaDisplay * display, VAProfile profile,
VAEntrypoint entrypoint, guint32 * rt_formats_ptr)
{
GstCaps *caps;
/* *INDENT-OFF* */
VAConfigAttrib attribs[] = {
{.type = VAConfigAttribMaxPictureWidth,},
{.type = VAConfigAttribMaxPictureHeight,},
{.type = VAConfigAttribRTFormat,},
{ .type = VAConfigAttribMaxPictureWidth, },
{ .type = VAConfigAttribMaxPictureHeight, },
{ .type = VAConfigAttribRTFormat, },
};
/* *INDENT-ON* */
VADisplay dpy;
VAStatus status;
guint32 value, rt_formats = 0;

View file

@ -37,6 +37,10 @@ VASurfaceAttrib * gst_va_get_surface_attribs (GstVaDisplay * displa
GstCaps * gst_va_create_raw_caps_from_config (GstVaDisplay * display,
VAConfigID config);
GstCaps * gst_va_create_coded_caps (GstVaDisplay * display,
VAProfile profile,
VAEntrypoint entrypoint,
guint32 * rt_formats_ptr);
gboolean gst_caps_set_format_array (GstCaps * caps,
GArray * formats);