From 3956f5addc0d1bbd8c1219e320a955969607b073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 2 Nov 2014 16:51:23 +0000 Subject: [PATCH] Sprinkle some G_PARAM_DEPRECATED and #ifndef GST_REMOVE_DEPRECATED --- ext/jpeg/gstjpegdec.c | 10 +++++++--- gst/isomp4/gstqtmux.c | 8 +++++--- gst/level/gstlevel.c | 7 +++++-- gst/udp/gstmultiudpsink.c | 6 ++++-- gst/udp/gstudpsrc.c | 8 +++++--- 5 files changed, 26 insertions(+), 13 deletions(-) diff --git a/ext/jpeg/gstjpegdec.c b/ext/jpeg/gstjpegdec.c index 9a1ac4f7a2..25dfb0093b 100644 --- a/ext/jpeg/gstjpegdec.c +++ b/ext/jpeg/gstjpegdec.c @@ -151,12 +151,14 @@ gst_jpeg_dec_class_init (GstJpegDecClass * klass) * * Deprecated: 1.3.1: Property wasn't used internally */ +#ifndef GST_REMOVE_DEPRECATED g_object_class_install_property (gobject_class, PROP_MAX_ERRORS, g_param_spec_int ("max-errors", "Maximum Consecutive Decoding Errors", "(Deprecated) Error out after receiving N consecutive decoding errors" " (-1 = never fail, 0 = automatic, 1 = fail on first error)", -1, G_MAXINT, JPEG_DEFAULT_MAX_ERRORS, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED)); +#endif gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_jpeg_dec_src_pad_template)); @@ -1302,10 +1304,11 @@ gst_jpeg_dec_set_property (GObject * object, guint prop_id, case PROP_IDCT_METHOD: dec->idct_method = g_value_get_enum (value); break; +#ifndef GST_REMOVE_DEPRECATED case PROP_MAX_ERRORS: g_atomic_int_set (&dec->max_errors, g_value_get_int (value)); break; - +#endif default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -1324,10 +1327,11 @@ gst_jpeg_dec_get_property (GObject * object, guint prop_id, GValue * value, case PROP_IDCT_METHOD: g_value_set_enum (value, dec->idct_method); break; +#ifndef GST_REMOVE_DEPRECATED case PROP_MAX_ERRORS: g_value_set_int (value, g_atomic_int_get (&dec->max_errors)); break; - +#endif default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c index 541428553f..b84e6f5ac7 100644 --- a/gst/isomp4/gstqtmux.c +++ b/gst/isomp4/gstqtmux.c @@ -281,6 +281,7 @@ gst_qt_mux_class_init (GstQTMuxClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; + GParamFlags streamable_flags; const gchar *streamable_desc; gboolean streamable; #define STREAMABLE_DESC "If set to true, the output should be as if it is to "\ @@ -295,12 +296,14 @@ gst_qt_mux_class_init (GstQTMuxClass * klass) gobject_class->get_property = gst_qt_mux_get_property; gobject_class->set_property = gst_qt_mux_set_property; + streamable_flags = G_PARAM_READWRITE | G_PARAM_CONSTRUCT; if (klass->format == GST_QT_MUX_FORMAT_ISML) { streamable_desc = STREAMABLE_DESC; streamable = DEFAULT_STREAMABLE; } else { streamable_desc = STREAMABLE_DESC " (DEPRECATED, only valid for fragmented MP4)"; + streamable_flags |= G_PARAM_DEPRECATED; streamable = FALSE; } @@ -323,7 +326,7 @@ gst_qt_mux_class_init (GstQTMuxClass * klass) #ifndef GST_REMOVE_DEPRECATED g_object_class_install_property (gobject_class, PROP_DTS_METHOD, g_param_spec_enum ("dts-method", "dts-method", - "(DEPRECATED) Method to determine DTS time", + "Method to determine DTS time (DEPRECATED)", GST_TYPE_QT_MUX_DTS_METHOD, DEFAULT_DTS_METHOD, G_PARAM_DEPRECATED | G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); @@ -354,8 +357,7 @@ gst_qt_mux_class_init (GstQTMuxClass * klass) G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_STREAMABLE, g_param_spec_boolean ("streamable", "Streamable", streamable_desc, - streamable, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); + streamable, streamable_flags | G_PARAM_STATIC_STRINGS)); gstelement_class->request_new_pad = GST_DEBUG_FUNCPTR (gst_qt_mux_request_new_pad); diff --git a/gst/level/gstlevel.c b/gst/level/gstlevel.c index 139de1f759..7cd5a8f8d4 100644 --- a/gst/level/gstlevel.c +++ b/gst/level/gstlevel.c @@ -200,10 +200,13 @@ gst_level_class_init (GstLevelClass * klass) * * Deprecated: use the #GstLevel:post-messages property */ +#ifndef GST_REMOVE_DEPRECATED g_object_class_install_property (gobject_class, PROP_MESSAGE, g_param_spec_boolean ("message", "message", - "Post a 'level' message for each passed interval (deprecated)", - TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + "Post a 'level' message for each passed interval " + "(deprecated, use the post-messages property instead)", TRUE, + G_PARAM_READWRITE | G_PARAM_DEPRECATED | G_PARAM_STATIC_STRINGS)); +#endif g_object_class_install_property (gobject_class, PROP_INTERVAL, g_param_spec_uint64 ("interval", "Interval", "Interval of time between message posts (in nanoseconds)", diff --git a/gst/udp/gstmultiudpsink.c b/gst/udp/gstmultiudpsink.c index d3af62e7e6..c38a16a880 100644 --- a/gst/udp/gstmultiudpsink.c +++ b/gst/udp/gstmultiudpsink.c @@ -311,11 +311,13 @@ gst_multiudpsink_class_init (GstMultiUDPSinkClass * klass) * * Since: 1.0.2 */ +#ifndef GST_REMOVE_DEPRECATED g_object_class_install_property (gobject_class, PROP_FORCE_IPV4, g_param_spec_boolean ("force-ipv4", "Force IPv4", "Forcing the use of an IPv4 socket (DEPRECATED, has no effect anymore)", - DEFAULT_FORCE_IPV4, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - + DEFAULT_FORCE_IPV4, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED)); +#endif g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_QOS_DSCP, g_param_spec_int ("qos-dscp", "QoS diff srv code point", "Quality of Service, differentiated services code point (-1 default)", diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c index e61f2ea128..81cb1f1e68 100644 --- a/gst/udp/gstudpsrc.c +++ b/gst/udp/gstudpsrc.c @@ -225,11 +225,13 @@ gst_udpsrc_class_init (GstUDPSrcClass * klass) "The port to receive the packets from, 0=allocate", 0, G_MAXUINT16, UDP_DEFAULT_PORT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* FIXME 2.0: Remove multicast-group property */ +#ifndef GST_REMOVE_DEPRECATED g_object_class_install_property (gobject_class, PROP_MULTICAST_GROUP, g_param_spec_string ("multicast-group", "Multicast Group", - "The Address of multicast group to join. DEPRECATED: " - "Use address property instead", UDP_DEFAULT_MULTICAST_GROUP, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + "The Address of multicast group to join. (DEPRECATED: " + "Use address property instead)", UDP_DEFAULT_MULTICAST_GROUP, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED)); +#endif g_object_class_install_property (gobject_class, PROP_MULTICAST_IFACE, g_param_spec_string ("multicast-iface", "Multicast Interface", "The network interface on which to join the multicast group",