Go to the documentation of this file.
16 #define LOC QString("FireRecBase[%1](%2): ") \
17 .arg(m_tvrec ? m_tvrec->GetInputId() : -1) \
18 .arg(m_channel->GetDevice())
62 LOG(VB_RECORD, LOG_INFO,
LOC +
"run");
66 m_error =
"Failed to open firewire device";
122 for (
uint i = 0; (i < bufsz) && (sync_at < 0); i++)
147 const uint pid = tspacket.
PID();
182 LOG(VB_RECORD, LOG_INFO,
LOC +
183 QString(
"PauseAndWait(%1) -- pause").arg(
timeout.count()));
197 LOG(VB_RECORD, LOG_INFO,
LOC +
198 QString(
"PauseAndWait(%1) -- unpause").arg(
timeout.count()));
virtual void RemoveListener(TSDataListener *listener)
void SetDesiredProgram(int p)
void AddData(const unsigned char *data, uint len) override
Callback function to add MPEG2 TS data.
void AddMPEGSPListener(MPEGSingleProgramStreamListener *val)
void ResetForNewFile(void) override
#define LOC
FirewireRecorder Copyright (c) 2005 by Jim Westfall and Dave Abrahams Distributed as part of MythTV u...
bool ProcessVideoTSPacket(const TSPacket &tspacket) override
void BufferedWrite(const TSPacket &tspacket, bool insert=false)
bool IsErrored(void) override
Tells us whether an unrecoverable error has been encountered.
virtual void AddListener(TSDataListener *listener)
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
std::vector< unsigned char > m_buffer
void FinishRecording(void) override
Flushes the ringbuffer, and if this is not a live LiveTV recording saves the position map and filesiz...
bool PauseAndWait(std::chrono::milliseconds timeout=100ms) override
If m_requestPause is true, sets pause and blocks up to timeout milliseconds or until unpaused,...
QWaitCondition m_recordingWait
void RecorderPaused(void)
This is a callback, called by the "recorder" instance when it has actually paused.
FirewireChannel Copyright (c) 2005 by Jim Westfall and Dave Abrahams Distributed as part of MythTV un...
Used to access the data of a Transport Stream packet.
virtual bool IsRecordingRequested(void)
Tells us if StopRecording() has been called.
void StartStreaming(void)
MPEGStreamData * GetStreamData(void) const
This is a specialization of RecorderBase used to handle MPEG-2, MPEG-4, MPEG-4 AVC,...
FirewireChannel * m_channel
QWaitCondition m_pauseWait
bool ProcessAudioTSPacket(const TSPacket &tspacket) override
MPEGStreamData * m_streamData
int DesiredProgram(void) const
bool ProcessTSPacket(const TSPacket &tspacket) override
QString m_error
non-empty iff irrecoverable recording error detected
FirewireRecorder(TVRec *rec, FirewireChannel *chan)
This is the coordinating class of the Recorder Subsystem.
void InitStreamData(void) override
bool m_recording
True while recording is actually being performed.
virtual FirewireDevice * GetFirewireDevice(void)
void HandleAdaptationFieldControl(const TSPacket *tspacket)
void run(void) override
run() starts the recording process, and does not exit until the recording is complete.
virtual void HandleTSTables(const TSPacket *tspacket)
Assembles PSIP packets and processes them.
~FirewireRecorder() override
static constexpr uint8_t SYNC_BYTE
QWaitCondition m_unpauseWait
virtual bool IsPaused(bool holding_lock=false) const
Returns true iff recorder is paused.
virtual bool ClosePort(void)=0
bool m_requestRecording
True if API call has requested a recording be [re]started.
static constexpr unsigned int kSize
virtual bool OpenPort(void)=0