15#define LOC QString("SatIPRec[%1]: ").arg(m_inputId)
20 , m_inputId(rec->GetInputId())
29 LOG(VB_GENERAL, LOG_WARNING,
LOC +
"Card already open");
38 LOG(VB_RECORD, LOG_INFO,
LOC +
"Using TSStreamData");
46 LOG(VB_RECORD, LOG_INFO,
LOC +
"SatIP opened successfully");
76 LOG(VB_RECORD, LOG_INFO,
LOC +
"run -- begin");
80 m_error =
"Failed to open SatIPRecorder device";
124 LOG(VB_GENERAL, LOG_WARNING,
LOC +
125 "Recording will not commence until a PMT is set.");
126 std::this_thread::sleep_for(5ms);
132 m_error =
"Stream handler died unexpectedly.";
137 LOG(VB_RECORD, LOG_INFO,
LOC +
"run -- ending...");
151 LOG(VB_RECORD, LOG_INFO,
LOC +
"run -- end");
152 LOG(VB_GENERAL, LOG_INFO,
LOC + QString(
"< %1").arg(__func__));
QString GetSIStandard(void) const
Returns PSIP table standard: MPEG, DVB, ATSC, or OpenCable.
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
const ProgramMapTable * PMTSingleProgram(void) const
void AddWritingListener(TSPacketListener *val)
void RemoveWritingListener(TSPacketListener *val)
const ProgramAssociationTable * PATSingleProgram(void) const
void RemoveAVListener(TSPacketListenerAV *val)
virtual void AddListeningPID(uint pid, PIDPriority priority=kPIDPriorityNormal)
void AddAVListener(TSPacketListenerAV *val)
virtual bool IsRecordingRequested(void)
Tells us if StopRecording() has been called.
bool m_recording
True while recording is actually being performed.
QWaitCondition m_pauseWait
MythMediaBuffer * m_ringBuffer
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
QString GetDevice(void) const override
Returns String representing device, useful for debugging.
QString GetSIStandard(void) const override
SatIPStreamHandler * m_streamHandler
void run(void) override
run() starts the recording process, and does not exit until the recording is complete.
void StartNewFile(void) override
SatIPRecorder(TVRec *rec, SatIPChannel *channel)
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 AddListener(MPEGStreamData *data, bool=false, bool=false, const QString &output_file=QString()) override
static SatIPStreamHandler * Get(const QString &devname, int inputid)
static void Return(SatIPStreamHandler *&ref, int inputid)
virtual bool AddNamedOutputFile(const QString &filename)
Called with _listener_lock locked just after adding new output file.
bool IsRunning(void) const
virtual void RemoveListener(MPEGStreamData *data)
Specialized version of MPEGStreamData which is used to 'blindly' record the entire MPTS transport fro...
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 LOG(_MASK_, _LEVEL_, _QSTRING_)