Sprinkle some G_PARAM_DEPRECATED and #ifndef GST_REMOVE_DEPRECATED

This commit is contained in:
Tim-Philipp Müller 2014-11-02 16:51:23 +00:00
parent da51a99403
commit 3956f5addc
5 changed files with 26 additions and 13 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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)",

View file

@ -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)",

View file

@ -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",