Revert "rtsp-server: Switch around sendonly/recvonly attributes"
authorSebastian Dröge <sebastian@centricular.com>
Tue, 17 Apr 2018 14:47:30 +0000 (17:47 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 17 Apr 2018 14:50:05 +0000 (17:50 +0300)
This reverts commit 3d275b1345b76151418e3f56ed014d9089ac1a57.

While RFC 3264 (SDP) says that sendonly/recvonly are from the point of view of
the requester, the actual RTSP RFCs (RFC 2326 / 7826) disagree and say
the opposite, just like the ONVIF standard.

Let's follow those RFCs as we're doing RTSP here, and add a property at
a later time if needed to switch to the SDP RFC behaviour.

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

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

index ecafa7c..6e8fd1d 100644 (file)
@@ -134,12 +134,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, "recvonly", "");
+              gst_sdp_media_add_attribute (smedia, "sendonly", "");
               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, "sendonly", "");
+              gst_sdp_media_add_attribute (smedia, "recvonly", "");
             }
           }
         }