summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>2016-03-29 14:25:55 +0200
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>2016-03-30 16:55:26 +0200
commitd4f00383ed7f944eb55e780c15b6f39464097dcf (patch)
treee96a5c426aaca6ea09be9b1d9d91e495d5df780d
parentfe08f7ecdc788c1060eee57b7a69c8a46301239e (diff)
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.
-rw-r--r--gst/vaapi/gstvaapiencode_h264.c2
-rw-r--r--gst/vaapi/gstvaapiencode_h265.c2
-rw-r--r--gst/vaapi/gstvaapiencode_jpeg.c2
-rw-r--r--gst/vaapi/gstvaapiencode_mpeg2.c2
-rw-r--r--gst/vaapi/gstvaapiencode_vp8.c2
-rw-r--r--gst/vaapi/gstvaapipluginutil.h4
-rw-r--r--gst/vaapi/gstvaapisink.c4
7 files changed, 7 insertions, 11 deletions
diff --git a/gst/vaapi/gstvaapiencode_h264.c b/gst/vaapi/gstvaapiencode_h264.c
index b4027ab1..ba7a1e52 100644
--- a/gst/vaapi/gstvaapiencode_h264.c
+++ b/gst/vaapi/gstvaapiencode_h264.c
@@ -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;
diff --git a/gst/vaapi/gstvaapiencode_h265.c b/gst/vaapi/gstvaapiencode_h265.c
index b5e5bf7c..f48adbf4 100644
--- a/gst/vaapi/gstvaapiencode_h265.c
+++ b/gst/vaapi/gstvaapiencode_h265.c
@@ -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;
diff --git a/gst/vaapi/gstvaapiencode_jpeg.c b/gst/vaapi/gstvaapiencode_jpeg.c
index 902a12f6..58c057ae 100644
--- a/gst/vaapi/gstvaapiencode_jpeg.c
+++ b/gst/vaapi/gstvaapiencode_jpeg.c
@@ -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;
diff --git a/gst/vaapi/gstvaapiencode_mpeg2.c b/gst/vaapi/gstvaapiencode_mpeg2.c
index 791adff3..c060061f 100644
--- a/gst/vaapi/gstvaapiencode_mpeg2.c
+++ b/gst/vaapi/gstvaapiencode_mpeg2.c
@@ -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;
diff --git a/gst/vaapi/gstvaapiencode_vp8.c b/gst/vaapi/gstvaapiencode_vp8.c
index db5ead4e..cc9beb36 100644
--- a/gst/vaapi/gstvaapiencode_vp8.c
+++ b/gst/vaapi/gstvaapiencode_vp8.c
@@ -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;
diff --git a/gst/vaapi/gstvaapipluginutil.h b/gst/vaapi/gstvaapipluginutil.h
index 58db50f6..0e62b1f0 100644
--- a/gst/vaapi/gstvaapipluginutil.h
+++ b/gst/vaapi/gstvaapipluginutil.h
@@ -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 }")
diff --git a/gst/vaapi/gstvaapisink.c b/gst/vaapi/gstvaapisink.c
index 638c8d82..8d7b6e0c 100644
--- a/gst/vaapi/gstvaapisink.c
+++ b/gst/vaapi/gstvaapisink.c
@@ -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 }");