mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
vaapidecodebin: expose deinterlace-method property from inner vaapipostproc
https://bugzilla.gnome.org/show_bug.cgi?id=745901
This commit is contained in:
parent
eb510e23ce
commit
76060c9542
2 changed files with 22 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue