Go to the documentation of this file.
35 #define LOC QString("DVBRec[%1](%2): ") \
36 .arg(m_tvrec ? m_tvrec->GetInputId() : -1).arg(m_videodevice)
48 LOG(VB_GENERAL, LOG_WARNING,
LOC +
"Card already open");
60 LOG(VB_RECORD, LOG_INFO,
LOC +
"Using TSStreamData");
69 LOG(VB_RECORD, LOG_INFO,
LOC +
"Card opened successfully");
81 LOG(VB_RECORD, LOG_INFO,
LOC +
"Close() -- begin");
85 LOG(VB_RECORD, LOG_INFO,
LOC +
"Close() -- end");
105 m_error =
"Failed to open DVB device";
145 LOG(VB_GENERAL, LOG_WARNING,
LOC +
146 "Recording will not commence until a PMT is set.");
153 m_error =
"Stream handler died unexpectedly.";
void HandleSingleProgramPMT(ProgramMapTable *pmt, bool insert) override
ProgramMapTable * m_inputPmt
PMT on input side.
DVBRecorder(TVRec *rec, DVBChannel *channel)
void ResetForNewFile(void) override
A PMT table maps a program described in the ProgramAssociationTable to various PID's which describe t...
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 void SetStreamData(MPEGStreamData *data)
bool IsErrored(void) override
Tells us whether an unrecoverable error has been encountered.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
virtual bool AddNamedOutputFile(const QString &filename)
Called with _listener_lock locked just after adding new output file.
void SetPMT(const ProgramMapTable *pmt)
Tells the Conditional Access Module which streams we wish to decode.
bool IsEncrypted(const QString &sistandard) const
Returns true iff PMT contains CA descriptor for a vid/aud stream.
void FinishRecording(void) override
Flushes the ringbuffer, and if this is not a live LiveTV recording saves the position map and filesiz...
void run(void) override
run() starts the recording process, and does not exit until the recording is complete.
const ProgramMapTable * PMTSingleProgram(void) const
virtual void RemoveListener(MPEGStreamData *data)
void SetCAMPMT(const ProgramMapTable *pmt) override
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(DVBStreamHandler *&ref, int inputid)
static DVBStreamHandler * Get(const QString &devname, int inputid)
void RemoveWritingListener(TSPacketListener *val)
virtual bool IsRecordingRequested(void)
Tells us if StopRecording() has been called.
MPEGStreamData * GetStreamData(void) const
This is a specialization of RecorderBase used to handle MPEG-2, MPEG-4, MPEG-4 AVC,...
QString GetSIStandard(void) const
Returns PSIP table standard: MPEG, DVB, ATSC, or OpenCable.
QWaitCondition m_pauseWait
MythMediaBuffer * m_ringBuffer
void AddAVListener(TSPacketListenerAV *val)
Provides interface to the tuning hardware when using DVB drivers.
MPEGStreamData * m_streamData
void AddWritingListener(TSPacketListener *val)
QString m_error
non-empty iff irrecoverable recording error detected
void SetTimeOffset(double offset)
Tells the Conditional Access Module the offset from the computers utc time to dvb time.
This is the coordinating class of the Recorder Subsystem.
bool m_recording
True while recording is actually being performed.
void UpdateCAMTimeOffset(void) override
virtual void AddListener(MPEGStreamData *data, bool allow_section_reader=false, bool needs_buffering=false, const QString &output_file=QString())
virtual void AddListeningPID(uint pid, PIDPriority priority=kPIDPriorityNormal)
QString GetSIStandard(void) const override
void StartNewFile(void) override
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)
DVBStreamHandler * m_streamHandler
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.