mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
gst/elements/gstcapsfilter.c: Allow NULL as possible value for filter_caps property, indicating GST_CAPS_ANY.
Original commit message from CVS: * 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.
This commit is contained in:
parent
013b77e072
commit
6dbed89c01
3 changed files with 20 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
|||
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:
|
||||
|
|
|
@ -145,7 +145,7 @@ gst_capsfilter_class_init (GstCapsFilterClass * klass)
|
|||
|
||||
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));
|
||||
}
|
||||
|
||||
|
@ -207,11 +207,15 @@ gst_capsfilter_set_property (GObject * object, guint prop_id,
|
|||
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;
|
||||
|
|
|
@ -145,7 +145,7 @@ gst_capsfilter_class_init (GstCapsFilterClass * klass)
|
|||
|
||||
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));
|
||||
}
|
||||
|
||||
|
@ -207,11 +207,15 @@ gst_capsfilter_set_property (GObject * object, guint prop_id,
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue