va: caps: Expose gst_va_create_coded_caps as helper function.
authorHe Junyan <junyan.he@intel.com>
Mon, 4 Oct 2021 17:45:25 +0000 (01:45 +0800)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tue, 1 Mar 2022 09:53:50 +0000 (10:53 +0100)
And allow free indentation for array declaration.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>

subprojects/gst-plugins-bad/sys/va/gstvacaps.c
subprojects/gst-plugins-bad/sys/va/gstvacaps.h

index 481311f..17ac0a0 100644 (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;
index 41301a8..64fc03f 100644 (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);