diff options
author | Jacobo Aragunde Pérez <jaragunde@igalia.com> | 2015-04-29 16:34:07 +0200 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> | 2015-06-25 16:16:45 +0200 |
commit | 76060c9542847a93edc6912dc21a4ef8f162dd75 (patch) | |
tree | 81d5cf3b2cc8cb10c309a1951f8d8f219d007cc4 | |
parent | eb510e23cecd02ffc9c3906807487fa1d156e627 (diff) |
vaapidecodebin: expose deinterlace-method property from inner vaapipostproc
https://bugzilla.gnome.org/show_bug.cgi?id=745901
-rw-r--r-- | gst/vaapi/gstvaapidecodebin.c | 20 | ||||
-rw-r--r-- | gst/vaapi/gstvaapidecodebin.h | 3 |
2 files changed, 22 insertions, 1 deletions
diff --git a/gst/vaapi/gstvaapidecodebin.c b/gst/vaapi/gstvaapidecodebin.c index 27d0f4ad..840548f3 100644 --- a/gst/vaapi/gstvaapidecodebin.c +++ b/gst/vaapi/gstvaapidecodebin.c @@ -37,13 +37,15 @@ GST_DEBUG_CATEGORY_STATIC (gst_debug_vaapi_decode_bin); #define DEFAULT_QUEUE_MAX_SIZE_BUFFERS 0 #define DEFAULT_QUEUE_MAX_SIZE_BYTES 0 #define DEFAULT_QUEUE_MAX_SIZE_TIME 0 +#define DEFAULT_DEINTERLACE_METHOD GST_VAAPI_DEINTERLACE_METHOD_BOB enum { PROP_0, PROP_MAX_SIZE_BUFFERS, PROP_MAX_SIZE_BYTES, - PROP_MAX_SIZE_TIME + PROP_MAX_SIZE_TIME, + PROP_DEINTERLACE_METHOD }; #define GST_VAAPI_DECODE_BIN_SURFACE_CAPS \ @@ -120,6 +122,11 @@ gst_vaapi_decode_bin_set_property (GObject * object, g_object_set (G_OBJECT (vaapidecbin->queue), "max-size-time", vaapidecbin->max_size_time, NULL); break; + case PROP_DEINTERLACE_METHOD: + vaapidecbin->deinterlace_method = g_value_get_enum (value); + g_object_set (G_OBJECT (vaapidecbin->postproc), "deinterlace-method", + vaapidecbin->deinterlace_method, NULL); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -142,6 +149,9 @@ gst_vaapi_decode_bin_get_property (GObject * object, case PROP_MAX_SIZE_TIME: g_value_set_uint64 (value, vaapidecbin->max_size_time); break; + case PROP_DEINTERLACE_METHOD: + g_value_set_enum (value, vaapidecbin->deinterlace_method); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -181,6 +191,11 @@ gst_vaapi_decode_bin_class_init (GstVaapiDecodeBinClass * klass) "Max. amount of data in the queue (in ns, 0=disable)", 0, G_MAXUINT64, DEFAULT_QUEUE_MAX_SIZE_TIME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_DEINTERLACE_METHOD, + g_param_spec_enum ("deinterlace-method", "Deinterlace method", + "Deinterlace method to use", GST_VAAPI_TYPE_DEINTERLACE_METHOD, + DEFAULT_DEINTERLACE_METHOD, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_vaapi_decode_bin_sink_factory)); @@ -223,6 +238,9 @@ gst_vaapi_decode_bin_configure (GstVaapiDecodeBin * vaapidecbin) "max-size-buffers", vaapidecbin->max_size_buffers, "max-size-time", vaapidecbin->max_size_time, NULL); + g_object_set (G_OBJECT (vaapidecbin->postproc), + "deinterlace-method", vaapidecbin->deinterlace_method, NULL); + gst_bin_add_many (GST_BIN (vaapidecbin), vaapidecbin->decoder, vaapidecbin->queue, vaapidecbin->postproc, NULL); diff --git a/gst/vaapi/gstvaapidecodebin.h b/gst/vaapi/gstvaapidecodebin.h index 4d3acfdb..928683fc 100644 --- a/gst/vaapi/gstvaapidecodebin.h +++ b/gst/vaapi/gstvaapidecodebin.h @@ -23,6 +23,8 @@ #ifndef GST_VAAPI_DECODE_BIN_H #define GST_VAAPI_DECODE_BIN_H +#include <gst/vaapi/gstvaapifilter.h> + G_BEGIN_DECLS #define GST_TYPE_VAAPI_DECODE_BIN (gst_vaapi_decode_bin_get_type ()) @@ -49,6 +51,7 @@ typedef struct _GstVaapiDecodeBin { guint max_size_buffers; guint max_size_bytes; guint64 max_size_time; + GstVaapiDeinterlaceMethod deinterlace_method; } GstVaapiDecodeBin; |