MythTV
master
|
#include <HLSReader.h>
Public Types | |
using | StreamContainer = QMap< QString, HLSRecStream * > |
using | SegmentContainer = QVector< HLSRecSegment > |
Public Member Functions | |
HLSReader (void)=default | |
~HLSReader (void) | |
bool | Open (const QString &m3u, int bitrate_index=0) |
void | Close (bool quiet=false) |
qint64 | Read (uint8_t *buffer, qint64 len) |
void | Throttle (bool val) |
bool | IsThrottled (void) const |
bool | IsOpen (const QString &url) const |
bool | FatalError (void) const |
bool | LoadMetaPlaylists (MythSingleDownload &downloader) |
void | ResetStream (void) |
void | ResetSequence (void) |
QString | StreamURL (void) const |
Static Public Member Functions | |
static void | CancelURL (const QString &url) |
static void | CancelURL (const QStringList &urls) |
static bool | IsValidPlaylist (QTextStream &text) |
Protected Member Functions | |
void | Cancel (bool quiet=false) |
bool | LoadSegments (MythSingleDownload &downloader) |
uint | PercentBuffered (void) const |
std::chrono::seconds | TargetDuration (void) const |
void | AllowPlaylistSwitch (void) |
void | PlaylistGood (void) |
void | PlaylistRetrying (void) |
int | PlaylistRetryCount (void) const |
Private Member Functions | |
bool | ParseM3U8 (const QByteArray &buffer, HLSRecStream *stream=nullptr) |
void | DecreaseBitrate (int progid) |
void | IncreaseBitrate (int progid) |
bool | LoadSegments (HLSRecStream &hlsstream) |
int | DownloadSegmentData (MythSingleDownload &downloader, HLSRecStream *hls, const HLSRecSegment &segment, int playlist_size) |
void | EnableDebugging (void) |
Private Attributes | |
QString | m_m3u8 |
QString | m_segmentBase |
StreamContainer | m_streams |
SegmentContainer | m_segments |
HLSRecStream * | m_curstream {nullptr} |
int64_t | m_curSeq {-1} |
int | m_bitrateIndex {0} |
bool | m_fatal {false} |
bool | m_cancel {false} |
bool | m_throttle {true} |
bool | m_aesMsg {false} |
HLSPlaylistWorker * | m_playlistWorker {nullptr} |
HLSStreamWorker * | m_streamWorker {nullptr} |
int | m_playlistSize {0} |
bool | m_bandwidthCheck {false} |
uint | m_prebufferCnt {10} |
QMutex | m_seqLock |
QMutex | m_streamLock |
QMutex | m_workerLock |
QMutex | m_throttleLock |
QWaitCondition | m_throttleCond |
bool | m_debug {false} |
int | m_debugCnt {0} |
int | m_slowCnt {0} |
QByteArray | m_buffer |
QMutex | m_bufLock |
Friends | |
class | HLSStreamWorker |
class | HLSPlaylistWorker |
Definition at line 34 of file HLSReader.h.
using HLSReader::StreamContainer = QMap<QString, HLSRecStream* > |
Definition at line 40 of file HLSReader.h.
using HLSReader::SegmentContainer = QVector<HLSRecSegment> |
Definition at line 41 of file HLSReader.h.
|
default |
Referenced by HLSStreamHandler::HLSStreamHandler().
HLSReader::~HLSReader | ( | void | ) |
Definition at line 27 of file HLSReader.cpp.
bool HLSReader::Open | ( | const QString & | m3u, |
int | bitrate_index = 0 |
||
) |
Definition at line 34 of file HLSReader.cpp.
Referenced by HLSStreamHandler::run().
Definition at line 143 of file HLSReader.cpp.
Referenced by Open(), and ~HLSReader().
qint64 HLSReader::Read | ( | uint8_t * | buffer, |
qint64 | len | ||
) |
Definition at line 210 of file HLSReader.cpp.
Referenced by HLSStreamHandler::run().
void HLSReader::Throttle | ( | bool | val | ) |
Definition at line 196 of file HLSReader.cpp.
Referenced by HLSStreamHandler::run().
|
inline |
Definition at line 50 of file HLSReader.h.
Referenced by HLSStreamHandler::run().
|
inline |
Definition at line 51 of file HLSReader.h.
Referenced by Open(), and HLSStreamHandler::run().
|
inline |
Definition at line 53 of file HLSReader.h.
Referenced by HLSPlaylistWorker::run(), HLSStreamWorker::run(), and HLSStreamHandler::run().
bool HLSReader::LoadMetaPlaylists | ( | MythSingleDownload & | downloader | ) |
Definition at line 637 of file HLSReader.cpp.
Referenced by HLSPlaylistWorker::run().
|
inline |
Definition at line 56 of file HLSReader.h.
Referenced by HLSPlaylistWorker::run().
|
inline |
Definition at line 58 of file HLSReader.h.
Referenced by ParseM3U8(), and HLSStreamWorker::run().
|
inline |
Definition at line 60 of file HLSReader.h.
Referenced by ParseM3U8().
|
static |
Referenced by Cancel().
|
static |
|
static |
Definition at line 261 of file HLSReader.cpp.
Referenced by IPTVTuningData::IsHLSPlaylist(), and Open().
Definition at line 167 of file HLSReader.cpp.
Referenced by Close().
|
protected |
Definition at line 781 of file HLSReader.cpp.
Referenced by HLSStreamWorker::run().
|
protected |
Definition at line 882 of file HLSReader.cpp.
Referenced by LoadMetaPlaylists(), and HLSPlaylistWorker::run().
|
inlineprotected |
Definition at line 75 of file HLSReader.h.
Referenced by HLSPlaylistWorker::run().
|
inlineprotected |
Definition at line 78 of file HLSReader.h.
Referenced by HLSPlaylistWorker::run().
|
protected |
Definition at line 1019 of file HLSReader.cpp.
Referenced by HLSPlaylistWorker::run().
|
protected |
Definition at line 1026 of file HLSReader.cpp.
Referenced by HLSPlaylistWorker::run().
|
protected |
Definition at line 1033 of file HLSReader.cpp.
Referenced by HLSPlaylistWorker::run().
|
private |
Definition at line 294 of file HLSReader.cpp.
Referenced by LoadMetaPlaylists(), and Open().
|
private |
Definition at line 711 of file HLSReader.cpp.
Referenced by LoadMetaPlaylists().
|
private |
Definition at line 746 of file HLSReader.cpp.
Referenced by LoadMetaPlaylists().
|
private |
|
private |
Definition at line 890 of file HLSReader.cpp.
Referenced by LoadSegments().
|
private |
Definition at line 1041 of file HLSReader.cpp.
Referenced by DownloadSegmentData(), LoadMetaPlaylists(), ParseM3U8(), HLSPlaylistWorker::run(), and HLSStreamWorker::run().
|
friend |
Definition at line 36 of file HLSReader.h.
Referenced by Open().
|
friend |
Definition at line 37 of file HLSReader.h.
Referenced by Open().
|
private |
Definition at line 98 of file HLSReader.h.
Referenced by Open(), and ParseM3U8().
|
private |
Definition at line 99 of file HLSReader.h.
Referenced by LoadMetaPlaylists(), Open(), and ParseM3U8().
|
private |
Definition at line 100 of file HLSReader.h.
Referenced by Close(), DecreaseBitrate(), IncreaseBitrate(), Open(), and ParseM3U8().
|
private |
Definition at line 101 of file HLSReader.h.
Referenced by Cancel(), LoadMetaPlaylists(), LoadSegments(), ParseM3U8(), and PercentBuffered().
|
private |
Definition at line 102 of file HLSReader.h.
Referenced by Cancel(), Close(), DecreaseBitrate(), IncreaseBitrate(), LoadMetaPlaylists(), LoadSegments(), Open(), PlaylistGood(), PlaylistRetryCount(), PlaylistRetrying(), and Read().
|
private |
Definition at line 103 of file HLSReader.h.
Referenced by LoadSegments(), and ParseM3U8().
|
private |
Definition at line 104 of file HLSReader.h.
Referenced by LoadSegments(), Open(), and ParseM3U8().
Definition at line 106 of file HLSReader.h.
Referenced by DownloadSegmentData(), and Open().
Definition at line 107 of file HLSReader.h.
Referenced by Cancel(), LoadMetaPlaylists(), LoadSegments(), Open(), ParseM3U8(), and Read().
Definition at line 108 of file HLSReader.h.
Referenced by LoadSegments(), and Throttle().
Definition at line 110 of file HLSReader.h.
Referenced by ParseM3U8().
|
private |
Definition at line 112 of file HLSReader.h.
|
private |
Definition at line 113 of file HLSReader.h.
Referenced by Cancel(), Close(), LoadMetaPlaylists(), Open(), and ParseM3U8().
|
private |
Definition at line 115 of file HLSReader.h.
Referenced by LoadMetaPlaylists(), LoadSegments(), ParseM3U8(), and PercentBuffered().
Definition at line 116 of file HLSReader.h.
Referenced by LoadMetaPlaylists(), LoadSegments(), and ParseM3U8().
|
private |
Definition at line 117 of file HLSReader.h.
Referenced by LoadSegments(), and Throttle().
|
private |
Definition at line 118 of file HLSReader.h.
Referenced by LoadSegments(), and ParseM3U8().
|
mutableprivate |
Definition at line 119 of file HLSReader.h.
Referenced by Close(), LoadMetaPlaylists(), LoadSegments(), Open(), PlaylistGood(), PlaylistRetryCount(), and PlaylistRetrying().
|
mutableprivate |
Definition at line 120 of file HLSReader.h.
Referenced by Cancel(), Close(), Open(), and ParseM3U8().
|
private |
Definition at line 121 of file HLSReader.h.
Referenced by Cancel(), LoadSegments(), and Throttle().
|
private |
Definition at line 122 of file HLSReader.h.
Referenced by Cancel(), LoadSegments(), and Throttle().
Definition at line 123 of file HLSReader.h.
Referenced by DownloadSegmentData(), EnableDebugging(), LoadSegments(), and ParseM3U8().
|
private |
Definition at line 124 of file HLSReader.h.
Referenced by EnableDebugging(), and ParseM3U8().
|
private |
Definition at line 127 of file HLSReader.h.
Referenced by DownloadSegmentData().
|
private |
Definition at line 128 of file HLSReader.h.
Referenced by DownloadSegmentData(), and Read().
|
private |
Definition at line 129 of file HLSReader.h.
Referenced by DownloadSegmentData(), and Read().