MythTV
master
|
#include <libmythtv/recorders/HLS/HLSReader.h>
Public Types | |
using | StreamContainer = QMap< QString, HLSRecStream * > |
using | SegmentContainer = QVector< HLSRecSegment > |
Public Member Functions | |
HLSReader (int inputId) | |
~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) |
int | DownloadSegmentData (MythSingleDownload &downloader, HLSRecStream *hls, 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 |
int | m_inputId {0} |
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.
|
inline |
Definition at line 43 of file HLSReader.h.
HLSReader::~HLSReader | ( | void | ) |
Definition at line 28 of file HLSReader.cpp.
bool HLSReader::Open | ( | const QString & | m3u, |
int | bitrate_index = 0 |
||
) |
Definition at line 35 of file HLSReader.cpp.
Referenced by HLSStreamHandler::run().
Definition at line 144 of file HLSReader.cpp.
Referenced by Open(), and ~HLSReader().
qint64 HLSReader::Read | ( | uint8_t * | buffer, |
qint64 | len | ||
) |
Definition at line 211 of file HLSReader.cpp.
Referenced by HLSStreamHandler::run().
void HLSReader::Throttle | ( | bool | val | ) |
Definition at line 197 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 735 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 264 of file HLSReader.cpp.
Referenced by IPTVTuningData::IsHLSPlaylist(), and Open().
Definition at line 168 of file HLSReader.cpp.
Referenced by Close().
|
protected |
Definition at line 879 of file HLSReader.cpp.
Referenced by HLSStreamWorker::run().
|
protected |
Definition at line 984 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 1137 of file HLSReader.cpp.
Referenced by HLSPlaylistWorker::run().
|
protected |
Definition at line 1144 of file HLSReader.cpp.
Referenced by HLSPlaylistWorker::run().
|
protected |
Definition at line 1151 of file HLSReader.cpp.
Referenced by HLSPlaylistWorker::run().
|
private |
Definition at line 301 of file HLSReader.cpp.
Referenced by LoadMetaPlaylists(), and Open().
|
private |
Definition at line 809 of file HLSReader.cpp.
Referenced by LoadMetaPlaylists().
|
private |
Definition at line 844 of file HLSReader.cpp.
Referenced by LoadMetaPlaylists().
|
private |
Definition at line 992 of file HLSReader.cpp.
Referenced by LoadSegments().
|
private |
Definition at line 1159 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 97 of file HLSReader.h.
Referenced by Open(), and ParseM3U8().
|
private |
Definition at line 98 of file HLSReader.h.
Referenced by LoadMetaPlaylists(), Open(), and ParseM3U8().
|
private |
Definition at line 99 of file HLSReader.h.
Referenced by Close(), DecreaseBitrate(), IncreaseBitrate(), Open(), and ParseM3U8().
|
private |
Definition at line 100 of file HLSReader.h.
Referenced by Cancel(), LoadMetaPlaylists(), LoadSegments(), ParseM3U8(), and PercentBuffered().
|
private |
Definition at line 101 of file HLSReader.h.
Referenced by Cancel(), Close(), DecreaseBitrate(), IncreaseBitrate(), LoadMetaPlaylists(), LoadSegments(), Open(), PlaylistGood(), PlaylistRetryCount(), PlaylistRetrying(), and Read().
|
private |
Definition at line 102 of file HLSReader.h.
Referenced by LoadSegments(), and ParseM3U8().
|
private |
Definition at line 103 of file HLSReader.h.
Referenced by LoadSegments(), Open(), and ParseM3U8().
Definition at line 105 of file HLSReader.h.
Referenced by DownloadSegmentData(), and Open().
Definition at line 106 of file HLSReader.h.
Referenced by Cancel(), LoadMetaPlaylists(), LoadSegments(), Open(), ParseM3U8(), and Read().
Definition at line 107 of file HLSReader.h.
Referenced by LoadSegments(), and Throttle().
Definition at line 109 of file HLSReader.h.
Referenced by ParseM3U8().
|
private |
Definition at line 111 of file HLSReader.h.
|
private |
Definition at line 112 of file HLSReader.h.
Referenced by Cancel(), Close(), LoadMetaPlaylists(), Open(), and ParseM3U8().
|
private |
Definition at line 114 of file HLSReader.h.
Referenced by LoadMetaPlaylists(), LoadSegments(), ParseM3U8(), and PercentBuffered().
Definition at line 115 of file HLSReader.h.
Referenced by LoadMetaPlaylists(), LoadSegments(), and ParseM3U8().
|
private |
Definition at line 116 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 120 of file HLSReader.h.
Referenced by Close(), LoadMetaPlaylists(), LoadSegments(), Open(), PlaylistGood(), PlaylistRetryCount(), and PlaylistRetrying().
|
mutableprivate |
Definition at line 122 of file HLSReader.h.
Referenced by Cancel(), Close(), Open(), and ParseM3U8().
|
private |
Definition at line 124 of file HLSReader.h.
Referenced by Cancel(), LoadSegments(), and Throttle().
|
private |
Definition at line 125 of file HLSReader.h.
Referenced by Cancel(), LoadSegments(), and Throttle().
Definition at line 127 of file HLSReader.h.
Referenced by DownloadSegmentData(), EnableDebugging(), LoadSegments(), and ParseM3U8().
|
private |
Definition at line 128 of file HLSReader.h.
Referenced by EnableDebugging(), and ParseM3U8().
|
private |
Definition at line 131 of file HLSReader.h.
Referenced by DownloadSegmentData().
|
private |
Definition at line 132 of file HLSReader.h.
Referenced by DownloadSegmentData(), and Read().
|
private |
Definition at line 133 of file HLSReader.h.
Referenced by DownloadSegmentData(), and Read().
|
private |
Definition at line 136 of file HLSReader.h.
Referenced by LoadSegments(), and ParseM3U8().