MythTV
master
|
#include <libmythtv/HLS/httplivestream.h>
Public Member Functions | |
HTTPLiveStream (QString srcFile, uint16_t width=640, uint16_t height=480, uint32_t bitrate=800000, uint32_t abitrate=64000, uint16_t maxSegments=0, uint16_t segmentSize=10, uint32_t aobitrate=32000, int32_t srate=-1) | |
HTTPLiveStream (int streamid) | |
~HTTPLiveStream () | |
bool | InitForWrite (void) |
bool | LoadFromDB (void) |
int | GetStreamID (void) const |
uint16_t | GetWidth (void) const |
uint16_t | GetHeight (void) const |
uint32_t | GetBitrate (void) const |
uint32_t | GetAudioBitrate (void) const |
uint32_t | GetAudioOnlyBitrate (void) const |
uint16_t | GetMaxSegments (void) const |
QString | GetSourceFile (void) const |
QString | GetHTMLPageName (void) const |
QString | GetMetaPlaylistName (void) const |
QString | GetPlaylistName (bool audioOnly=false) const |
uint16_t | GetSegmentSize (void) const |
QString | GetFilename (uint16_t segmentNumber=0, bool fileOnly=false, bool audioOnly=false, bool encoded=false) const |
QString | GetCurrentFilename (bool audioOnly=false, bool encoded=false) const |
void | SetOutputVars (void) |
HTTPLiveStreamStatus | GetDBStatus (void) const |
int | AddStream (void) |
bool | AddSegment (void) |
bool | WriteHTML (void) |
bool | WriteMetaPlaylist (void) |
bool | WritePlaylist (bool audioOnly=false, bool writeEndTag=false) |
bool | SaveSegmentInfo (void) |
bool | UpdateSizeInfo (uint16_t width, uint16_t height, uint16_t srcwidth, uint16_t srcheight) |
bool | UpdateStatus (HTTPLiveStreamStatus status) |
bool | UpdateStatusMessage (const QString &message) |
bool | UpdatePercentComplete (int percent) |
bool | CheckStop (void) |
DTC::LiveStreamInfo * | StartStream (void) |
DTC::LiveStreamInfo * | GetLiveStreamInfo (DTC::LiveStreamInfo *info=nullptr) |
Static Public Member Functions | |
static QString | StatusToString (HTTPLiveStreamStatus status) |
static DTC::LiveStreamInfo * | StopStream (int id) |
static bool | RemoveStream (int id) |
static DTC::LiveStreamInfoList * | GetLiveStreamInfoList (const QString &FileName="") |
Protected Attributes | |
bool | m_writing {false} |
int | m_streamid {-1} |
QString | m_sourceFile |
QString | m_sourceHost |
uint16_t | m_sourceWidth {0} |
uint16_t | m_sourceHeight {0} |
QString | m_outDir |
QString | m_outBase |
QString | m_outBaseEncoded |
QString | m_outFile |
QString | m_outFileEncoded |
QString | m_audioOutFile |
QString | m_audioOutFileEncoded |
uint16_t | m_segmentSize {10} |
uint16_t | m_maxSegments {0} |
uint16_t | m_segmentCount {0} |
uint16_t | m_startSegment {0} |
uint16_t | m_curSegment {0} |
QString | m_httpPrefix |
QString | m_httpPrefixRel |
uint16_t | m_height {480} |
uint16_t | m_width {640} |
uint32_t | m_bitrate {800000} |
uint32_t | m_audioBitrate { 64000} |
uint32_t | m_audioOnlyBitrate { 32000} |
int32_t | m_sampleRate {-1} |
QDateTime | m_created |
QDateTime | m_lastModified |
uint16_t | m_percentComplete {0} |
QString | m_relativeURL |
QString | m_fullURL |
QString | m_statusMessage |
HTTPLiveStreamStatus | m_status {kHLSStatusUndefined} |
Definition at line 22 of file httplivestream.h.
|
explicit |
Definition at line 97 of file httplivestream.cpp.
Referenced by GetLiveStreamInfoList(), RemoveStream(), and StopStream().
|
explicit |
Definition at line 151 of file httplivestream.cpp.
HTTPLiveStream::~HTTPLiveStream | ( | ) |
Definition at line 157 of file httplivestream.cpp.
bool HTTPLiveStream::InitForWrite | ( | void | ) |
Definition at line 167 of file httplivestream.cpp.
Referenced by Transcode::TranscodeFile().
bool HTTPLiveStream::LoadFromDB | ( | void | ) |
Definition at line 683 of file httplivestream.cpp.
Referenced by HTTPLiveStream().
|
inline |
Definition at line 35 of file httplivestream.h.
Referenced by StartStream(), and Transcode::TranscodeFile().
|
inline |
Definition at line 36 of file httplivestream.h.
Referenced by Transcode::TranscodeFile().
|
inline |
Definition at line 37 of file httplivestream.h.
Referenced by Transcode::TranscodeFile().
|
inline |
Definition at line 38 of file httplivestream.h.
Referenced by Transcode::TranscodeFile().
|
inline |
Definition at line 39 of file httplivestream.h.
Referenced by Transcode::TranscodeFile().
|
inline |
Definition at line 40 of file httplivestream.h.
Referenced by Transcode::TranscodeFile().
|
inline |
Definition at line 41 of file httplivestream.h.
|
inline |
Definition at line 42 of file httplivestream.h.
Referenced by main(), and Transcode::TranscodeFile().
QString HTTPLiveStream::GetHTMLPageName | ( | void | ) | const |
Definition at line 341 of file httplivestream.cpp.
QString HTTPLiveStream::GetMetaPlaylistName | ( | void | ) | const |
Definition at line 385 of file httplivestream.cpp.
Referenced by WriteMetaPlaylist().
Definition at line 432 of file httplivestream.cpp.
Referenced by WritePlaylist().
|
inline |
Definition at line 46 of file httplivestream.h.
Referenced by Transcode::TranscodeFile().
QString HTTPLiveStream::GetFilename | ( | uint16_t | segmentNumber = 0 , |
bool | fileOnly = false , |
||
bool | audioOnly = false , |
||
bool | encoded = false |
||
) | const |
Definition at line 181 of file httplivestream.cpp.
Referenced by AddSegment(), GetCurrentFilename(), and WritePlaylist().
Definition at line 202 of file httplivestream.cpp.
Referenced by Transcode::TranscodeFile().
void HTTPLiveStream::SetOutputVars | ( | void | ) |
Definition at line 738 of file httplivestream.cpp.
Referenced by HTTPLiveStream(), LoadFromDB(), and UpdateSizeInfo().
HTTPLiveStreamStatus HTTPLiveStream::GetDBStatus | ( | void | ) | const |
Definition at line 777 of file httplivestream.cpp.
Referenced by StartStream().
int HTTPLiveStream::AddStream | ( | void | ) |
Definition at line 207 of file httplivestream.cpp.
Referenced by HTTPLiveStream().
bool HTTPLiveStream::AddSegment | ( | void | ) |
Definition at line 306 of file httplivestream.cpp.
Referenced by Transcode::TranscodeFile().
bool HTTPLiveStream::WriteHTML | ( | void | ) |
Definition at line 350 of file httplivestream.cpp.
Referenced by InitForWrite().
bool HTTPLiveStream::WriteMetaPlaylist | ( | void | ) |
Definition at line 394 of file httplivestream.cpp.
Referenced by InitForWrite().
Definition at line 445 of file httplivestream.cpp.
Referenced by AddSegment(), and ~HTTPLiveStream().
bool HTTPLiveStream::SaveSegmentInfo | ( | void | ) |
Definition at line 503 of file httplivestream.cpp.
Referenced by AddSegment().
bool HTTPLiveStream::UpdateSizeInfo | ( | uint16_t | width, |
uint16_t | height, | ||
uint16_t | srcwidth, | ||
uint16_t | srcheight | ||
) |
Definition at line 528 of file httplivestream.cpp.
Referenced by Transcode::TranscodeFile().
bool HTTPLiveStream::UpdateStatus | ( | HTTPLiveStreamStatus | status | ) |
Definition at line 579 of file httplivestream.cpp.
Referenced by InitForWrite(), and Transcode::TranscodeFile().
bool HTTPLiveStream::UpdateStatusMessage | ( | const QString & | message | ) |
Definition at line 617 of file httplivestream.cpp.
Referenced by InitForWrite(), and Transcode::TranscodeFile().
bool HTTPLiveStream::UpdatePercentComplete | ( | int | percent | ) |
Definition at line 642 of file httplivestream.cpp.
Referenced by Transcode::TranscodeFile().
|
static |
Definition at line 667 of file httplivestream.cpp.
Referenced by GetLiveStreamInfo(), and UpdateStatus().
bool HTTPLiveStream::CheckStop | ( | void | ) |
Definition at line 799 of file httplivestream.cpp.
Referenced by Transcode::TranscodeFile().
DTC::LiveStreamInfo * HTTPLiveStream::StartStream | ( | void | ) |
Definition at line 821 of file httplivestream.cpp.
|
static |
Definition at line 918 of file httplivestream.cpp.
Referenced by RemoveStream(), and Content::StopLiveStream().
|
static |
Definition at line 846 of file httplivestream.cpp.
Referenced by Content::RemoveLiveStream().
DTC::LiveStreamInfo * HTTPLiveStream::GetLiveStreamInfo | ( | DTC::LiveStreamInfo * | info = nullptr | ) |
Definition at line 967 of file httplivestream.cpp.
Referenced by GetLiveStreamInfoList(), and StartStream().
|
static |
Definition at line 1003 of file httplivestream.cpp.
Referenced by Content::GetLiveStreamList().
Definition at line 83 of file httplivestream.h.
Referenced by InitForWrite(), and ~HTTPLiveStream().
|
protected |
Definition at line 84 of file httplivestream.h.
Referenced by AddSegment(), AddStream(), CheckStop(), GetDBStatus(), GetHTMLPageName(), GetLiveStreamInfo(), GetMetaPlaylistName(), GetPlaylistName(), InitForWrite(), LoadFromDB(), SaveSegmentInfo(), UpdatePercentComplete(), UpdateSizeInfo(), UpdateStatus(), UpdateStatusMessage(), WriteHTML(), WriteMetaPlaylist(), and WritePlaylist().
|
protected |
Definition at line 85 of file httplivestream.h.
Referenced by AddStream(), GetLiveStreamInfo(), HTTPLiveStream(), LoadFromDB(), UpdateSizeInfo(), and WriteHTML().
|
protected |
Definition at line 86 of file httplivestream.h.
Referenced by GetLiveStreamInfo(), HTTPLiveStream(), and LoadFromDB().
|
protected |
Definition at line 87 of file httplivestream.h.
Referenced by GetLiveStreamInfo(), LoadFromDB(), and UpdateSizeInfo().
|
protected |
Definition at line 88 of file httplivestream.h.
Referenced by GetLiveStreamInfo(), LoadFromDB(), and UpdateSizeInfo().
|
protected |
Definition at line 89 of file httplivestream.h.
Referenced by AddStream(), GetFilename(), GetHTMLPageName(), GetMetaPlaylistName(), GetPlaylistName(), HTTPLiveStream(), LoadFromDB(), and WriteHTML().
|
protected |
Definition at line 90 of file httplivestream.h.
Referenced by AddStream(), GetHTMLPageName(), GetMetaPlaylistName(), HTTPLiveStream(), LoadFromDB(), SetOutputVars(), UpdateSizeInfo(), and WriteHTML().
|
protected |
Definition at line 91 of file httplivestream.h.
Referenced by SetOutputVars(), and WriteHTML().
|
protected |
Definition at line 92 of file httplivestream.h.
Referenced by GetFilename(), GetPlaylistName(), and SetOutputVars().
|
protected |
Definition at line 93 of file httplivestream.h.
Referenced by GetFilename(), SetOutputVars(), and WriteMetaPlaylist().
|
protected |
Definition at line 94 of file httplivestream.h.
Referenced by GetFilename(), GetPlaylistName(), and SetOutputVars().
|
protected |
Definition at line 95 of file httplivestream.h.
Referenced by GetFilename(), SetOutputVars(), and WriteMetaPlaylist().
|
protected |
Definition at line 96 of file httplivestream.h.
Referenced by AddStream(), GetLiveStreamInfo(), HTTPLiveStream(), LoadFromDB(), and WritePlaylist().
|
protected |
Definition at line 97 of file httplivestream.h.
Referenced by AddSegment(), AddStream(), GetLiveStreamInfo(), and LoadFromDB().
|
protected |
Definition at line 98 of file httplivestream.h.
Referenced by AddSegment(), GetLiveStreamInfo(), LoadFromDB(), SaveSegmentInfo(), and WritePlaylist().
|
protected |
Definition at line 99 of file httplivestream.h.
Referenced by AddSegment(), GetLiveStreamInfo(), LoadFromDB(), SaveSegmentInfo(), and WritePlaylist().
|
protected |
Definition at line 100 of file httplivestream.h.
Referenced by AddSegment(), GetCurrentFilename(), GetLiveStreamInfo(), LoadFromDB(), and SaveSegmentInfo().
|
protected |
Definition at line 101 of file httplivestream.h.
Referenced by HTTPLiveStream(), SetOutputVars(), and UpdateSizeInfo().
|
protected |
Definition at line 102 of file httplivestream.h.
Referenced by HTTPLiveStream(), SetOutputVars(), and UpdateSizeInfo().
|
protected |
Definition at line 103 of file httplivestream.h.
Referenced by AddStream(), GetLiveStreamInfo(), HTTPLiveStream(), LoadFromDB(), and UpdateSizeInfo().
|
protected |
Definition at line 104 of file httplivestream.h.
Referenced by AddStream(), GetLiveStreamInfo(), HTTPLiveStream(), LoadFromDB(), and UpdateSizeInfo().
|
protected |
Definition at line 105 of file httplivestream.h.
Referenced by AddStream(), GetLiveStreamInfo(), HTTPLiveStream(), LoadFromDB(), UpdateSizeInfo(), and WriteMetaPlaylist().
|
protected |
Definition at line 106 of file httplivestream.h.
Referenced by AddStream(), GetLiveStreamInfo(), HTTPLiveStream(), LoadFromDB(), UpdateSizeInfo(), and WriteMetaPlaylist().
|
protected |
Definition at line 107 of file httplivestream.h.
Referenced by AddSegment(), AddStream(), GetLiveStreamInfo(), HTTPLiveStream(), LoadFromDB(), SetOutputVars(), WriteMetaPlaylist(), and ~HTTPLiveStream().
|
protected |
Definition at line 108 of file httplivestream.h.
Referenced by AddStream(), and LoadFromDB().
|
protected |
Definition at line 110 of file httplivestream.h.
Referenced by AddStream(), GetLiveStreamInfo(), and LoadFromDB().
|
protected |
Definition at line 111 of file httplivestream.h.
Referenced by AddStream(), GetLiveStreamInfo(), and LoadFromDB().
|
protected |
Definition at line 112 of file httplivestream.h.
Referenced by GetLiveStreamInfo(), LoadFromDB(), and UpdatePercentComplete().
|
protected |
Definition at line 113 of file httplivestream.h.
Referenced by AddStream(), GetLiveStreamInfo(), HTTPLiveStream(), LoadFromDB(), and UpdateSizeInfo().
|
protected |
Definition at line 114 of file httplivestream.h.
Referenced by AddStream(), GetLiveStreamInfo(), HTTPLiveStream(), LoadFromDB(), and UpdateSizeInfo().
|
protected |
Definition at line 115 of file httplivestream.h.
Referenced by GetLiveStreamInfo(), LoadFromDB(), and UpdateStatusMessage().
|
protected |
Definition at line 117 of file httplivestream.h.
Referenced by AddStream(), GetLiveStreamInfo(), LoadFromDB(), and UpdateStatus().