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"
13#include "mpeg/tspacket.h"
14
15class TVRec;
16class 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(std::chrono::milliseconds timeout = 100ms) 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 [[maybe_unused]] const QString &videodev,
53 [[maybe_unused]] const QString &audiodev,
54 [[maybe_unused]] 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 std::vector<unsigned char> m_buffer;
64};
65
66#endif // FIREWIRERECORDER_H
This is a specialization of RecorderBase used to handle MPEG-2, MPEG-4, MPEG-4 AVC,...
Definition: dtvrecorder.h:35
FirewireChannel Copyright (c) 2005 by Jim Westfall and Dave Abrahams Distributed as part of MythTV un...
This is a specialization of DTVRecorder used to handle DVB and ATSC streams from a firewire input.
bool ProcessTSPacket(const TSPacket &tspacket) override
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 SetOptionsFromProfile(RecordingProfile *profile, const QString &videodev, const QString &audiodev, const QString &vbidev) override
Sets basic recorder options.
void StartStreaming(void)
FirewireRecorder(TVRec *rec)
void run(void) override
run() starts the recording process, and does not exit until the recording is complete.
void AddData(const unsigned char *data, uint len) override
Callback function to add MPEG2 TS data.
void InitStreamData(void) override
FirewireRecorder(TVRec *rec, FirewireChannel *chan)
friend class TSPacketProcessor
FirewireChannel * m_channel
~FirewireRecorder() override
void StopStreaming(void)
std::vector< unsigned char > m_buffer
Encapsulates data about MPEG stream and emits events for each table.
Used to access the data of a Transport Stream packet.
Definition: tspacket.h:208
This is the coordinating class of the Recorder Subsystem.
Definition: tv_rec.h:143
unsigned int uint
Definition: freesurround.h:24