19 #ifdef HLS_USE_MYTHDOWNLOADMANAGER
46 bool Open(
const QString & m3u,
int bitrate_index = 0);
47 void Close(
bool quiet =
false);
48 qint64 Read(uint8_t* buffer, qint64 len);
49 void Throttle(
bool val);
51 bool IsOpen(
const QString& url)
const
52 {
return m_curstream && m_m3u8 == url; }
57 { QMutexLocker lock(&m_streamLock); m_curstream =
nullptr; }
62 {
return QString(
"%1").arg(m_curstream ? m_curstream->M3U8Url() :
""); }
64 #ifdef HLS_USE_MYTHDOWNLOADMANAGER // MythDownloadManager leaks memory
65 static bool DownloadURL(
const QString &url, QByteArray *buffer);
67 static void CancelURL(
const QString &url);
68 static void CancelURL(
const QStringList &urls);
70 static bool IsValidPlaylist(QTextStream & text);
75 uint PercentBuffered(
void)
const;
77 {
return (m_curstream ? m_curstream->TargetDuration() : 0s); }
81 void PlaylistGood(
void);
82 void PlaylistRetrying(
void);
83 int PlaylistRetryCount(
void)
const;
86 bool ParseM3U8(
const QByteArray & buffer,
HLSRecStream* stream =
nullptr);
87 void DecreaseBitrate(
int progid);
88 void IncreaseBitrate(
int progid);
96 void EnableDebugging(
void);
104 int64_t m_curSeq {-1};
105 int m_bitrateIndex {0};
107 bool m_fatal {
false};
109 bool m_throttle {
true};
111 bool m_aesMsg {
false};
116 int m_playlistSize {0};
117 bool m_bandwidthCheck {
false};
124 bool m_debug {
false};
138 #endif // HLS_READER_H