From 4bc10e755a81b07e1d580ff9fd976ad896cbb241 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 16 Sep 2014 22:47:13 +0300 Subject: [PATCH] rtpvrawdepay: Declare some more required caps fields in the sink template caps Now only missing are width and height, which are expressed as strings for RTP... so we can't put them into the template caps. --- gst/rtp/gstrtpvrawdepay.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/gst/rtp/gstrtpvrawdepay.c b/gst/rtp/gstrtpvrawdepay.c index 9a28802..329ea5c 100644 --- a/gst/rtp/gstrtpvrawdepay.c +++ b/gst/rtp/gstrtpvrawdepay.c @@ -43,7 +43,16 @@ GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_ALWAYS, GST_STATIC_CAPS ("application/x-rtp, " "media = (string) \"video\", " - "clock-rate = (int) 90000, " "encoding-name = (string) \"RAW\"") + "clock-rate = (int) 90000, " + "encoding-name = (string) \"RAW\", " + "sampling = (string) { \"RGB\", \"RGBA\", \"BGR\", \"BGRA\", " + "\"YCbCr-4:4:4\", \"YCbCr-4:2:2\", \"YCbCr-4:2:0\", " + "\"YCbCr-4:1:1\" }," + /* we cannot express these as strings + * "width = (string) [1 32767]," + * "height = (string) [1 32767]," + */ + "depth = (string) { \"8\", \"10\", \"12\", \"16\" }") ); #define gst_rtp_vraw_depay_parent_class parent_class @@ -239,8 +248,9 @@ gst_rtp_vraw_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps) format = GST_VIDEO_FORMAT_Y41B; pgroup = 6; xinc = 4; - } else + } else { goto unknown_format; + } gst_video_info_init (&rtpvrawdepay->vinfo); gst_video_info_set_format (&rtpvrawdepay->vinfo, format, width, height); -- 2.7.4