MythTV  master
firewirerecorder.h
Go to the documentation of this file.
1 
7 #ifndef _FIREWIRERECORDER_H_
8 #define _FIREWIRERECORDER_H_
9 
10 // MythTV headers
11 #include "dtvrecorder.h"
12 #include "tspacket.h"
13 #include "streamlisteners.h"
14 
15 class TVRec;
16 class FirewireChannel;
17 
25  public DTVRecorder,
26  public TSDataListener
27 {
28  friend class MPEGStreamData;
29  friend class TSPacketProcessor;
30 
31  public:
33  ~FirewireRecorder() override;
34 
35  // Commands
36  bool Open(void);
37  void Close(void);
38 
39  void StartStreaming(void);
40  void StopStreaming(void);
41 
42  void run(void) override; // RecorderBase
43  bool PauseAndWait(int timeout = 100) override; // RecorderBase
44 
45  // Implements TSDataListener
46  void AddData(const unsigned char *data, uint len) override; // TSDataListener
47 
48  bool ProcessTSPacket(const TSPacket &tspacket) override; // DTVRecorder
49 
50  // Sets
52  const QString &videodev,
53  const QString &audiodev,
54  const QString &vbidev) override; // DTVRecorder
55 
56  protected:
57  void InitStreamData(void) override; // DTVRecorder
58  explicit FirewireRecorder(TVRec *rec);
59 
60  private:
62  bool m_isopen {false};
63  vector<unsigned char> m_buffer;
64 };
65 
66 #endif // _FIREWIRERECORDER_H_
Used to access the data of a Transport Stream packet.
Definition: tspacket.h:166
This is a specialization of RecorderBase used to handle MPEG-2, MPEG-4, MPEG-4 AVC,...
Definition: dtvrecorder.h:27
vector< unsigned char > m_buffer
FirewireRecorder(TVRec *rec, FirewireChannel *chan)
void InitStreamData(void) override
~FirewireRecorder() override
void SetOptionsFromProfile(RecordingProfile *profile, const QString &videodev, const QString &audiodev, const QString &vbidev) override
Sets basic recorder options.
This is a specialization of DTVRecorder used to handle DVB and ATSC streams from a firewire input.
This is the coordinating class of the Recorder Subsystem.
Definition: tv_rec.h:142
void AddData(const unsigned char *data, uint len) override
Callback function to add MPEG2 TS data.
bool ProcessTSPacket(const TSPacket &tspacket) override
FirewireChannel Copyright (c) 2005 by Jim Westfall and Dave Abrahams Distributed as part of MythTV un...
bool PauseAndWait(int timeout=100) override
If m_requestPause is true, sets pause and blocks up to timeout milliseconds or until unpaused,...
void run(void) override
run() starts the recording process, and does not exit until the recording is complete.
unsigned int uint
Definition: compat.h:140
friend class TSPacketProcessor
void StopStreaming(void)
void StartStreaming(void)
FirewireChannel * m_channel
Encapsulates data about MPEG stream and emits events for each table.