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 */
}
}
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",
"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;
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 */
"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;
}