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>

Public Member Functions

 HLSRecStream (int seq, uint64_t bitrate, const QString &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)
 
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 Url (void) const
 
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_bandwidth_segs
 
QString m_url
 
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,
const QString &  url 
)

Definition at line 10 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  )
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().

◆ Url()

QString HLSRecStream::Url ( void  ) const
inline

Definition at line 45 of file HLSStream.h.

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

◆ Duration()

uint HLSRecStream::Duration ( void  ) const

Definition at line 147 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 52 of file HLSStream.h.

Referenced by HLSReader::PlaylistGood().

◆ Retrying()

void HLSRecStream::Retrying ( void  )
inline

Definition at line 53 of file HLSStream.h.

Referenced by HLSReader::PlaylistRetrying().

◆ RetryCount()

int HLSRecStream::RetryCount ( void  ) const
inline

Definition at line 54 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 153 of file HLSStream.cpp.

◆ operator>()

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

Definition at line 158 of file HLSStream.cpp.

◆ AverageBandwidth() [2/2]

void HLSRecStream::AverageBandwidth ( int64_t  bandwidth)
protected

Definition at line 137 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 78 of file HLSStream.h.

Referenced by Id().

◆ m_version

int HLSRecStream::m_version {1}
private

Definition at line 79 of file HLSStream.h.

Referenced by SetVersion(), and Version().

◆ m_targetduration

int HLSRecStream::m_targetduration {-1}
private

Definition at line 80 of file HLSStream.h.

Referenced by SetTargetDuration(), and TargetDuration().

◆ m_curbyterate

uint64_t HLSRecStream::m_curbyterate {0}
private

Definition at line 81 of file HLSStream.h.

Referenced by CurrentByteRate(), and SetCurrentByteRate().

◆ m_bitrate

uint64_t HLSRecStream::m_bitrate
private

Definition at line 82 of file HLSStream.h.

Referenced by Bitrate(), and SetBitrate().

◆ m_duration

int64_t HLSRecStream::m_duration {0LL}
private

Definition at line 83 of file HLSStream.h.

Referenced by Duration().

◆ m_live

bool HLSRecStream::m_live {true}
private

Definition at line 84 of file HLSStream.h.

Referenced by Live(), and SetLive().

◆ m_bandwidth

int64_t HLSRecStream::m_bandwidth {0}
private

Definition at line 85 of file HLSStream.h.

Referenced by AverageBandwidth().

◆ m_sumbandwidth

double HLSRecStream::m_sumbandwidth {0.0}
private

Definition at line 86 of file HLSStream.h.

Referenced by AverageBandwidth().

◆ m_bandwidth_segs

QQueue<int64_t> HLSRecStream::m_bandwidth_segs
private

Definition at line 87 of file HLSStream.h.

Referenced by AverageBandwidth().

◆ m_url

QString HLSRecStream::m_url
private

Definition at line 89 of file HLSStream.h.

Referenced by Url().

◆ m_lock

QMutex HLSRecStream::m_lock
mutableprivate

Definition at line 90 of file HLSStream.h.

Referenced by Duration().

◆ m_cache

bool HLSRecStream::m_cache {false}
private

Definition at line 91 of file HLSStream.h.

Referenced by Cache(), and SetCache().

◆ m_retries

int HLSRecStream::m_retries {0}
private

Definition at line 92 of file HLSStream.h.

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


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