[vlc-commits] sdp: deprecate phone number

Rémi Denis-Courmont git at videolan.org
Sun Feb 26 15:43:40 CET 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 25 13:17:12 2017 +0200| [0485ecfa73640115e745e103f5ef3d7d843d7395] | committer: Rémi Denis-Courmont

sdp: deprecate phone number

This seems completely useless (at least, VLC receives ignore it).
Maybe we should also remove URL and/or email.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0485ecfa73640115e745e103f5ef3d7d843d7395
---

 modules/stream_out/rtp.c      |  9 ++-------
 modules/stream_out/standard.c |  9 ++-------
 src/stream_output/sdp.c       | 11 +----------
 3 files changed, 5 insertions(+), 24 deletions(-)

diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index c4436a8..671ba73 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -110,10 +110,6 @@
 #define EMAIL_LONGTEXT N_( \
     "This allows you to give a contact mail address for the stream, that will " \
     "be announced in the SDP (Session Descriptor)." )
-#define PHONE_TEXT N_("Session phone number")
-#define PHONE_LONGTEXT N_( \
-    "This allows you to give a contact telephone number for the stream, that will " \
-    "be announced in the SDP (Session Descriptor)." )
 
 #define PORT_TEXT N_("Port")
 #define PORT_LONGTEXT N_( \
@@ -213,8 +209,7 @@ vlc_module_begin ()
                 URL_LONGTEXT, true )
     add_string( SOUT_CFG_PREFIX "email", "", EMAIL_TEXT,
                 EMAIL_LONGTEXT, true )
-    add_string( SOUT_CFG_PREFIX "phone", "", PHONE_TEXT,
-                PHONE_LONGTEXT, true )
+    add_obsolete_string( SOUT_CFG_PREFIX "phone" ) /* since 3.0.0 */
 
     add_string( SOUT_CFG_PREFIX "proto", "udp", PROTO_TEXT,
                 PROTO_LONGTEXT, false )
@@ -267,7 +262,7 @@ vlc_module_end ()
  *****************************************************************************/
 static const char *const ppsz_sout_options[] = {
     "dst", "name", "cat", "port", "port-audio", "port-video", "*sdp", "ttl",
-    "mux", "sap", "description", "url", "email", "phone",
+    "mux", "sap", "description", "url", "email",
     "proto", "rtcp-mux", "caching",
 #ifdef HAVE_SRTP
     "key", "salt",
diff --git a/modules/stream_out/standard.c b/modules/stream_out/standard.c
index 15c0f2b..572741f 100644
--- a/modules/stream_out/standard.c
+++ b/modules/stream_out/standard.c
@@ -73,11 +73,6 @@
 #define EMAIL_LONGTEXT N_( \
     "This allows you to give a contact mail address for the stream, that will " \
     "be announced in the SDP (Session Descriptor)." )
-#define PHONE_TEXT N_("Session phone number")
-#define PHONE_LONGTEXT N_( \
-    "This allows you to give a contact telephone number for the stream, that will " \
-    "be announced in the SDP (Session Descriptor)." )
-
 
 #define SAP_TEXT N_("SAP announcing")
 #define SAP_LONGTEXT N_("Announce this session with SAP.")
@@ -106,7 +101,7 @@ vlc_module_begin ()
     add_string( SOUT_CFG_PREFIX "description", "", DESC_TEXT, DESC_LONGTEXT, true )
     add_string( SOUT_CFG_PREFIX "url", "", URL_TEXT, URL_LONGTEXT, true )
     add_string( SOUT_CFG_PREFIX "email", "", EMAIL_TEXT, EMAIL_LONGTEXT, true )
-    add_string( SOUT_CFG_PREFIX "phone", "", PHONE_TEXT, PHONE_LONGTEXT, true )
+    add_obsolete_string( SOUT_CFG_PREFIX "phone" ) /* since 3.0.0 */
 
     set_callbacks( Open, Close )
 vlc_module_end ()
@@ -117,7 +112,7 @@ vlc_module_end ()
  *****************************************************************************/
 static const char *const ppsz_sout_options[] = {
     "access", "mux", "url", "dst",
-    "sap", "name", "description", "url", "email", "phone",
+    "sap", "name", "description", "url", "email",
     "bind", "path", NULL
 };
 
diff --git a/src/stream_output/sdp.c b/src/stream_output/sdp.c
index c2ba6b2..ab43de0 100644
--- a/src/stream_output/sdp.c
+++ b/src/stream_output/sdp.c
@@ -223,16 +223,7 @@ int vlc_sdp_Start(struct vlc_memstream *restrict stream,
         free(str);
     }
 
-    strcpy(subvar, "phone");
-    str = var_GetNonEmptyString(obj, varname);
-    if (str != NULL)
-    {
-        if (!IsSDPString(str))
-            goto error;
-
-        vlc_memstream_printf(stream, "p=%s\r\n", str);
-        free(str);
-    }
+    // no phone (useless)
 
     vlc_memstream_printf(stream, "c=%s\r\n", connection);
     // bandwidth not specified



More information about the vlc-commits mailing list