[vlc-commits] sdp: remove no longer used sdp_AddMedia()

Rémi Denis-Courmont git at videolan.org
Thu Apr 2 16:12:04 CEST 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr  1 22:30:29 2020 +0300| [8073567ad3bd144e8316606e21fded8092cc379f] | committer: Rémi Denis-Courmont

sdp: remove no longer used sdp_AddMedia()

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

 include/vlc_sout.h      |  5 -----
 src/libvlccore.sym      |  1 -
 src/missing.c           | 12 ------------
 src/stream_output/sdp.c | 34 ----------------------------------
 4 files changed, 52 deletions(-)

diff --git a/include/vlc_sout.h b/include/vlc_sout.h
index e5f7eebf0e..9b9c898cfc 100644
--- a/include/vlc_sout.h
+++ b/include/vlc_sout.h
@@ -282,11 +282,6 @@ VLC_API int vlc_sdp_Start(struct vlc_memstream *, vlc_object_t *obj,
                           const char *cfgpref,
                           const struct sockaddr *src, size_t slen,
                           const struct sockaddr *addr, size_t alen) VLC_USED;
-VLC_API void sdp_AddMedia(struct vlc_memstream *, const char *type,
-                          const char *protocol, int dport, unsigned pt,
-                          bool bw_indep, unsigned bw, const char *ptname,
-                          unsigned clockrate, unsigned channels,
-                          const char *fmtp);
 
 /** @} */
 
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 2cf98e5091..cc8098edd9 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -322,7 +322,6 @@ picture_pool_Wait
 picture_Reset
 picture_Setup
 plane_CopyPixels
-sdp_AddMedia
 secstotimestr
 sout_AccessOutControl
 sout_AccessOutDelete
diff --git a/src/missing.c b/src/missing.c
index 2ebd9ab8be..34283b63eb 100644
--- a/src/missing.c
+++ b/src/missing.c
@@ -42,18 +42,6 @@
 #ifndef ENABLE_SOUT
 # include <vlc_sout.h>
 
-void sdp_AddMedia (struct vlc_memstream *sdp, const char *type, const char *protocol,
-                    int dport, unsigned pt, bool bw_indep, unsigned bw,
-                    const char *ptname, unsigned clockrate, unsigned channels,
-                    const char *fmtp)
-{
-    VLC_UNUSED (sdp); VLC_UNUSED (type); VLC_UNUSED (protocol);
-    VLC_UNUSED (dport); VLC_UNUSED (pt); VLC_UNUSED (bw_indep);
-    VLC_UNUSED (bw); VLC_UNUSED (ptname); VLC_UNUSED (clockrate);
-    VLC_UNUSED (channels); VLC_UNUSED (fmtp);
-    assert (sdp == NULL);
-}
-
 noreturn int sout_AccessOutControl(sout_access_out_t *out, int query, ...)
 {
     VLC_UNUSED (out); VLC_UNUSED (query);
diff --git a/src/stream_output/sdp.c b/src/stream_output/sdp.c
index 65aefa4cb4..0c9ca23e42 100644
--- a/src/stream_output/sdp.c
+++ b/src/stream_output/sdp.c
@@ -90,40 +90,6 @@ static bool IsSDPString (const char *str)
     return true;
 }
 
-void sdp_AddMedia(struct vlc_memstream *restrict stream,
-                  const char *type, const char *proto, int dport,
-                  unsigned pt, bool bw_indep, unsigned bw,
-                  const char *ptname, unsigned clock, unsigned chans,
-                  const char *fmtp)
-{
-    /* Some default values */
-    if (type == NULL)
-        type = "video";
-    if (proto == NULL)
-        proto = "RTP/AVP";
-    assert (pt < 128u);
-
-    vlc_memstream_printf(stream, "m=%s %u %s %u\r\n", type, dport, proto, pt);
-
-    if (bw > 0)
-        vlc_memstream_printf(stream, "b=%s:%u\r\n",
-                             bw_indep ? "TIAS" : "AS", bw);
-    vlc_memstream_printf(stream, "b=%s:%u\r\n", "RR", 0);
-
-    /* RTP payload type map */
-    if (ptname != NULL)
-    {
-        vlc_memstream_printf(stream, "a=rtpmap:%u %s/%u", pt, ptname, clock);
-        if ((strcmp(type, "audio") == 0) && (chans != 1))
-            vlc_memstream_printf(stream, "/%u", chans);
-        vlc_memstream_puts(stream, "\r\n");
-    }
-
-    /* Format parameters */
-    if (fmtp != NULL)
-        vlc_memstream_printf(stream, "a=fmtp:%u %s\r\n", pt, fmtp);
-}
-
 int vlc_sdp_Start(struct vlc_memstream *restrict stream,
                   vlc_object_t *obj, const char *cfgpref,
                   const struct sockaddr *src, size_t srclen,



More information about the vlc-commits mailing list