19#ifdef HLS_USE_MYTHDOWNLOADMANAGER
45 bool Open(
const QString & m3u,
int bitrate_index = 0);
46 void Close(
bool quiet =
false);
47 qint64 Read(uint8_t* buffer, qint64 len);
48 void Throttle(
bool val);
50 bool IsOpen(
const QString& url)
const
51 {
return m_curstream && m_m3u8 == url; }
56 { QMutexLocker lock(&m_streamLock); m_curstream =
nullptr; }
60 {
return QString(
"%1").arg(m_curstream ? m_curstream->M3U8Url() :
""); }
62#ifdef HLS_USE_MYTHDOWNLOADMANAGER
63 static bool DownloadURL(
const QString &url, QByteArray *buffer);
68 static bool IsValidPlaylist(QTextStream & text);
73 uint PercentBuffered(
void)
const;
75 {
return (m_curstream ? m_curstream->TargetDuration() : 0s); }
79 void PlaylistGood(
void);
80 void PlaylistRetrying(
void);
81 int PlaylistRetryCount(
void)
const;
84 bool ParseM3U8(
const QByteArray & buffer,
HLSRecStream* stream =
nullptr);
85 void DecreaseBitrate(
int progid);
86 void IncreaseBitrate(
int progid);
93 void EnableDebugging(
void);
101 int64_t m_curSeq {-1};
102 int m_bitrateIndex {0};
104 bool m_fatal {
false};
106 bool m_throttle {
true};
108 bool m_aesMsg {
false};
113 int m_playlistSize {0};
114 bool m_bandwidthCheck {
false};
126 bool m_debug {
false};
void AllowPlaylistSwitch(void)
QWaitCondition m_throttleCond
StreamContainer m_streams
bool IsThrottled(void) const
QVector< HLSRecSegment > SegmentContainer
static void CancelURL(const QStringList &urls)
bool IsOpen(const QString &url) const
static void CancelURL(const QString &url)
SegmentContainer m_segments
std::chrono::seconds TargetDuration(void) const
QString StreamURL(void) const
QMap< QString, HLSRecStream * > StreamContainer
bool FatalError(void) const