summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororestisf <orestisf1993@gmail.com>2017-07-25 22:01:37 +0300
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-08-03 17:07:01 +0200
commitbd040adb9c93efd2f30154a6e11a2ac46c6b9462 (patch)
tree1a6d4f169a64c80f3d13659bd5277b3a43ceba39
parenta1fc1e9822a9ac03e3740b7a239fa65523a5e1ad (diff)
vaapidecode_props: h264: add base-only property
https://bugzilla.gnome.org/show_bug.cgi?id=732265
-rw-r--r--gst/vaapi/gstvaapidecode_props.c12
-rw-r--r--gst/vaapi/gstvaapidecode_props.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/gst/vaapi/gstvaapidecode_props.c b/gst/vaapi/gstvaapidecode_props.c
index 0ca37aae..3bc634ad 100644
--- a/gst/vaapi/gstvaapidecode_props.c
+++ b/gst/vaapi/gstvaapidecode_props.c
@@ -29,6 +29,7 @@
enum
{
GST_VAAPI_DECODER_H264_PROP_FORCE_LOW_LATENCY = 1,
+ GST_VAAPI_DECODER_H264_PROP_BASE_ONLY
};
static gint h264_private_offset;
@@ -45,6 +46,9 @@ gst_vaapi_decode_h264_get_property (GObject * object, guint prop_id,
case GST_VAAPI_DECODER_H264_PROP_FORCE_LOW_LATENCY:
g_value_set_boolean (value, priv->is_low_latency);
break;
+ case GST_VAAPI_DECODER_H264_PROP_BASE_ONLY:
+ g_value_set_boolean (value, priv->base_only);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -67,6 +71,9 @@ gst_vaapi_decode_h264_set_property (GObject * object, guint prop_id,
if (decoder)
gst_vaapi_decoder_h264_set_low_latency (decoder, priv->is_low_latency);
break;
+ case GST_VAAPI_DECODER_H264_PROP_BASE_ONLY:
+ priv->base_only = g_value_get_boolean (value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -88,6 +95,11 @@ gst_vaapi_decode_h264_install_properties (GObjectClass * klass)
"When enabled, frames will be pushed as soon as they are available. "
"It might violate the H.264 spec.", FALSE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT));
+
+ g_object_class_install_property (klass, GST_VAAPI_DECODER_H264_PROP_BASE_ONLY,
+ g_param_spec_boolean ("base-only", "Decode base view only",
+ "Drop any NAL unit not defined in Annex.A", FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}
GstVaapiDecodeH264Private *
diff --git a/gst/vaapi/gstvaapidecode_props.h b/gst/vaapi/gstvaapidecode_props.h
index 877754f7..b1f2fec6 100644
--- a/gst/vaapi/gstvaapidecode_props.h
+++ b/gst/vaapi/gstvaapidecode_props.h
@@ -33,6 +33,7 @@ typedef struct _GstVaapiDecodeH264Private GstVaapiDecodeH264Private;
struct _GstVaapiDecodeH264Private
{
gboolean is_low_latency;
+ gboolean base_only;
};
void