set_outcaps can fail and we need to propagate the result upstream.
gst_rtp_amr_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
{
GstRtpAMRPay *rtpamrpay;
+ gboolean res;
const GstStructure *s;
const gchar *str;
gst_basertppayload_set_options (basepayload, "audio", TRUE, "AMR-WB",
16000);
- gst_basertppayload_set_outcaps (basepayload,
+ res = gst_basertppayload_set_outcaps (basepayload,
"encoding-params", G_TYPE_STRING, "1", "octet-align", G_TYPE_STRING, "1",
/* don't set the defaults
*
*/
NULL);
- return TRUE;
+ return res;
/* ERRORS */
wrong_type:
gst_dv_pay_negotiate (GstRTPDVPay * rtpdvpay, guint8 * data, guint size)
{
gchar *encode, *media;
- gboolean audio_bundled;
+ gboolean audio_bundled, res;
if ((data[3] & 0x80) == 0) { /* DSF flag */
/* it's an NTSC format */
"DV", 90000);
if (audio_bundled) {
- gst_basertppayload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpdvpay),
+ res = gst_basertppayload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpdvpay),
"encode", G_TYPE_STRING, encode,
"audio", G_TYPE_STRING, "bundled", NULL);
} else {
- gst_basertppayload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpdvpay),
+ res = gst_basertppayload_set_outcaps (GST_BASE_RTP_PAYLOAD (rtpdvpay),
"encode", G_TYPE_STRING, encode, NULL);
}
- return TRUE;
+ return res;
}
static gboolean
GstBaseRTPAudioPayload *basertpaudiopayload;
GstRtpG726Pay *pay;
GstCaps *peercaps;
+ gboolean res;
basertpaudiopayload = GST_BASE_RTP_AUDIO_PAYLOAD (payload);
pay = GST_RTP_G726_PAY (payload);
}
gst_basertppayload_set_options (payload, "audio", TRUE, encoding_name, 8000);
- gst_basertppayload_set_outcaps (payload, NULL);
+ res = gst_basertppayload_set_outcaps (payload, NULL);
g_free (encoding_name);
- return TRUE;
+ return res;
/* ERRORS */
invalid_bitrate:
GstStructure *caps_structure = gst_caps_get_structure (caps, 0);
GstRtpJ2KPay *pay;
gint width = 0, height = 0;
+ gboolean res;
pay = GST_RTP_J2K_PAY (basepayload);
gst_basertppayload_set_options (basepayload, "video", TRUE, "JPEG2000",
90000);
- gst_basertppayload_set_outcaps (basepayload, NULL);
+ res = gst_basertppayload_set_outcaps (basepayload, NULL);
- return TRUE;
+ return res;
}
{
GstStructure *caps_structure = gst_caps_get_structure (caps, 0);
GstRtpJPEGPay *pay;
+ gboolean res;
gint width = 0, height = 0;
pay = GST_RTP_JPEG_PAY (basepayload);
pay->width = width / 8;
gst_basertppayload_set_options (basepayload, "video", TRUE, "JPEG", 90000);
- gst_basertppayload_set_outcaps (basepayload, NULL);
+ res = gst_basertppayload_set_outcaps (basepayload, NULL);
- return TRUE;
+ return res;
/* ERRORS */
invalid_dimension:
static gboolean
gst_rtp_mp2t_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
{
+ gboolean res;
+
gst_basertppayload_set_options (payload, "video", TRUE, "MP2T-ES", 90000);
- gst_basertppayload_set_outcaps (payload, NULL);
+ res = gst_basertppayload_set_outcaps (payload, NULL);
- return TRUE;
+ return res;
}
static GstFlowReturn