diff --git a/gst/rtp/gstrtph264pay.c b/gst/rtp/gstrtph264pay.c index ea1aa50c28..af25e739f1 100644 --- a/gst/rtp/gstrtph264pay.c +++ b/gst/rtp/gstrtph264pay.c @@ -124,11 +124,11 @@ gst_rtp_h264_pay_class_init (GstRtpH264PayClass * klass) g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_CONFIG_INTERVAL, - g_param_spec_uint ("config-interval", + g_param_spec_int ("config-interval", "SPS PPS Send Interval", "Send SPS and PPS Insertion Interval in seconds (sprop parameter sets " "will be multiplexed in the data stream when detected.) (0 = disabled)", - 0, 3600, DEFAULT_CONFIG_INTERVAL, + -1, 3600, DEFAULT_CONFIG_INTERVAL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) ); @@ -1373,7 +1373,7 @@ gst_rtp_h264_pay_set_property (GObject * object, guint prop_id, rtph264pay->update_caps = TRUE; break; case PROP_CONFIG_INTERVAL: - rtph264pay->spspps_interval = g_value_get_uint (value); + rtph264pay->spspps_interval = g_value_get_int (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -1394,7 +1394,7 @@ gst_rtp_h264_pay_get_property (GObject * object, guint prop_id, g_value_set_string (value, rtph264pay->sprop_parameter_sets); break; case PROP_CONFIG_INTERVAL: - g_value_set_uint (value, rtph264pay->spspps_interval); + g_value_set_int (value, rtph264pay->spspps_interval); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); diff --git a/gst/rtp/gstrtph264pay.h b/gst/rtp/gstrtph264pay.h index 44f7af4409..c5a5e9fb68 100644 --- a/gst/rtp/gstrtph264pay.h +++ b/gst/rtp/gstrtph264pay.h @@ -71,7 +71,7 @@ struct _GstRtpH264Pay GstAdapter *adapter; - guint spspps_interval; + gint spspps_interval; gboolean send_spspps; GstClockTime last_spspps; diff --git a/tests/check/elements/rtp-payloading.c b/tests/check/elements/rtp-payloading.c index f19306be24..3af1d6cac8 100644 --- a/tests/check/elements/rtp-payloading.c +++ b/tests/check/elements/rtp-payloading.c @@ -615,6 +615,31 @@ GST_START_TEST (rtp_h264) rtp_h264_frame_count, "video/x-h264,stream-format=(string)byte-stream,alignment=(string)nal", "rtph264pay", "rtph264depay", 0, 0, FALSE); + + /* config-interval property used to be of uint type, was changed to int, + * make sure old GValue stuff still works */ + { + GValue val = G_VALUE_INIT; + GstElement *rtph264pay; + GParamSpec *pspec; + + + rtph264pay = gst_element_factory_make ("rtph264pay", NULL); + pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (rtph264pay), + "config-interval"); + fail_unless (pspec->value_type == G_TYPE_INT); + g_value_init (&val, G_TYPE_UINT); + g_value_set_uint (&val, 10); + g_object_set_property (G_OBJECT (rtph264pay), "config-interval", &val); + g_value_set_uint (&val, 0); + g_object_get_property (G_OBJECT (rtph264pay), "config-interval", &val); + fail_unless_equals_int (10, g_value_get_uint (&val)); + g_object_set (G_OBJECT (rtph264pay), "config-interval", -1, NULL); + g_object_get_property (G_OBJECT (rtph264pay), "config-interval", &val); + fail_unless (g_value_get_uint (&val) == G_MAXUINT); + g_value_unset (&val); + gst_object_unref (rtph264pay); + } } GST_END_TEST;