Difference between revisions of "IPTVRecorder"

From MythTV Official Wiki
Jump to: navigation, search
(Initial description of recorder architecture)
(No difference)

Revision as of 02:03, 9 April 2013

General MythTV recorder architecture

The five most important classes in the recorder architecture are:

 * TVRec -- same for all recorders
 * RingBuffer -- same for all recorders
 * RecorderBase
 * SignalMonitor
 * ChannelBase

TVRec

When either Scheduler or a TVPlay instance wants to start recording they call TVRec::StartRecording() with the ProgramInfo of the program they wish to record. Once the recording the Scheduler or TVPlay do not need to end the recording, TVRec takes care of ending the recording.

TVRec runs it's own event loop in TVRec::run(). This event loop predates the ability to run Qt event loops in any thread and is a custom to TVRec. It handles three things: state change commands initiated from TVRec::ChangeState(), tuning requests from the tuningRequests deque, and it handles ending in progress recordings.

RingBuffer

This class provides the interface that RecorderBase uses to write data to disk. Internally it uses a ThreadedFileBuffer, but the most important thing to RecorderBase is that the RingBuffer::write() does not block for more than a few milliseconds at a time, unlike disk writes themselves which can block for a number of seconds on a system that is operating normally.

RecorderBase

This class coordinates moving data from a device and getting it to a RingBuffer. This class is a QRunnable and is given it's own thread by TVRec.

ChannelBase

This class handles changing channels.

SignalMonitor

This class is tells us if there is data coming in on our device that we can record.

Digital TV Recorders

TBD

* Explain {MPEG,DVB,ATSC,Scan}StreamData
* Explain StreamHandler classes
  + These are optional but they allow multiple recorders to access a data stream.
  + One per recording source (i.e. /dev/video0 or /dev/dvb/adapter0/frontend0).

IPTV Recorder Architecture

TBD

 * Explain how the lifetime of a StreamHandler is different in this recorder as compared with other recorders.
   + Each 'channel' is actually a recording source.
 * Explain the PacketBuffer, especially the RTPPacketBuffer.
 * Explain IPTVTuningData