From 22eb34e2feacdd04fc79cb4f9c5ef75de7968a1f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 25 Jan 2007 14:22:53 +0000 Subject: [PATCH] gst/rtp/: Fix case of encoding-name and key/value pairs to match the document. Original commit message from CVS: * gst/rtp/README: * gst/rtp/gstrtpilbcdepay.c: * gst/rtp/gstrtpilbcpay.c: * gst/rtp/gstrtpmp4gdepay.c: * gst/rtp/gstrtpmp4gpay.c: * gst/rtp/gstrtpspeexdepay.c: * gst/rtp/gstrtpspeexpay.c: * gst/rtp/gstrtpsv3vdepay.c: * gst/rtp/gstrtptheoradepay.c: * gst/rtp/gstrtptheorapay.c: * gst/rtp/gstrtpvorbisdepay.c: * gst/rtp/gstrtpvorbispay.c: Fix case of encoding-name and key/value pairs to match the document. This is to make interoperation with SDP case-insensitive as required by the relevant RFCs. --- ChangeLog | 18 ++++++++++++++++++ gst/rtp/README | 15 +++++++++------ gst/rtp/gstrtpilbcdepay.c | 2 +- gst/rtp/gstrtpilbcpay.c | 2 +- gst/rtp/gstrtpmp4gdepay.c | 4 ++-- gst/rtp/gstrtpmp4gpay.c | 4 ++-- gst/rtp/gstrtpspeexdepay.c | 2 +- gst/rtp/gstrtpspeexpay.c | 2 +- gst/rtp/gstrtpsv3vdepay.c | 2 +- gst/rtp/gstrtptheoradepay.c | 2 +- gst/rtp/gstrtptheorapay.c | 2 +- gst/rtp/gstrtpvorbisdepay.c | 2 +- gst/rtp/gstrtpvorbispay.c | 2 +- 13 files changed, 40 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6d92abdf7a..74f81d176b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2007-01-25 Wim Taymans + + * gst/rtp/README: + * gst/rtp/gstrtpilbcdepay.c: + * gst/rtp/gstrtpilbcpay.c: + * gst/rtp/gstrtpmp4gdepay.c: + * gst/rtp/gstrtpmp4gpay.c: + * gst/rtp/gstrtpspeexdepay.c: + * gst/rtp/gstrtpspeexpay.c: + * gst/rtp/gstrtpsv3vdepay.c: + * gst/rtp/gstrtptheoradepay.c: + * gst/rtp/gstrtptheorapay.c: + * gst/rtp/gstrtpvorbisdepay.c: + * gst/rtp/gstrtpvorbispay.c: + Fix case of encoding-name and key/value pairs to match the document. + This is to make interoperation with SDP case-insensitive as required by + the relevant RFCs. + 2007-01-25 Wim Taymans * configure.ac: diff --git a/gst/rtp/README b/gst/rtp/README index 129efb97fd..94442495ca 100644 --- a/gst/rtp/README +++ b/gst/rtp/README @@ -13,6 +13,7 @@ The following fields can or must (*) be specified in the structure: * media: (String) [ "audio", "video", "application", "data", "control" ] Defined in RFC 2327 in the SDP media announcement field. + Converted to lower case. * payload: (int) [0, 127] For audio and video, these will normally be a media payload type as @@ -34,14 +35,16 @@ The following fields can or must (*) be specified in the structure: encoding-name: (String) ANY typically second part of the mime type. ex. MP4V-ES. only required if - payload type >= 96 + payload type >= 96. Converted to upper case. encoding-params: (String) ANY extra encoding parameters (as in the SDP a=rtpmap: field). only required if different from the default of the encoding-name. + Converted to lower-case. Optional parameters as key/value pairs, media type specific. The value type - should be of type G_TYPE_STRING. + should be of type G_TYPE_STRING. The key and value are converted to lower-case. + A parameter with no value is converted to =1. Example: @@ -137,10 +140,10 @@ Some gst-launch lines: ssrc=(guint)1162703703, clock-base=(guint)816135835, seqnum-base=(guint)9294, profile-level-id=(string)3, config=(string)000001b003000001b50900000100000001200086c5d4c307d314043c1463000001b25876694430303334 /pipeline0/udpsink1.sink: caps = application/x-rtp, media=(string)audio, - payload=(int)96, clock-rate=(int)44100, encoding-name=(string)mpeg4-generic, + payload=(int)96, clock-rate=(int)44100, encoding-name=(string)MPEG4-GENERIC, ssrc=(guint)3246149898, clock-base=(guint)4134514058, seqnum-base=(guint)57633, encoding-params=(string)2, streamtype=(string)5, profile-level-id=(string)1, - mode=(string)AAC-hbr, config=(string)1210, sizelength=(string)13, + mode=(string)aac-hbr, config=(string)1210, sizelength=(string)13, indexlength=(string)3, indexdeltalength=(string)3 .... @@ -153,9 +156,9 @@ Some gst-launch lines: config=(string)000001b003000001b50900000100000001200086c5d4c307d314043c1463000001b25876694430303334" ! rtpmp4vdepay ! ffdec_mpeg4 ! xvimagesink sync=false udpsrc port=5002 caps="application/x-rtp, media=(string)audio, payload=(int)96, - clock-rate=(int)44100, encoding-name=(string)mpeg4-generic, ssrc=(guint)3246149898, + clock-rate=(int)44100, encoding-name=(string)MPEG4-GENERIC, ssrc=(guint)3246149898, clock-base=(guint)4134514058, seqnum-base=(guint)57633, encoding-params=(string)2, - streamtype=(string)5, profile-level-id=(string)1, mode=(string)AAC-hbr, + streamtype=(string)5, profile-level-id=(string)1, mode=(string)aac-hbr, config=(string)1210, sizelength=(string)13, indexlength=(string)3, indexdeltalength=(string)3" ! rtpmp4gdepay ! faad ! alsasink sync=false diff --git a/gst/rtp/gstrtpilbcdepay.c b/gst/rtp/gstrtpilbcdepay.c index 878ec0b37b..057944e258 100644 --- a/gst/rtp/gstrtpilbcdepay.c +++ b/gst/rtp/gstrtpilbcdepay.c @@ -53,7 +53,7 @@ GST_STATIC_PAD_TEMPLATE ("sink", "media = (string) \"audio\", " "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " "clock-rate = (int) 8000, " - "encoding-name = (string) \"iLBC\", " "mode = (int) { 20, 30 }") + "encoding-name = (string) \"ILBC\", " "mode = (int) { 20, 30 }") ); static GstStaticPadTemplate gst_rtp_ilbc_depay_src_template = diff --git a/gst/rtp/gstrtpilbcpay.c b/gst/rtp/gstrtpilbcpay.c index 40e431ff8a..39d1832cd5 100644 --- a/gst/rtp/gstrtpilbcpay.c +++ b/gst/rtp/gstrtpilbcpay.c @@ -50,7 +50,7 @@ GST_STATIC_PAD_TEMPLATE ("src", "media = (string) \"audio\", " "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " "clock-rate = (int) 8000, " - "encoding-name = (string) \"iLBC\", " "mode = (int) {20, 30}") + "encoding-name = (string) \"ILBC\", " "mode = (int) {20, 30}") ); static gboolean gst_rtpilbcpay_setcaps (GstBaseRTPPayload * payload, diff --git a/gst/rtp/gstrtpmp4gdepay.c b/gst/rtp/gstrtpmp4gdepay.c index 50c4c0c5ac..e35f3b934f 100644 --- a/gst/rtp/gstrtpmp4gdepay.c +++ b/gst/rtp/gstrtpmp4gdepay.c @@ -65,12 +65,12 @@ GST_STATIC_PAD_TEMPLATE ("sink", "media = (string) { \"video\", \"audio\", \"application\" }, " "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " "clock-rate = (int) [1, MAX ], " - "encoding-name = (string) \"mpeg4-generic\", " + "encoding-name = (string) \"MPEG4-GENERIC\", " /* required string params */ "streamtype = (string) { \"4\", \"5\" }, " /* 4 = video, 5 = audio */ /* "profile-level-id = (string) [1,MAX], " */ /* "config = (string) [1,MAX]" */ - "mode = (string) { \"generic\", \"CELP-cbr\", \"CELP-vbr\", \"AAC-lbr\", \"AAC-hbr\" } " + "mode = (string) { \"generic\", \"celp-cbr\", \"celp-vbr\", \"aac-lbr\", \"aac-hbr\" } " /* Optional general parameters */ /* "objecttype = (string) [1,MAX], " */ /* "constantsize = (string) [1,MAX], " *//* constant size of each AU */ diff --git a/gst/rtp/gstrtpmp4gpay.c b/gst/rtp/gstrtpmp4gpay.c index ed9a8e7156..4b372a1ab9 100644 --- a/gst/rtp/gstrtpmp4gpay.c +++ b/gst/rtp/gstrtpmp4gpay.c @@ -54,12 +54,12 @@ GST_STATIC_PAD_TEMPLATE ("src", "media = (string) { \"video\", \"audio\", \"application\" }, " "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " "clock-rate = (int) [1, MAX ], " - "encoding-name = (string) \"mpeg4-generic\", " + "encoding-name = (string) \"MPEG4-GENERIC\", " /* required string params */ "streamtype = (string) { \"4\", \"5\" }, " /* 4 = video, 5 = audio */ /* "profile-level-id = (string) [1,MAX], " */ /* "config = (string) [1,MAX]" */ - "mode = (string) { \"generic\", \"CELP-cbr\", \"CELP-vbr\", \"AAC-lbr\", \"AAC-hbr\" } " + "mode = (string) { \"generic\", \"celp-cbr\", \"celp-vbr\", \"aac-lbr\", \"aac-hbr\" } " /* Optional general parameters */ /* "objecttype = (string) [1,MAX], " */ /* "constantsize = (string) [1,MAX], " *//* constant size of each AU */ diff --git a/gst/rtp/gstrtpspeexdepay.c b/gst/rtp/gstrtpspeexdepay.c index 328fc58e4a..e0d772964b 100644 --- a/gst/rtp/gstrtpspeexdepay.c +++ b/gst/rtp/gstrtpspeexdepay.c @@ -52,7 +52,7 @@ GST_STATIC_PAD_TEMPLATE ("sink", "media = (string) \"audio\", " "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " "clock-rate = (int) [6000, 48000], " - "encoding-name = (string) \"speex\", " + "encoding-name = (string) \"SPEEX\", " "encoding-params = (string) \"1\"") ); diff --git a/gst/rtp/gstrtpspeexpay.c b/gst/rtp/gstrtpspeexpay.c index 52f04befc5..a102ba7d64 100644 --- a/gst/rtp/gstrtpspeexpay.c +++ b/gst/rtp/gstrtpspeexpay.c @@ -49,7 +49,7 @@ GST_STATIC_PAD_TEMPLATE ("src", "media = (string) \"audio\", " "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " "clock-rate = (int) 8000, " - "encoding-name = (string) \"speex\", " + "encoding-name = (string) \"SPEEX\", " "encoding-params = (string) \"1\"") ); diff --git a/gst/rtp/gstrtpsv3vdepay.c b/gst/rtp/gstrtpsv3vdepay.c index 10bf21fd73..c67b5ef63e 100644 --- a/gst/rtp/gstrtpsv3vdepay.c +++ b/gst/rtp/gstrtpsv3vdepay.c @@ -61,7 +61,7 @@ GST_STATIC_PAD_TEMPLATE ("sink", "media = (string) \"video\", " "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " "clock-rate = (int) 90000, " - "encoding-name = (string) { \"X-SV3V-ES\", \"X-SorensonVideo\" }") + "encoding-name = (string) { \"X-SV3V-ES\", \"X-SORENSON-VIDEO\" }") ); GST_BOILERPLATE (GstRtpSV3VDepay, gst_rtp_sv3v_depay, GstBaseRTPDepayload, diff --git a/gst/rtp/gstrtptheoradepay.c b/gst/rtp/gstrtptheoradepay.c index b391173c9d..47ab382645 100644 --- a/gst/rtp/gstrtptheoradepay.c +++ b/gst/rtp/gstrtptheoradepay.c @@ -56,7 +56,7 @@ GST_STATIC_PAD_TEMPLATE ("sink", GST_STATIC_CAPS ("application/x-rtp, " "media = (string) \"video\", " "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " - "clock-rate = (int) [1, MAX ], " "encoding-name = (string) \"theora\"" + "clock-rate = (int) [1, MAX ], " "encoding-name = (string) \"THEORA\"" /* All required parameters * * "encoding-params = (string) " diff --git a/gst/rtp/gstrtptheorapay.c b/gst/rtp/gstrtptheorapay.c index 8a7f63b84e..7b4dc1bf4d 100644 --- a/gst/rtp/gstrtptheorapay.c +++ b/gst/rtp/gstrtptheorapay.c @@ -50,7 +50,7 @@ GST_STATIC_PAD_TEMPLATE ("src", GST_STATIC_CAPS ("application/x-rtp, " "media = (string) \"video\", " "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " - "clock-rate = (int) [1, MAX ], " "encoding-name = (string) \"theora\"" + "clock-rate = (int) [1, MAX ], " "encoding-name = (string) \"THEORA\"" /* All required parameters * * "sampling = (string) { "YCbCr-4:2:0", "YCbCr-4:2:2", "YCbCr-4:4:4" } " diff --git a/gst/rtp/gstrtpvorbisdepay.c b/gst/rtp/gstrtpvorbisdepay.c index 8ebec98abb..eab6210079 100644 --- a/gst/rtp/gstrtpvorbisdepay.c +++ b/gst/rtp/gstrtpvorbisdepay.c @@ -56,7 +56,7 @@ GST_STATIC_PAD_TEMPLATE ("sink", GST_STATIC_CAPS ("application/x-rtp, " "media = (string) \"audio\", " "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " - "clock-rate = (int) [1, MAX ], " "encoding-name = (string) \"vorbis\"" + "clock-rate = (int) [1, MAX ], " "encoding-name = (string) \"VORBIS\"" /* All required parameters * * "encoding-params = (string) " diff --git a/gst/rtp/gstrtpvorbispay.c b/gst/rtp/gstrtpvorbispay.c index 7d443d847f..29b8ce4977 100644 --- a/gst/rtp/gstrtpvorbispay.c +++ b/gst/rtp/gstrtpvorbispay.c @@ -48,7 +48,7 @@ GST_STATIC_PAD_TEMPLATE ("src", GST_STATIC_CAPS ("application/x-rtp, " "media = (string) \"audio\", " "payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", " - "clock-rate = (int) [1, MAX ], " "encoding-name = (string) \"vorbis\"" + "clock-rate = (int) [1, MAX ], " "encoding-name = (string) \"VORBIS\"" /* All required parameters * * "encoding-params = (string) "