diff options
author | Aurélien Zanelli <aurelien.zanelli@darkosphere.fr> | 2014-11-01 22:39:41 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-11-12 12:04:42 +0100 |
commit | 4f537dc7f83718d7f233c93f6c23ef6ddcaeef49 (patch) | |
tree | 69c3654371fb5ca7faac9095a959ef67977a4448 | |
parent | 4588123170148f17477e1e3475c1304e32f2ffae (diff) | |
download | gstreamer-plugins-good-4f537dc7f83718d7f233c93f6c23ef6ddcaeef49.tar.gz |
vpx: mark arnr-type properties as deprecated and set them to no-op
ARNR type control in libvpx has been deprecated so this commit mark the
vp8enc and vp9enc associated properties as deprecated and change their
behavior to just display a warning message.
https://bugzilla.gnome.org/show_bug.cgi?id=739476
-rw-r--r-- | ext/vpx/gstvp8enc.c | 20 | ||||
-rw-r--r-- | ext/vpx/gstvp9enc.c | 20 |
2 files changed, 8 insertions, 32 deletions
diff --git a/ext/vpx/gstvp8enc.c b/ext/vpx/gstvp8enc.c index ed0bee3bb..06b2bd02f 100644 --- a/ext/vpx/gstvp8enc.c +++ b/ext/vpx/gstvp8enc.c @@ -683,7 +683,8 @@ gst_vp8_enc_class_init (GstVP8EncClass * klass) g_param_spec_int ("arnr-type", "AltRef type", "AltRef type", 1, 3, DEFAULT_ARNR_TYPE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | + G_PARAM_DEPRECATED))); g_object_class_install_property (gobject_class, PROP_TUNING, g_param_spec_enum ("tuning", "Tuning", @@ -1127,15 +1128,8 @@ gst_vp8_enc_set_property (GObject * object, guint prop_id, break; case PROP_ARNR_TYPE: gst_vp8_enc->arnr_type = g_value_get_int (value); - if (gst_vp8_enc->inited) { - status = vpx_codec_control (&gst_vp8_enc->encoder, VP8E_SET_ARNR_TYPE, - gst_vp8_enc->arnr_type); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp8_enc, - "Failed to set VP8E_SET_ARNR_TYPE: %s", - gst_vpx_error_name (status)); - } - } + g_warning ("arnr-type is a no-op since control has been deprecated " + "in libvpx"); break; case PROP_TUNING: gst_vp8_enc->tuning = g_value_get_enum (value); @@ -1666,12 +1660,6 @@ gst_vp8_enc_set_format (GstVideoEncoder * video_encoder, "Failed to set VP8E_SET_ARNR_STRENGTH: %s", gst_vpx_error_name (status)); } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_ARNR_TYPE, - encoder->arnr_type); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_ARNR_TYPE: %s", gst_vpx_error_name (status)); - } status = vpx_codec_control (&encoder->encoder, VP8E_SET_TUNING, encoder->tuning); if (status != VPX_CODEC_OK) { diff --git a/ext/vpx/gstvp9enc.c b/ext/vpx/gstvp9enc.c index 58c98c74e..d08a88f75 100644 --- a/ext/vpx/gstvp9enc.c +++ b/ext/vpx/gstvp9enc.c @@ -658,7 +658,8 @@ gst_vp9_enc_class_init (GstVP9EncClass * klass) g_param_spec_int ("arnr-type", "AltRef type", "AltRef type", 1, 3, DEFAULT_ARNR_TYPE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | + G_PARAM_DEPRECATED))); g_object_class_install_property (gobject_class, PROP_TUNING, g_param_spec_enum ("tuning", "Tuning", @@ -1104,15 +1105,8 @@ gst_vp9_enc_set_property (GObject * object, guint prop_id, break; case PROP_ARNR_TYPE: gst_vp9_enc->arnr_type = g_value_get_int (value); - if (gst_vp9_enc->inited) { - status = vpx_codec_control (&gst_vp9_enc->encoder, VP8E_SET_ARNR_TYPE, - gst_vp9_enc->arnr_type); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp9_enc, - "Failed to set VP8E_SET_ARNR_TYPE: %s", - gst_vpx_error_name (status)); - } - } + g_warning ("arnr-type is a no-op since control has been deprecated " + "in libvpx"); break; case PROP_TUNING: gst_vp9_enc->tuning = g_value_get_enum (value); @@ -1645,12 +1639,6 @@ gst_vp9_enc_set_format (GstVideoEncoder * video_encoder, "Failed to set VP8E_SET_ARNR_STRENGTH: %s", gst_vpx_error_name (status)); } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_ARNR_TYPE, - encoder->arnr_type); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_ARNR_TYPE: %s", gst_vpx_error_name (status)); - } status = vpx_codec_control (&encoder->encoder, VP8E_SET_TUNING, encoder->tuning); if (status != VPX_CODEC_OK) { |