22 #ifndef MYTHLIVETVPLAYBACK_H 23 #define MYTHLIVETVPLAYBACK_H 25 #include "proto/mythprotorecorder.h" 26 #include "proto/mythprototransfer.h" 27 #include "proto/mythprotomonitor.h" 28 #include "mythstream.h" 29 #include "mytheventhandler.h" 30 #include "mythtypes.h" 34 #define MYTH_LIVETV_CHUNK_SIZE 64000 35 #define MYTH_LIVETV_CHUNK_MIN 8000 36 #define MYTH_LIVETV_CHUNK_MAX 128000 50 bool IsOpen() {
return ProtoMonitor::IsOpen(); }
51 void SetTuneDelay(
unsigned delay);
52 void SetLimitTuneAttempts(
bool limit);
53 bool SpawnLiveTV(
const std::string& chanNum,
const ChannelList& channels);
54 bool SpawnLiveTV(
const ChannelPtr& thisChannel);
57 void SetChunk(
unsigned size);
60 int64_t GetSize()
const;
61 int Read(
void *buffer,
unsigned n);
62 int64_t Seek(int64_t offset, WHENCE_t whence);
63 int64_t GetPosition()
const;
65 bool IsPlaying()
const;
66 bool IsLiveRecording()
const;
67 bool KeepLiveRecording(
bool keep);
68 ProgramPtr GetPlayedProgram()
const;
69 time_t GetLiveTimeStart()
const;
70 unsigned GetChainedCount()
const;
71 ProgramPtr GetChainedProgram(
unsigned sequence)
const;
72 uint32_t GetCardId()
const;
73 SignalStatusPtr GetSignal()
const;
76 void HandleBackendMessage(EventMessagePtr msg);
80 unsigned m_eventSubscriberId;
83 bool m_limitTuneAttempts;
84 ProtoRecorderPtr m_recorder;
85 SignalStatusPtr m_signal;
87 typedef std::vector<std::pair<ProtoTransferPtr, ProgramPtr> > chained_t;
91 ProtoTransferPtr currentTransfer;
92 volatile unsigned currentSequence;
93 volatile unsigned lastSequence;
95 volatile bool switchOnCreate;
100 bool IsChained(
const Program& program);
101 void HandleChainUpdate();
102 bool SwitchChain(
unsigned sequence);
103 bool SwitchChainLast();
105 typedef std::multimap<unsigned, std::pair<CardInputPtr, ChannelPtr> > preferredCards_t;
106 preferredCards_t FindTunableCardIds(
const std::string& chanNum,
const ChannelList& channels);
108 int _read(
void *buffer,
unsigned n);
109 int64_t _seek(int64_t offset, WHENCE_t whence);
112 struct {
unsigned pos;
unsigned len;
unsigned char * data; } m_buffer;
This is the main namespace that encloses all public classes.