Go to the documentation of this file.
18 #define LOC QString("IPTVRec: ")
35 LOG(VB_GENERAL, LOG_INFO,
LOC +
"Stream already open");
42 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Open: Open channel failed");
44 LOG(VB_RECORD, LOG_INFO,
LOC +
"opened successfully");
61 LOG(VB_RECORD, LOG_INFO,
LOC +
"Close()");
109 LOG(VB_RECORD, LOG_INFO,
LOC +
"run -- begin");
113 m_error =
"Failed to open IPTVRecorder device";
148 LOG(VB_GENERAL, LOG_WARNING,
LOC +
149 "Recording will not commence until a PMT is set.");
150 std::this_thread::sleep_for(5ms);
155 LOG(VB_RECORD, LOG_INFO,
LOC +
"run -- ending...");
168 LOG(VB_RECORD, LOG_INFO,
LOC +
"run -- end");
void HandleSingleProgramPMT(ProgramMapTable *pmt, bool insert) override
#define LOC
-*- Mode: c++ -*- IPTVRecorder Copyright (c) 2006-2009 Silicondust Engineering Ltd,...
ProgramMapTable * m_inputPmt
PMT on input side.
void ResetForNewFile(void) override
virtual void SetStreamData(MPEGStreamData *data)
bool IsErrored(void) override
Tells us whether an unrecoverable error has been encountered.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
void FinishRecording(void) override
Flushes the ringbuffer, and if this is not a live LiveTV recording saves the position map and filesiz...
const ProgramMapTable * PMTSingleProgram(void) const
QWaitCondition m_recordingWait
void RecorderPaused(void)
This is a callback, called by the "recorder" instance when it has actually paused.
const ProgramAssociationTable * PATSingleProgram(void) const
void HandleSingleProgramPAT(ProgramAssociationTable *pat, bool insert) override
Encapsulates data about MPEG stream and emits events for each table.
void RemoveWritingListener(TSPacketListener *val)
virtual bool IsRecordingRequested(void)
Tells us if StopRecording() has been called.
IPTVRecorder(TVRec *rec, IPTVChannel *channel)
This is a specialization of RecorderBase used to handle MPEG-2, MPEG-4, MPEG-4 AVC,...
bool IsOpen(void) const override
Reports whether channel is already open.
void SetStreamData(MPEGStreamData *sd)
virtual void StopRecording(void)
StopRecording() signals to the recorder that it should stop recording and exit cleanly.
QWaitCondition m_pauseWait
void AddAVListener(TSPacketListenerAV *val)
bool PauseAndWait(std::chrono::milliseconds timeout=100ms) override
If m_requestPause is true, sets pause and blocks up to timeout milliseconds or until unpaused,...
void Close(void) override
Closes the channel changing hardware to use.
void SetStreamData(MPEGStreamData *data) override
MPEGStreamData * m_streamData
void AddWritingListener(TSPacketListener *val)
QString m_error
non-empty iff irrecoverable recording error detected
This is the coordinating class of the Recorder Subsystem.
bool m_recording
True while recording is actually being performed.
void run(void) override
run() starts the recording process, and does not exit until the recording is complete.
void StartNewFile(void) override
bool Open(void) override
Opens the channel changing hardware for use.
QWaitCondition m_unpauseWait
void RemoveAVListener(TSPacketListenerAV *val)
virtual bool IsPaused(bool holding_lock=false) const
Returns true iff recorder is paused.
bool m_requestRecording
True if API call has requested a recording be [re]started.