This updates all plugins to the new API for gst_pad_try_set_caps

Original commit message from CVS:
This updates all plugins to the new API for gst_pad_try_set_caps
This commit is contained in:
Ronald S. Bultje 2002-09-10 09:31:38 +00:00
parent 78bac60b30
commit 0d5f4a02ca
4 changed files with 5 additions and 5 deletions

View file

@ -70,7 +70,7 @@ main (int argc, char *argv[])
gst_element_set_state (pipeline, GST_STATE_READY);
g_print ("Setting caps on fakesrc's src pad\n");
if (! (gst_pad_try_set_caps (gst_element_get_pad (src, "src"), caps)))
if (gst_pad_try_set_caps (gst_element_get_pad (src, "src"), caps) <= 0)
g_print ("Could not set caps !\n");
/* request first pad from tee and connect */

View file

@ -921,7 +921,7 @@ gst_mad_chain (GstPad *pad, GstBuffer *buffer)
}
}
if (mad->caps_set == FALSE) {
if (!gst_pad_try_set_caps (mad->srcpad,
if (gst_pad_try_set_caps (mad->srcpad,
gst_caps_new (
"mad_src",
"audio/raw",
@ -938,7 +938,7 @@ gst_mad_chain (GstPad *pad, GstBuffer *buffer)
"rate", GST_PROPS_INT (mad->header.samplerate),
#endif
"channels", GST_PROPS_INT (nchannels),
NULL)))) {
NULL))) <= 0) {
gst_element_error (GST_ELEMENT (mad), "could not set caps on source pad, aborting...");
}
mad->caps_set = TRUE;

View file

@ -259,7 +259,7 @@ gst_mpeg2dec_negotiate_format (GstMpeg2dec *mpeg2dec)
GstCaps *to_try = gst_caps_copy_1 (trylist);
/* try each format */
if (gst_pad_try_set_caps (mpeg2dec->srcpad, to_try)) {
if (gst_pad_try_set_caps (mpeg2dec->srcpad, to_try) > 0) {
guint32 fourcc;
/* it worked, try to find what it was again */

View file

@ -270,7 +270,7 @@ gst_synaesthesia_chain (GstPad *pad, GstBuffer *bufin)
"height", GST_PROPS_INT (synaesthesia->height)
);
if (!gst_pad_try_set_caps (synaesthesia->srcpad, caps)) {
if (gst_pad_try_set_caps (synaesthesia->srcpad, caps) <= 0) {
gst_element_error (GST_ELEMENT (synaesthesia), "could not set caps");
return;
}