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