Factor out VA surface caps.
authorgb <gb@5584edef-b1fe-4b99-b61b-dd2bab72e969>
Fri, 7 May 2010 06:35:31 +0000 (06:35 +0000)
committerGwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Mon, 20 Sep 2010 10:55:44 +0000 (12:55 +0200)
gst-libs/gst/vaapi/gstvaapisurface.h
gst/vaapiconvert/gstvaapiconvert.c
gst/vaapidecode/gstvaapidecode.c
gst/vaapisink/gstvaapisink.c

index 0cb2775..11fc355 100644 (file)
@@ -34,6 +34,17 @@ typedef enum _GstVaapiSurfaceStatus             GstVaapiSurfaceStatus;
 typedef enum _GstVaapiSurfaceRenderFlags        GstVaapiSurfaceRenderFlags;
 
 /**
+ * GST_VAAPI_SURFACE_CAPS:
+ *
+ * Generic caps for VA surfaces.
+ */
+#define GST_VAAPI_SURFACE_CAPS          \
+    "video/x-vaapi-surface, "           \
+    "width  = (int) [ 1, MAX ],"        \
+    "height = (int) [ 1, MAX ],"        \
+    "framerate = (fraction) [ 0, MAX ]"
+
+/**
  * GstVaapiChromaType:
  * @GST_VAAPI_CHROMA_TYPE_YUV420: 4:2:0 chroma format
  * @GST_VAAPI_CHROMA_TYPE_YUV422: 4:2:2 chroma format
index 352e0e6..652974e 100644 (file)
@@ -53,9 +53,7 @@ static const char gst_vaapiconvert_yuv_caps_str[] =
     "height = (int) [ 1, MAX ]; ";
 
 static const char gst_vaapiconvert_vaapi_caps_str[] =
-    "video/x-vaapi-surface, "
-    "width = (int) [ 1, MAX ], "
-    "height = (int) [ 1, MAX ]; ";
+    GST_VAAPI_SURFACE_CAPS;
 
 static GstStaticPadTemplate gst_vaapiconvert_sink_factory =
     GST_STATIC_PAD_TEMPLATE(
index dd1f2ab..1916656 100644 (file)
@@ -63,9 +63,7 @@ static const char gst_vaapidecode_sink_caps_str[] =
     ;
 
 static const char gst_vaapidecode_src_caps_str[] =
-    "video/x-vaapi-surface, "
-    "width = (int) [ 1, MAX ], "
-    "height = (int) [ 1, MAX ]; ";
+    GST_VAAPI_SURFACE_CAPS;
 
 static GstStaticPadTemplate gst_vaapidecode_sink_factory =
     GST_STATIC_PAD_TEMPLATE(
index c849f18..25da39f 100644 (file)
@@ -60,10 +60,7 @@ static GstStaticPadTemplate gst_vaapisink_sink_factory =
         "sink",
         GST_PAD_SINK,
         GST_PAD_ALWAYS,
-        GST_STATIC_CAPS(
-            "video/x-vaapi-surface, "
-            "width = (int) [ 1, MAX ], "
-            "height = (int) [ 1, MAX ]; "));
+        GST_STATIC_CAPS(GST_VAAPI_SURFACE_CAPS));
 
 static void gst_vaapisink_iface_init(GType type);