Go to the documentation of this file.
22 #define LOC QString("HDHRRec[%1]: ") \
23 .arg(m_tvrec ? m_tvrec->GetInputId() : -1)
29 LOG(VB_GENERAL, LOG_WARNING,
LOC +
"Card already open");
38 LOG(VB_RECORD, LOG_INFO,
LOC +
"Using TSStreamData");
48 LOG(VB_RECORD, LOG_INFO,
LOC +
"HDHR opened successfully");
55 LOG(VB_RECORD, LOG_INFO,
LOC +
"Close() -- begin");
61 LOG(VB_RECORD, LOG_INFO,
LOC +
"Close() -- end");
79 LOG(VB_RECORD, LOG_INFO,
LOC +
"run -- begin");
84 m_error =
"Failed to open HDHRRecorder device";
129 LOG(VB_GENERAL, LOG_WARNING,
LOC +
130 "Recording will not commence until a PMT is set.");
131 std::this_thread::sleep_for(5ms);
137 m_error =
"Stream handler died unexpectedly.";
142 LOG(VB_RECORD, LOG_INFO,
LOC +
"run -- ending...");
156 LOG(VB_RECORD, LOG_INFO,
LOC +
"run -- end");
void HandleSingleProgramPMT(ProgramMapTable *pmt, bool insert) override
ProgramMapTable * m_inputPmt
PMT on input side.
void AddListener(MPEGStreamData *data, bool=false, bool=false, const QString &output_file=QString()) override
void ResetForNewFile(void) override
virtual void SetStreamData(MPEGStreamData *data)
bool IsErrored(void) override
Tells us whether an unrecoverable error has been encountered.
QString GetSIStandard(void) const override
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
virtual bool AddNamedOutputFile(const QString &filename)
Called with _listener_lock locked just after adding new output file.
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
virtual void RemoveListener(MPEGStreamData *data)
QWaitCondition m_recordingWait
void RecorderPaused(void)
This is a callback, called by the "recorder" instance when it has actually paused.
uint GetInputId(void) const
Returns the inputid.
const ProgramAssociationTable * PATSingleProgram(void) const
void HandleSingleProgramPAT(ProgramAssociationTable *pat, bool insert) override
static void Return(HDHRStreamHandler *&ref, int inputid)
void RemoveWritingListener(TSPacketListener *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,...
virtual bool IsRecordingRequested(void)
Tells us if StopRecording() has been called.
void StartNewFile(void) override
QString GetDevice(void) const override
Returns String representing device, useful for debugging.
#define LOC
-*- Mode: c++ -*- HDHRRecorder Copyright (c) 2006-2009 by Silicondust Engineering Ltd,...
QString GetSIStandard(void) const
Returns PSIP table standard: MPEG, DVB, ATSC, or OpenCable.
QWaitCondition m_pauseWait
MythMediaBuffer * m_ringBuffer
void AddAVListener(TSPacketListenerAV *val)
MPEGStreamData * m_streamData
void AddWritingListener(TSPacketListener *val)
QString m_error
non-empty iff irrecoverable recording error detected
HDHRStreamHandler * m_streamHandler
bool m_recording
True while recording is actually being performed.
virtual int GetInputID(void) const
virtual void AddListeningPID(uint pid, PIDPriority priority=kPIDPriorityNormal)
static HDHRStreamHandler * Get(const QString &devname, int inputid, int majorid)
bool IsRunning(void) const
QWaitCondition m_unpauseWait
Specialized version of MPEGStreamData which is used to 'blindly' record the entire MPTS transport fro...
void RemoveAVListener(TSPacketListenerAV *val)
void run(void) override
run() starts the recording process, and does not exit until the recording is complete.
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.