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