unify caps template for VAAPI encoders and decoders

There is no difference in VAAPI surface caps between encoders and decoders.
Thus, the patch makes a simplification by removing encoders specific caps and
shares the same definition of VAAPI surfaces caps for all the elements.
This commit is contained in:
Víctor Manuel Jáquez Leal 2016-03-29 14:25:55 +02:00
parent fe08f7ecdc
commit d4f00383ed
7 changed files with 7 additions and 11 deletions

View file

@ -56,7 +56,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_vaapi_h264_encode_debug);
/* *INDENT-OFF* */
static const char gst_vaapiencode_h264_sink_caps_str[] =
GST_VAAPI_MAKE_ENC_SURFACE_CAPS ", "
GST_VAAPI_MAKE_SURFACE_CAPS ", "
GST_CAPS_INTERLACED_FALSE "; "
GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL) ", "
GST_CAPS_INTERLACED_FALSE;

View file

@ -55,7 +55,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_vaapi_h265_encode_debug);
/* *INDENT-OFF* */
static const char gst_vaapiencode_h265_sink_caps_str[] =
GST_VAAPI_MAKE_ENC_SURFACE_CAPS ", "
GST_VAAPI_MAKE_SURFACE_CAPS ", "
GST_CAPS_INTERLACED_FALSE "; "
GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL) ", "
GST_CAPS_INTERLACED_FALSE;

View file

@ -52,7 +52,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_vaapi_jpeg_encode_debug);
/* *INDENT-OFF* */
static const char gst_vaapiencode_jpeg_sink_caps_str[] =
GST_VAAPI_MAKE_ENC_SURFACE_CAPS ", "
GST_VAAPI_MAKE_SURFACE_CAPS ", "
GST_CAPS_INTERLACED_FALSE "; "
GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL) ", "
GST_CAPS_INTERLACED_FALSE;

View file

@ -54,7 +54,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_vaapi_mpeg2_encode_debug);
/* *INDENT-OFF* */
static const char gst_vaapiencode_mpeg2_sink_caps_str[] =
GST_VAAPI_MAKE_ENC_SURFACE_CAPS ", "
GST_VAAPI_MAKE_SURFACE_CAPS ", "
GST_CAPS_INTERLACED_FALSE "; "
GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL) ", "
GST_CAPS_INTERLACED_FALSE;

View file

@ -52,7 +52,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_vaapi_vp8_encode_debug);
/* *INDENT-OFF* */
static const char gst_vaapiencode_vp8_sink_caps_str[] =
GST_VAAPI_MAKE_ENC_SURFACE_CAPS ", "
GST_VAAPI_MAKE_SURFACE_CAPS ", "
GST_CAPS_INTERLACED_FALSE "; "
GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL) ", "
GST_CAPS_INTERLACED_FALSE;

View file

@ -106,10 +106,6 @@ gst_vaapi_caps_feature_contains (const GstCaps * caps,
GST_VIDEO_CAPS_MAKE_WITH_FEATURES( \
GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE, "{ ENCODED, NV12, I420, YV12, P010_10LE }")
#define GST_VAAPI_MAKE_ENC_SURFACE_CAPS \
GST_VIDEO_CAPS_MAKE_WITH_FEATURES( \
GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE, "{ ENCODED, NV12, I420, YV12, P010_10LE }")
#define GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS \
GST_VIDEO_CAPS_MAKE_WITH_FEATURES( \
GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META, "{ RGBA, BGRA }")

View file

@ -64,7 +64,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_debug_vaapisink);
/* Default template */
/* *INDENT-OFF* */
static const char gst_vaapisink_sink_caps_str[] =
GST_VAAPI_MAKE_ENC_SURFACE_CAPS ";"
GST_VAAPI_MAKE_SURFACE_CAPS ";"
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (
GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE ","
GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
@ -1215,7 +1215,7 @@ gst_vaapisink_get_caps_impl (GstBaseSink * base_sink)
GstVaapiSink *const sink = GST_VAAPISINK_CAST (base_sink);
GstCaps *out_caps, *raw_caps;
static const char surface_caps_str[] =
GST_VAAPI_MAKE_ENC_SURFACE_CAPS ";"
GST_VAAPI_MAKE_SURFACE_CAPS ";"
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE
"," GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
"{ ENCODED, NV12, I420, YV12 }");