diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-03-11 19:06:59 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-03-11 19:06:59 +0100 |
commit | 77299ba6aeb30a80b4ce9fc1fffd5e1c98c0842a (patch) | |
tree | 260b936d9a08939e0ac39165ffeb328cb6791fe5 /gst | |
parent | 857a9564f1992829655d4648898e069889f51844 (diff) | |
download | gstreamer-plugins-bad-77299ba6aeb30a80b4ce9fc1fffd5e1c98c0842a.tar.gz |
fix for caps api changes
Diffstat (limited to 'gst')
-rw-r--r-- | gst/audiovisualizers/gstbaseaudiovisualizer.c | 5 | ||||
-rw-r--r-- | gst/autoconvert/gstautoconvert.c | 4 | ||||
-rw-r--r-- | gst/dtmf/gstdtmfsrc.c | 12 | ||||
-rw-r--r-- | gst/dtmf/gstrtpdtmfsrc.c | 3 | ||||
-rw-r--r-- | gst/dvbsuboverlay/gstdvbsuboverlay.c | 9 | ||||
-rw-r--r-- | gst/dvdspu/gstdvdspu.c | 6 | ||||
-rw-r--r-- | gst/rtpmux/gstrtpmux.c | 9 | ||||
-rw-r--r-- | gst/videoparsers/gsth264parse.c | 5 |
8 files changed, 28 insertions, 25 deletions
diff --git a/gst/audiovisualizers/gstbaseaudiovisualizer.c b/gst/audiovisualizers/gstbaseaudiovisualizer.c index 6761d01d9..566303796 100644 --- a/gst/audiovisualizers/gstbaseaudiovisualizer.c +++ b/gst/audiovisualizers/gstbaseaudiovisualizer.c @@ -685,11 +685,12 @@ gst_base_audio_visualizer_src_negotiate (GstBaseAudioVisualizer * scope) if (gst_caps_is_empty (target)) goto no_format; - gst_caps_truncate (target); + target = gst_caps_truncate (target); } else { - target = gst_caps_ref ((GstCaps *) templ); + target = templ; } + target = gst_caps_make_writable (target); structure = gst_caps_get_structure (target, 0); gst_structure_fixate_field_nearest_int (structure, "width", scope->width); gst_structure_fixate_field_nearest_int (structure, "height", scope->height); diff --git a/gst/autoconvert/gstautoconvert.c b/gst/autoconvert/gstautoconvert.c index 32bab0446..1ecc35499 100644 --- a/gst/autoconvert/gstautoconvert.c +++ b/gst/autoconvert/gstautoconvert.c @@ -1147,7 +1147,7 @@ gst_auto_convert_getcaps (GstAutoConvert * autoconvert, GstCaps * filter, if (element_caps) { if (!gst_caps_is_any (element_caps) && !gst_caps_is_empty (element_caps)) { - gst_caps_merge (caps, element_caps); + caps = gst_caps_merge (caps, element_caps); } else { gst_caps_unref (element_caps); } @@ -1166,7 +1166,7 @@ gst_auto_convert_getcaps (GstAutoConvert * autoconvert, GstCaps * filter, if (static_caps && !gst_caps_is_any (static_caps) && !gst_caps_is_empty (static_caps)) { - gst_caps_merge (caps, static_caps); + caps = gst_caps_merge (caps, static_caps); } } } diff --git a/gst/dtmf/gstdtmfsrc.c b/gst/dtmf/gstdtmfsrc.c index e5a8eef58..b3f24ffda 100644 --- a/gst/dtmf/gstdtmfsrc.c +++ b/gst/dtmf/gstdtmfsrc.c @@ -852,14 +852,16 @@ gst_dtmf_src_negotiate (GstBaseSrc * basesrc) caps = gst_pad_get_allowed_caps (GST_BASE_SRC_PAD (basesrc)); if (!caps) - caps = - gst_caps_copy (gst_pad_get_pad_template_caps (GST_BASE_SRC_PAD - (basesrc))); + caps = gst_pad_get_pad_template_caps (GST_BASE_SRC_PAD (basesrc)); - if (gst_caps_is_empty (caps)) + if (gst_caps_is_empty (caps)) { + gst_caps_unref (caps); return FALSE; + } + + caps = gst_caps_truncate (caps); - gst_caps_truncate (caps); + caps = gst_caps_make_writable (caps); s = gst_caps_get_structure (caps, 0); gst_structure_fixate_field_nearest_int (s, "rate", DEFAULT_SAMPLE_RATE); diff --git a/gst/dtmf/gstrtpdtmfsrc.c b/gst/dtmf/gstrtpdtmfsrc.c index 6e6140af7..a078a111d 100644 --- a/gst/dtmf/gstrtpdtmfsrc.c +++ b/gst/dtmf/gstrtpdtmfsrc.c @@ -904,7 +904,8 @@ gst_rtp_dtmf_src_negotiate (GstBaseSrc * basesrc) } /* now fixate, start by taking the first caps */ - gst_caps_truncate (temp); + temp = gst_caps_truncate (temp); + temp = gst_caps_make_writable (temp); srccaps = temp; /* get first structure */ diff --git a/gst/dvbsuboverlay/gstdvbsuboverlay.c b/gst/dvbsuboverlay/gstdvbsuboverlay.c index 235f86a24..833c8dfdc 100644 --- a/gst/dvbsuboverlay/gstdvbsuboverlay.c +++ b/gst/dvbsuboverlay/gstdvbsuboverlay.c @@ -401,28 +401,29 @@ gst_dvbsub_overlay_getcaps (GstPad * pad, GstCaps * filter) { GstDVBSubOverlay *render = GST_DVBSUB_OVERLAY (gst_pad_get_parent (pad)); GstPad *otherpad; - GstCaps *caps; + GstCaps *caps, *templ; if (pad == render->srcpad) otherpad = render->video_sinkpad; else otherpad = render->srcpad; + templ = gst_pad_get_pad_template_caps (otherpad); + /* we can do what the peer can */ caps = gst_pad_peer_query_caps (otherpad, filter); if (caps) { GstCaps *temp; - const GstCaps *templ; /* filtered against our padtemplate */ - templ = gst_pad_get_pad_template_caps (otherpad); temp = gst_caps_intersect (caps, templ); + gst_caps_unref (templ); gst_caps_unref (caps); /* this is what we can do */ caps = temp; } else { /* no peer, our padtemplate is enough then */ - caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad)); + caps = templ; } gst_object_unref (render); diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c index 044783270..2088581f0 100644 --- a/gst/dvdspu/gstdvdspu.c +++ b/gst/dvdspu/gstdvdspu.c @@ -363,15 +363,15 @@ gst_dvd_spu_video_proxy_getcaps (GstPad * pad, GstCaps * filter) caps = gst_pad_peer_query_caps (otherpad, filter); if (caps) { - GstCaps *temp; - const GstCaps *templ; + GstCaps *temp, *templ; templ = gst_pad_get_pad_template_caps (otherpad); temp = gst_caps_intersect (caps, templ); + gst_caps_unref (templ); gst_caps_unref (caps); caps = temp; } else { - caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad)); + caps = gst_pad_get_pad_template_caps (pad); } gst_object_unref (dvdspu); diff --git a/gst/rtpmux/gstrtpmux.c b/gst/rtpmux/gstrtpmux.c index de09fd488..5babda47d 100644 --- a/gst/rtpmux/gstrtpmux.c +++ b/gst/rtpmux/gstrtpmux.c @@ -591,15 +591,14 @@ same_clock_rate_fold (const GValue * item, GValue * ret, gpointer user_data) GstPad *mypad = user_data; GstPad *pad = g_value_get_object (item); GstCaps *peercaps; - const GstCaps *accumcaps; + GstCaps *accumcaps; GstCaps *intersect; - if (pad == mypad) { + if (pad == mypad) return TRUE; - } - accumcaps = gst_value_get_caps (ret); - peercaps = gst_pad_peer_query_caps (pad, (GstCaps *) accumcaps); + accumcaps = g_value_get_boxed (ret); + peercaps = gst_pad_peer_query_caps (pad, accumcaps); if (!peercaps) { g_warning ("no peercaps"); return TRUE; diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c index 5074bdc6d..58264d59e 100644 --- a/gst/videoparsers/gsth264parse.c +++ b/gst/videoparsers/gsth264parse.c @@ -328,8 +328,7 @@ gst_h264_parse_negotiate (GstH264Parse * h264parse, gint in_format, /* concentrate on leading structure, since decodebin2 parser * capsfilter always includes parser template caps */ if (caps) { - caps = gst_caps_make_writable (caps); - gst_caps_truncate (caps); + caps = gst_caps_truncate (caps); GST_DEBUG_OBJECT (h264parse, "negotiating with caps: %" GST_PTR_FORMAT, caps); } @@ -345,7 +344,7 @@ gst_h264_parse_negotiate (GstH264Parse * h264parse, gint in_format, if (caps) { /* fixate to avoid ambiguity with lists when parsing */ - gst_caps_fixate (caps); + caps = gst_caps_fixate (caps); gst_h264_parse_format_from_caps (caps, &format, &align); gst_caps_unref (caps); } |