+2005-06-16 David Schleef <ds@schleef.org>
+
+ * gst/elements/gstcapsfilter.c: (gst_capsfilter_class_init),
+ (gst_capsfilter_set_property): Allow NULL as possible value
+ for filter_caps property, indicating GST_CAPS_ANY.
+
2005-06-09 Thomas Vander Stichele <thomas at apestaart dot org>
* gstreamer.spec.in:
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_FILTER_CAPS,
g_param_spec_boxed ("filter_caps", _("Filter caps"),
- _("Caps to use to filter the possible allowed formats"),
+ _("Restrict the possible allowed formats"),
GST_TYPE_CAPS, G_PARAM_READWRITE));
}
switch (prop_id) {
case PROP_FILTER_CAPS:{
GstCaps *new_caps = gst_caps_copy (gst_value_get_caps (value));
+ GstCaps *old_caps;
- g_return_if_fail (new_caps != NULL);
+ if (new_caps == NULL) {
+ new_caps = gst_caps_new_any ();
+ }
- gst_caps_unref (capsfilter->filter_caps);
+ old_caps = capsfilter->filter_caps;
capsfilter->filter_caps = new_caps;
+ gst_caps_unref (old_caps);
/* FIXME: Need to activate these caps on the pads */
break;
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_FILTER_CAPS,
g_param_spec_boxed ("filter_caps", _("Filter caps"),
- _("Caps to use to filter the possible allowed formats"),
+ _("Restrict the possible allowed formats"),
GST_TYPE_CAPS, G_PARAM_READWRITE));
}
switch (prop_id) {
case PROP_FILTER_CAPS:{
GstCaps *new_caps = gst_caps_copy (gst_value_get_caps (value));
+ GstCaps *old_caps;
- g_return_if_fail (new_caps != NULL);
+ if (new_caps == NULL) {
+ new_caps = gst_caps_new_any ();
+ }
- gst_caps_unref (capsfilter->filter_caps);
+ old_caps = capsfilter->filter_caps;
capsfilter->filter_caps = new_caps;
+ gst_caps_unref (old_caps);
/* FIXME: Need to activate these caps on the pads */
break;