From 83408cfdc8a4b0af2680b45604b1688face856af Mon Sep 17 00:00:00 2001 From: He Junyan Date: Tue, 5 Oct 2021 01:45:25 +0800 Subject: [PATCH] va: caps: Expose gst_va_create_coded_caps as helper function. And allow free indentation for array declaration. Part-of: --- subprojects/gst-plugins-bad/sys/va/gstvacaps.c | 10 ++++++---- subprojects/gst-plugins-bad/sys/va/gstvacaps.h | 4 ++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/va/gstvacaps.c b/subprojects/gst-plugins-bad/sys/va/gstvacaps.c index 481311f4a0..17ac0a0f9b 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvacaps.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvacaps.c @@ -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; diff --git a/subprojects/gst-plugins-bad/sys/va/gstvacaps.h b/subprojects/gst-plugins-bad/sys/va/gstvacaps.h index 41301a852d..64fc03fb7c 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvacaps.h +++ b/subprojects/gst-plugins-bad/sys/va/gstvacaps.h @@ -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);