Factor out VA surface caps.

This commit is contained in:
gb 2010-05-07 06:35:31 +00:00 committed by Gwenole Beauchesne
parent 4a485200b9
commit 80e5b1ba17
4 changed files with 14 additions and 10 deletions

View file

@ -33,6 +33,17 @@ typedef enum _GstVaapiChromaType GstVaapiChromaType;
typedef enum _GstVaapiSurfaceStatus GstVaapiSurfaceStatus; typedef enum _GstVaapiSurfaceStatus GstVaapiSurfaceStatus;
typedef enum _GstVaapiSurfaceRenderFlags GstVaapiSurfaceRenderFlags; 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: * GstVaapiChromaType:
* @GST_VAAPI_CHROMA_TYPE_YUV420: 4:2:0 chroma format * @GST_VAAPI_CHROMA_TYPE_YUV420: 4:2:0 chroma format

View file

@ -53,9 +53,7 @@ static const char gst_vaapiconvert_yuv_caps_str[] =
"height = (int) [ 1, MAX ]; "; "height = (int) [ 1, MAX ]; ";
static const char gst_vaapiconvert_vaapi_caps_str[] = static const char gst_vaapiconvert_vaapi_caps_str[] =
"video/x-vaapi-surface, " GST_VAAPI_SURFACE_CAPS;
"width = (int) [ 1, MAX ], "
"height = (int) [ 1, MAX ]; ";
static GstStaticPadTemplate gst_vaapiconvert_sink_factory = static GstStaticPadTemplate gst_vaapiconvert_sink_factory =
GST_STATIC_PAD_TEMPLATE( GST_STATIC_PAD_TEMPLATE(

View file

@ -63,9 +63,7 @@ static const char gst_vaapidecode_sink_caps_str[] =
; ;
static const char gst_vaapidecode_src_caps_str[] = static const char gst_vaapidecode_src_caps_str[] =
"video/x-vaapi-surface, " GST_VAAPI_SURFACE_CAPS;
"width = (int) [ 1, MAX ], "
"height = (int) [ 1, MAX ]; ";
static GstStaticPadTemplate gst_vaapidecode_sink_factory = static GstStaticPadTemplate gst_vaapidecode_sink_factory =
GST_STATIC_PAD_TEMPLATE( GST_STATIC_PAD_TEMPLATE(

View file

@ -60,10 +60,7 @@ static GstStaticPadTemplate gst_vaapisink_sink_factory =
"sink", "sink",
GST_PAD_SINK, GST_PAD_SINK,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_STATIC_CAPS( GST_STATIC_CAPS(GST_VAAPI_SURFACE_CAPS));
"video/x-vaapi-surface, "
"width = (int) [ 1, MAX ], "
"height = (int) [ 1, MAX ]; "));
static void gst_vaapisink_iface_init(GType type); static void gst_vaapisink_iface_init(GType type);