mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
media: port to new caps API
This commit is contained in:
parent
debbea1008
commit
80e0b0b19a
2 changed files with 7 additions and 10 deletions
|
@ -393,10 +393,9 @@ pad_added_cb (GstElement * uribin, GstPad * pad, GstElement * element)
|
|||
padname = gst_pad_get_name (pad);
|
||||
|
||||
/* get pad caps first, then call get_caps, then fail */
|
||||
if ((caps = GST_PAD_CAPS (pad)))
|
||||
gst_caps_ref (caps);
|
||||
else if ((caps = gst_pad_get_caps (pad)) == NULL)
|
||||
goto no_caps;
|
||||
if ((caps = gst_pad_get_current_caps (pad)) == NULL)
|
||||
if ((caps = gst_pad_get_caps (pad, NULL)) == NULL)
|
||||
goto no_caps;
|
||||
|
||||
/* check for raw caps */
|
||||
if (gst_caps_can_intersect (caps, urifact->raw_vcaps)) {
|
||||
|
@ -422,10 +421,9 @@ pad_added_cb (GstElement * uribin, GstPad * pad, GstElement * element)
|
|||
|
||||
/* continue with new pad and caps */
|
||||
pad = gst_element_get_static_pad (convert, "src");
|
||||
if ((caps = GST_PAD_CAPS (pad)))
|
||||
gst_caps_ref (caps);
|
||||
else if ((caps = gst_pad_get_caps (pad)) == NULL)
|
||||
goto no_caps;
|
||||
if ((caps = gst_pad_get_current_caps (pad)) == NULL)
|
||||
if ((caps = gst_pad_get_caps (pad, NULL)) == NULL)
|
||||
goto no_caps;
|
||||
}
|
||||
|
||||
if (!(factory = find_payloader (urifact, caps)))
|
||||
|
|
|
@ -977,8 +977,7 @@ caps_notify (GstPad * pad, GParamSpec * unused, GstRTSPMediaStream * stream)
|
|||
gchar *capsstr;
|
||||
GstCaps *newcaps, *oldcaps;
|
||||
|
||||
if ((newcaps = GST_PAD_CAPS (pad)))
|
||||
gst_caps_ref (newcaps);
|
||||
newcaps = gst_pad_get_current_caps (pad);
|
||||
|
||||
oldcaps = stream->caps;
|
||||
stream->caps = newcaps;
|
||||
|
|
Loading…
Reference in a new issue