rtsp-server: Switch around sendonly/recvonly attributes
authorSebastian Dröge <sebastian@centricular.com>
Mon, 22 Jan 2018 10:46:34 +0000 (12:46 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Fri, 16 Feb 2018 09:04:53 +0000 (11:04 +0200)
They are wrong in the ONVIF streaming spec. The backchannel should be
recvonly and the normal media should be sendonly: direction is always
from the point of view of the SDP offerer (the server) according to
RFC 3264.

gst/rtsp-server/rtsp-onvif-media.c

index 8cd7261..261010d 100644 (file)
@@ -135,12 +135,12 @@ gst_rtsp_onvif_media_setup_sdp (GstRTSPMedia * media, GstSDPMessage * sdp,
             if (sinkpad) {
               GstRTSPOnvifMedia *onvif_media = GST_RTSP_ONVIF_MEDIA (media);
 
-              gst_sdp_media_add_attribute (smedia, "sendonly", "");
+              gst_sdp_media_add_attribute (smedia, "recvonly", "");
               if (onvif_media->priv->backchannel_bandwidth > 0)
                 gst_sdp_media_add_bandwidth (smedia, GST_SDP_BWTYPE_AS,
                     onvif_media->priv->backchannel_bandwidth);
             } else {
-              gst_sdp_media_add_attribute (smedia, "recvonly", "");
+              gst_sdp_media_add_attribute (smedia, "sendonly", "");
             }
           }
         }