rtsp-sdp: add payload type to the sdp framesize attribute
authorLinus Svensson <linussn@axis.com>
Wed, 26 Feb 2014 21:34:06 +0000 (22:34 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 9 Mar 2015 08:26:38 +0000 (09:26 +0100)
The sdp framesize attribute is desribed in RFC6064. It is specified
for payloading of H263 and has the following form
a=framesize:<payload type> <width>-<height>. The <width>-<height> part
should be added to the caps in a payloader and the <payload type> should
be added by the rtsp-server.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725334

gst/rtsp-server/rtsp-sdp.c

index dfc54be..421525d 100644 (file)
@@ -345,6 +345,16 @@ make_media (GstSDPMessage * sdp, GstSDPInfo * info, GstRTSPMedia * media,
     if (g_str_has_prefix (fname, "x-gst-rtsp-server-rtx-time"))
       continue;
 
+    if (!strcmp (fname, "a-framesize")) {
+      /* a-framesize attribute */
+      if ((fval = gst_structure_get_string (s, fname))) {
+        tmp = g_strdup_printf ("%d %s", caps_pt, fval);
+        gst_sdp_media_add_attribute (smedia, fname + 2, tmp);
+        g_free (tmp);
+      }
+      continue;
+    }
+
     if (g_str_has_prefix (fname, "a-")) {
       /* attribute */
       if ((fval = gst_structure_get_string (s, fname)))