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; }
61 {
return QString(
"%1").arg(m_curstream ? m_curstream->M3U8Url() :
""); }
63 #ifdef HLS_USE_MYTHDOWNLOADMANAGER // MythDownloadManager leaks memory
64 static bool DownloadURL(
const QString &url, QByteArray *buffer);
66 static void CancelURL(
const QString &url);
67 static void CancelURL(
const QStringList &urls);
69 static bool IsValidPlaylist(QTextStream & text);
74 uint PercentBuffered(
void)
const;
76 {
return (m_curstream ? m_curstream->TargetDuration() : 0s); }
80 void PlaylistGood(
void);
81 void PlaylistRetrying(
void);
82 int PlaylistRetryCount(
void)
const;
85 bool ParseM3U8(
const QByteArray & buffer,
HLSRecStream* stream =
nullptr);
86 void DecreaseBitrate(
int progid);
87 void IncreaseBitrate(
int progid);
95 void EnableDebugging(
void);
103 int64_t m_curSeq {-1};
104 int m_bitrateIndex {0};
106 bool m_fatal {
false};
108 bool m_throttle {
true};
110 bool m_aesMsg {
false};
115 int m_playlistSize {0};
116 bool m_bandwidthCheck {
false};
123 bool m_debug {
false};
132 #endif // HLS_READER_H