MythTV  master
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
HLSRecStream Class Reference

#include <HLSStream.h>

Collaboration diagram for HLSRecStream:
Collaboration graph
[legend]

Public Member Functions

 HLSRecStream (int seq, uint64_t bitrate, QString m3u8_url, QString segment_base_url)
 
 ~HLSRecStream (void)
 
int Read (uint8_t *buffer, int len)
 
QString toString (void) const
 
int Id (void) const
 
int Version (void) const
 
void SetVersion (int x)
 
int TargetDuration (void) const
 
void SetTargetDuration (int x)
 
uint64_t AverageBandwidth (void) const
 
uint64_t Bitrate (void) const
 
void SetBitrate (uint64_t bitrate)
 
uint64_t CurrentByteRate (void) const
 
void SetCurrentByteRate (uint64_t byterate)
 
bool Cache (void) const
 
void SetCache (bool x)
 
bool Live (void) const
 
void SetLive (bool x)
 
QString M3U8Url (void) const
 
QString SegmentBaseUrl (void) const
 
void SetSegmentBaseUrl (const QString &n)
 
uint Duration (void) const
 
uint NumCachedSegments (void) const
 
uint NumReleasedSegments (void) const
 
uint NumTotalSegments (void) const
 
void Good (void)
 
void Retrying (void)
 
int RetryCount (void) const
 
bool operator< (const HLSRecStream &b) const
 
bool operator> (const HLSRecStream &b) const
 

Static Public Member Functions

static bool IsGreater (const HLSRecStream *s1, const HLSRecStream *s2)
 

Protected Member Functions

void AverageBandwidth (int64_t bandwidth)
 

Private Attributes

int m_id
 
int m_version {1}
 
int m_targetDuration {-1}
 
uint64_t m_curByteRate {0}
 
uint64_t m_bitrate
 
int64_t m_duration {0LL}
 
bool m_live {true}
 
int64_t m_bandwidth {0}
 
double m_sumBandwidth {0.0}
 
QQueue< int64_t > m_bandwidthSegs
 
QString m_m3u8Url
 
QString m_segmentBaseUrl
 
QMutex m_lock
 
bool m_cache {false}
 
int m_retries {0}
 

Friends

class HLSReader
 

Detailed Description

Definition at line 16 of file HLSStream.h.

Constructor & Destructor Documentation

◆ HLSRecStream()

HLSRecStream::HLSRecStream ( int  seq,
uint64_t  bitrate,
QString  m3u8_url,
QString  segment_base_url 
)

Definition at line 12 of file HLSStream.cpp.

◆ ~HLSRecStream()

HLSRecStream::~HLSRecStream ( void  )

Definition at line 21 of file HLSStream.cpp.

Member Function Documentation

◆ Read()

int HLSRecStream::Read ( uint8_t *  buffer,
int  len 
)

◆ toString()

QString HLSRecStream::toString ( void  ) const

Definition at line 33 of file HLSStream.cpp.

Referenced by HLSReader::LoadMetaPlaylists(), and HLSReader::ParseM3U8().

◆ Id()

int HLSRecStream::Id ( void  ) const
inline

Definition at line 31 of file HLSStream.h.

Referenced by HLSReader::LoadMetaPlaylists(), and toString().

◆ Version()

int HLSRecStream::Version ( void  ) const
inline

Definition at line 32 of file HLSStream.h.

Referenced by HLSReader::ParseM3U8().

◆ SetVersion()

void HLSRecStream::SetVersion ( int  x)
inline

Definition at line 33 of file HLSStream.h.

Referenced by HLSReader::ParseM3U8().

◆ TargetDuration()

int HLSRecStream::TargetDuration ( void  ) const
inline

Definition at line 34 of file HLSStream.h.

◆ SetTargetDuration()

void HLSRecStream::SetTargetDuration ( int  x)
inline

Definition at line 35 of file HLSStream.h.

Referenced by HLSReader::ParseM3U8().

◆ AverageBandwidth() [1/2]

uint64_t HLSRecStream::AverageBandwidth ( void  ) const
inline

Definition at line 36 of file HLSStream.h.

Referenced by HLSReader::DownloadSegmentData().

◆ Bitrate()

uint64_t HLSRecStream::Bitrate ( void  ) const
inline

◆ SetBitrate()

void HLSRecStream::SetBitrate ( uint64_t  bitrate)
inline

Definition at line 38 of file HLSStream.h.

Referenced by HLSReader::DownloadSegmentData().

◆ CurrentByteRate()

uint64_t HLSRecStream::CurrentByteRate ( void  ) const
inline

Definition at line 39 of file HLSStream.h.

◆ SetCurrentByteRate()

void HLSRecStream::SetCurrentByteRate ( uint64_t  byterate)
inline

Definition at line 40 of file HLSStream.h.

Referenced by HLSReader::DownloadSegmentData().

◆ Cache()

bool HLSRecStream::Cache ( void  ) const
inline

Definition at line 41 of file HLSStream.h.

◆ SetCache()

void HLSRecStream::SetCache ( bool  x)
inline

Definition at line 42 of file HLSStream.h.

Referenced by HLSReader::ParseM3U8().

◆ Live()

bool HLSRecStream::Live ( void  ) const
inline

Definition at line 43 of file HLSStream.h.

Referenced by HLSReader::ParseM3U8().

◆ SetLive()

void HLSRecStream::SetLive ( bool  x)
inline

Definition at line 44 of file HLSStream.h.

Referenced by HLSReader::ParseM3U8().

◆ M3U8Url()

QString HLSRecStream::M3U8Url ( void  ) const
inline

Definition at line 45 of file HLSStream.h.

Referenced by HLSReader::LoadMetaPlaylists().

◆ SegmentBaseUrl()

QString HLSRecStream::SegmentBaseUrl ( void  ) const
inline

Definition at line 46 of file HLSStream.h.

Referenced by HLSReader::ParseM3U8().

◆ SetSegmentBaseUrl()

void HLSRecStream::SetSegmentBaseUrl ( const QString &  n)
inline

Definition at line 47 of file HLSStream.h.

Referenced by HLSReader::LoadMetaPlaylists().

◆ Duration()

uint HLSRecStream::Duration ( void  ) const

Definition at line 146 of file HLSStream.cpp.

◆ NumCachedSegments()

uint HLSRecStream::NumCachedSegments ( void  ) const

◆ NumReleasedSegments()

uint HLSRecStream::NumReleasedSegments ( void  ) const

◆ NumTotalSegments()

uint HLSRecStream::NumTotalSegments ( void  ) const

◆ Good()

void HLSRecStream::Good ( void  )
inline

Definition at line 54 of file HLSStream.h.

Referenced by HLSReader::PlaylistGood().

◆ Retrying()

void HLSRecStream::Retrying ( void  )
inline

Definition at line 55 of file HLSStream.h.

Referenced by HLSReader::PlaylistRetrying().

◆ RetryCount()

int HLSRecStream::RetryCount ( void  ) const
inline

Definition at line 56 of file HLSStream.h.

Referenced by HLSReader::PlaylistRetryCount().

◆ IsGreater()

static bool HLSRecStream::IsGreater ( const HLSRecStream s1,
const HLSRecStream s2 
)
static

◆ operator<()

bool HLSRecStream::operator< ( const HLSRecStream b) const

Definition at line 152 of file HLSStream.cpp.

◆ operator>()

bool HLSRecStream::operator> ( const HLSRecStream b) const

Definition at line 157 of file HLSStream.cpp.

◆ AverageBandwidth() [2/2]

void HLSRecStream::AverageBandwidth ( int64_t  bandwidth)
protected

Definition at line 136 of file HLSStream.cpp.

Friends And Related Function Documentation

◆ HLSReader

friend class HLSReader
friend

Definition at line 18 of file HLSStream.h.

Member Data Documentation

◆ m_id

int HLSRecStream::m_id
private

Definition at line 80 of file HLSStream.h.

Referenced by Id().

◆ m_version

int HLSRecStream::m_version {1}
private

Definition at line 81 of file HLSStream.h.

Referenced by SetVersion(), and Version().

◆ m_targetDuration

int HLSRecStream::m_targetDuration {-1}
private

Definition at line 82 of file HLSStream.h.

Referenced by SetTargetDuration(), and TargetDuration().

◆ m_curByteRate

uint64_t HLSRecStream::m_curByteRate {0}
private

Definition at line 83 of file HLSStream.h.

Referenced by CurrentByteRate(), and SetCurrentByteRate().

◆ m_bitrate

uint64_t HLSRecStream::m_bitrate
private

Definition at line 84 of file HLSStream.h.

Referenced by Bitrate(), and SetBitrate().

◆ m_duration

int64_t HLSRecStream::m_duration {0LL}
private

Definition at line 85 of file HLSStream.h.

Referenced by Duration().

◆ m_live

bool HLSRecStream::m_live {true}
private

Definition at line 86 of file HLSStream.h.

Referenced by Live(), and SetLive().

◆ m_bandwidth

int64_t HLSRecStream::m_bandwidth {0}
private

Definition at line 87 of file HLSStream.h.

Referenced by AverageBandwidth().

◆ m_sumBandwidth

double HLSRecStream::m_sumBandwidth {0.0}
private

Definition at line 88 of file HLSStream.h.

Referenced by AverageBandwidth().

◆ m_bandwidthSegs

QQueue<int64_t> HLSRecStream::m_bandwidthSegs
private

Definition at line 89 of file HLSStream.h.

Referenced by AverageBandwidth().

◆ m_m3u8Url

QString HLSRecStream::m_m3u8Url
private

Definition at line 91 of file HLSStream.h.

Referenced by M3U8Url().

◆ m_segmentBaseUrl

QString HLSRecStream::m_segmentBaseUrl
private

Definition at line 92 of file HLSStream.h.

Referenced by SegmentBaseUrl(), and SetSegmentBaseUrl().

◆ m_lock

QMutex HLSRecStream::m_lock
mutableprivate

Definition at line 93 of file HLSStream.h.

Referenced by Duration().

◆ m_cache

bool HLSRecStream::m_cache {false}
private

Definition at line 94 of file HLSStream.h.

Referenced by Cache(), and SetCache().

◆ m_retries

int HLSRecStream::m_retries {0}
private

Definition at line 95 of file HLSStream.h.

Referenced by Good(), RetryCount(), and Retrying().


The documentation for this class was generated from the following files: