Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Very quick HTTP live streaming support

This doesn't allow seeking, always playing from the start...
  • Loading branch information...
commit 45ff0a42e379172f76df74c5fc00ed29ad39dbe2 1 parent 579fdcf
@jyavenard jyavenard authored
Showing with 9 additions and 2 deletions.
  1. +9 −2 mythtv/libs/libmythtv/streamingringbuffer.cpp
View
11 mythtv/libs/libmythtv/streamingringbuffer.cpp
@@ -1,3 +1,4 @@
+#include <QUrl>
#include "mythcorecontext.h"
#include "mythlogging.h"
@@ -48,10 +49,16 @@ bool StreamingRingBuffer::OpenFile(const QString &lfilename, uint retry_ms)
// TODO check whether local area file
- int res = ffurl_open(&m_context, filename.toAscii(), AVIO_FLAG_READ,
+ QUrl url = filename;
+ if (url.path().endsWith(QLatin1String("m3u8"), Qt::CaseInsensitive))
+ {
+ url.setScheme("hls+http");
+ }
+
+ int res = ffurl_open(&m_context, url.toString().toAscii(), AVIO_FLAG_READ,
NULL, NULL);
if (res >=0 && m_context &&
- (!m_context->is_streamed && ffurl_seek(m_context, 0, SEEK_SET) >= 0))
+ !m_context->is_streamed && ffurl_seek(m_context, 0, SEEK_SET) >= 0)
{
m_streamed = false;
m_allowSeeks = true;
Please sign in to comment.
Something went wrong with that request. Please try again.