[5/6] hlsproto: Encourage users to try the hls demuxer instead of the proto

Message ID 1329214941-97881-5-git-send-email-martin@martin.st
State Superseded
Headers show

Commit Message

Martin Storsjö Feb. 14, 2012, 10:22 a.m.
---
 doc/protocols.texi     |    5 +++++
 libavformat/hlsproto.c |    7 +++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

Comments

Diego Biurrun Feb. 14, 2012, 10:55 a.m. | #1
On Tue, Feb 14, 2012 at 12:22:20PM +0200, Martin Storsjö wrote:
> 
> --- a/doc/protocols.texi
> +++ b/doc/protocols.texi
> @@ -80,6 +80,11 @@ hls+http://host/path/to/remote/resource.m3u8
>  
> +Using this protocol is discouraged - the hls demuxer should work
> +just as well (if not, please report the issues) and is more complete.
> +To use the hls demuxer instead, simply use the direct urls to the
> +m3u8 files.

URLs

> --- a/libavformat/hlsproto.c
> +++ b/libavformat/hlsproto.c
> @@ -217,6 +217,13 @@ static int applehttp_open(URLContext *h, const char *uri, int flags)
> +    av_log(h, AV_LOG_WARNING, "Using the hls protocol is discouraged, "
> +                              "please try using the hls demuxer instead. "
> +                              "The hls demuxer should be more complete "
> +                              "and work as well as the protocol implementation. "
> +                              "(If not, please report it.) To use the demuxer, "
> +                              "simply use %s as url.\n",
> +                              s->playlisturl);

I'd say break the line before the quotes and save some lines.

Diego

Patch

diff --git a/doc/protocols.texi b/doc/protocols.texi
index 6268860..a1cde46 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -80,6 +80,11 @@  hls+http://host/path/to/remote/resource.m3u8
 hls+file://path/to/local/resource.m3u8
 @end example
 
+Using this protocol is discouraged - the hls demuxer should work
+just as well (if not, please report the issues) and is more complete.
+To use the hls demuxer instead, simply use the direct urls to the
+m3u8 files.
+
 @section http
 
 HTTP (Hyper Text Transfer Protocol).
diff --git a/libavformat/hlsproto.c b/libavformat/hlsproto.c
index d5b8e70..d634422 100644
--- a/libavformat/hlsproto.c
+++ b/libavformat/hlsproto.c
@@ -217,6 +217,13 @@  static int applehttp_open(URLContext *h, const char *uri, int flags)
         ret = AVERROR(EINVAL);
         goto fail;
     }
+    av_log(h, AV_LOG_WARNING, "Using the hls protocol is discouraged, "
+                              "please try using the hls demuxer instead. "
+                              "The hls demuxer should be more complete "
+                              "and work as well as the protocol implementation. "
+                              "(If not, please report it.) To use the demuxer, "
+                              "simply use %s as url.\n",
+                              s->playlisturl);
 
     if ((ret = parse_playlist(h, s->playlisturl)) < 0)
         goto fail;