Go to the documentation of this file.
23 #ifndef MythXCode_hlsbuffer_h
24 #define MythXCode_hlsbuffer_h
44 bool IsOpen(
void)
const override;
46 bool OpenFile(
const QString &lfilename,
62 long long SeekInternal(
long long pos,
int whence)
override;
75 int &duration, QString &title);
106 #ifdef USING_LIBCRYPTO
107 bool m_aesmsg {
false};
static int ParseProgramDateTime(HLSStream *hls, const QString &line)
int ChooseSegment(int stream) const
HLSRingBuffer(const QString &lfilename)
bool IsBookmarkAllowed(void) override
HLSStream * FindStream(const HLSStream *hls_new, const StreamsList *streams=nullptr) const
int NumStreams(void) const
int64_t SizeMedia(void) const
int NumSegments(void) const
static bool TestForHTTPLiveStreaming(const QString &filename)
int ParseKey(HLSStream *hls, const QString &line)
HLSStream * GetFirstStream(const StreamsList *streams=nullptr) const
int SafeRead(void *data, uint sz) override
void SanitizeStreams(StreamsList *streams=nullptr)
Streams may not be all starting at the same sequence number, so attempt to align their starting seque...
static int ParseEndList(HLSStream *hls)
int64_t m_bitrate
assumed bitrate of playback used for the purpose of calculating length and seek position.
PlaylistWorker * m_playlistworker
static bool IsHTTPLiveStreaming(QByteArray *s)
bool OpenFile(const QString &lfilename, std::chrono::milliseconds retry_ms=kDefaultOpenTimeout) override
Opens an HTTP Live Stream for reading.
long long SeekInternal(long long pos, int whence) override
static int ParseDecimalValue(const QString &line, int &target)
Return the decimal argument in a line of type: blah:<decimal> presence of value <decimal> is compulso...
HLSSegment * GetSegment(int segnum, std::chrono::milliseconds timeout=1s)
Retrieve segment [segnum] from any available streams.
int Prefetch(int count)
Preferetch the first x segments of the stream.
void WaitUntilBuffered(void)
Wait until we have enough segments buffered to allow smooth playback Do not wait if VOD and at end of...
static int ParseTargetDuration(HLSStream *hls, const QString &line)
HLSStream * GetStreamForSegment(int segnum) const
bool SaveToDisk(const QString &filename, int segstart=0, int segend=-1)
static int ParseDiscontinuity(HLSStream *hls, const QString &line)
static int ParseMediaSequence(HLSStream *hls, const QString &line)
static int ParseSegmentInformation(const HLSStream *hls, const QString &line, int &duration, QString &title)
static QString ParseAttributes(const QString &line, const char *attr)
StreamWorker * m_streamworker
HLSStream * GetStream(int wanted, const StreamsList *streams=nullptr) const
long long GetReadPosition(void) const override
long long GetRealFileSizeInternal(void) const override
~HLSRingBuffer() override
bool IsSeekingAllowed(void) override
static int ParseVersion(const QString &line, int &version)
int ParseM3U8(const QByteArray *buffer, StreamsList *streams=nullptr)
QList< HLSStream * > StreamsList
void FreeStreamsList(QList< HLSStream * > *streams) const
HLSStream * ParseStreamInformation(const QString &line, const QString &uri) const
void SanityCheck(const HLSStream *hls) const
bool IsStreamed(void) override
HLSStream * GetCurrentStream(void) const
return the stream we are currently streaming from
bool m_seektoend
FFmpeg seek to the end of the stream in order to determine the length of the video.
HLSStream * GetLastStream(const StreamsList *streams=nullptr) const
int DurationForBytes(uint size)
returns an estimated duration in ms for size amount of data returns 0 if we can't estimate the durati...
bool IsOpen(void) const override
static int ParseAllowCache(HLSStream *hls, const QString &line)