Revert "rtspsrc: Fix up sendonly/recvonly attribute handling"

This reverts commit af273b4de9eb292c0b6af63665e10ca015895902.

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
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index ce17a0e..facdbb4 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -1772,10 +1772,10 @@
   else
     goto unknown_proto;
 
-  if (gst_sdp_media_get_attribute_val (media, "recvonly") != NULL &&
+  if (gst_sdp_media_get_attribute_val (media, "sendonly") != NULL &&
       /* We want to setup caps for streams configured as backchannel */
       !stream->is_backchannel && src->backchannel != BACKCHANNEL_NONE)
-    goto recvonly_media;
+    goto sendonly_media;
 
   /* Parse global SDP attributes once */
   global_caps = gst_caps_new_empty_simple ("application/x-unknown");
@@ -1846,9 +1846,9 @@
     GST_ERROR_OBJECT (src, "unknown proto in media: '%s'", proto);
     return;
   }
-recvonly_media:
+sendonly_media:
   {
-    GST_WARNING_OBJECT (src, "recvonly media ignored, no backchannel");
+    GST_DEBUG_OBJECT (src, "sendonly media ignored, no backchannel");
     return;
   }
 }
@@ -1913,8 +1913,8 @@
   g_mutex_init (&stream->conninfo.recv_lock);
   g_array_set_clear_func (stream->ptmap, (GDestroyNotify) clear_ptmap_item);
 
-  /* stream is recvonly and onvif backchannel is requested */
-  if (gst_sdp_media_get_attribute_val (media, "recvonly") != NULL &&
+  /* stream is sendonly and onvif backchannel is requested */
+  if (gst_sdp_media_get_attribute_val (media, "sendonly") != NULL &&
       src->backchannel != BACKCHANNEL_NONE)
     stream->is_backchannel = TRUE;
 
@@ -3038,7 +3038,7 @@
   gst_pad_set_active (stream->srcpad, TRUE);
   gst_pad_sticky_events_foreach (pad, copy_sticky_events, stream->srcpad);
 
-  /* don't add the srcpad if this is a recvonly stream */
+  /* don't add the srcpad if this is a sendonly stream */
   if (stream->is_backchannel)
     add_backchannel_fakesink (src, stream, stream->srcpad);
   else
diff --git a/tests/examples/rtsp/test-onvif.c b/tests/examples/rtsp/test-onvif.c
index 671c20f..3a46491 100644
--- a/tests/examples/rtsp/test-onvif.c
+++ b/tests/examples/rtsp/test-onvif.c
@@ -62,7 +62,7 @@
   g_free (caps_str);
 
   s = gst_caps_get_structure (caps, 0);
-  if (gst_structure_has_field (s, "a-recvonly")) {
+  if (gst_structure_has_field (s, "a-sendonly")) {
     stream_id = idx;
     caps = gst_caps_new_empty ();
     s = gst_structure_copy (s);