CPPMyth
Library to interoperate with MythTV server
Myth::LiveTVPlayback Class Reference
Inheritance diagram for Myth::LiveTVPlayback:
Collaboration diagram for Myth::LiveTVPlayback:

Public Member Functions

 LiveTVPlayback (EventHandler &handler)
 
 LiveTVPlayback (const std::string &server, unsigned port)
 
bool Open ()
 
void Close ()
 
bool IsOpen ()
 
void SetTuneDelay (unsigned delay)
 
void SetLimitTuneAttempts (bool limit)
 
bool SpawnLiveTV (const std::string &chanNum, const ChannelList &channels)
 
bool SpawnLiveTV (const ChannelPtr &thisChannel)
 
void StopLiveTV ()
 
void SetChunk (unsigned size)
 
int64_t GetSize () const
 
int Read (void *buffer, unsigned n)
 
int64_t Seek (int64_t offset, WHENCE_t whence)
 
int64_t GetPosition () const
 
bool IsPlaying () const
 
bool IsLiveRecording () const
 
bool KeepLiveRecording (bool keep)
 
ProgramPtr GetPlayedProgram () const
 
time_t GetLiveTimeStart () const
 
unsigned GetChainedCount () const
 
ProgramPtr GetChainedProgram (unsigned sequence) const
 
uint32_t GetCardId () const
 
SignalStatusPtr GetSignal () const
 
void HandleBackendMessage (EventMessagePtr msg)
 

Private Types

typedef std::vector< std::pair< ProtoTransferPtr, ProgramPtr > > chained_t
 
typedef std::multimap< unsigned, std::pair< CardInputPtr, ChannelPtr > > preferredCards_t
 
- Private Types inherited from Myth::ProtoBase
enum  ERROR_t { ERROR_NO_ERROR = 0, ERROR_SERVER_UNREACHABLE, ERROR_SOCKET_ERROR, ERROR_UNKNOWN_VERSION }
 

Private Member Functions

void InitChain ()
 
void ClearChain ()
 
bool IsChained (const Program &program)
 
void HandleChainUpdate ()
 
bool SwitchChain (unsigned sequence)
 
bool SwitchChainLast ()
 
preferredCards_t FindTunableCardIds (const std::string &chanNum, const ChannelList &channels)
 
int _read (void *buffer, unsigned n)
 
int64_t _seek (int64_t offset, WHENCE_t whence)
 
- Private Member Functions inherited from Myth::ProtoMonitor
 ProtoMonitor (const std::string &server, unsigned port)
 
 ProtoMonitor (const std::string &server, unsigned port, bool frontend)
 
ProtoRecorderPtr GetRecorderFromNum (int rnum)
 
bool QueryFreeSpaceSummary (int64_t *total, int64_t *used)
 
std::string GetSetting (const std::string &hostname, const std::string &setting)
 
bool SetSetting (const std::string &hostname, const std::string &setting, const std::string &value)
 
bool QueryGenpixmap (const Program &program)
 
bool DeleteRecording (const Program &program, bool force=false, bool forget=false)
 
bool UndeleteRecording (const Program &program)
 
bool StopRecording (const Program &program)
 
bool CancelNextRecording (int rnum, bool cancel)
 
StorageGroupFilePtr QuerySGFile (const std::string &hostname, const std::string &sgname, const std::string &filename)
 
MarkListPtr GetCutList (const Program &program)
 
MarkListPtr GetCommBreakList (const Program &program)
 
bool BlockShutdown ()
 
bool AllowShutdown ()
 
CardInputListPtr GetFreeInputs (int rnum=0)
 Asks the backend for a list of free inputs. A free input is one that is connected but not busy, not in a busy input group or is locked. More...
 
- Private Member Functions inherited from Myth::ProtoBase
 ProtoBase (const std::string &server, unsigned port)
 
virtual unsigned GetProtoVersion () const
 
virtual std::string GetServer () const
 
virtual unsigned GetPort () const
 
virtual int GetSocketErrNo () const
 
virtual int GetSocket () const
 
virtual bool HasHanging () const
 
virtual void CleanHanging ()
 
virtual ERROR_t GetProtoError () const
 
bool OpenConnection (int rcvbuf)
 
void HangException ()
 
bool SendCommand (const char *cmd, bool feedback=true)
 
size_t GetMessageLength () const
 
bool ReadField (std::string &field)
 
bool IsMessageOK (const std::string &field) const
 
size_t FlushMessage ()
 
bool RcvMessageLength ()
 
ProgramPtr RcvProgramInfo ()
 
void MakeProgramInfo (const Program &program, std::string &msg)
 

Private Attributes

EventHandler m_eventHandler
 
unsigned m_eventSubscriberId
 
unsigned m_tuneDelay
 
bool m_limitTuneAttempts
 
ProtoRecorderPtr m_recorder
 
SignalStatusPtr m_signal
 
struct {
   std::string   UID
 
   chained_t   chained
 
   ProtoTransferPtr   currentTransfer
 
   volatile unsigned   currentSequence
 
   volatile unsigned   lastSequence
 
   volatile bool   watch
 
   volatile bool   switchOnCreate
 
m_chain
 
unsigned m_chunk
 
struct {
   unsigned   pos
 
   unsigned   len
 
   unsigned char *   data
 
m_buffer
 
- Private Attributes inherited from Myth::ProtoBase
OS::CMutex * m_mutex
 
TcpSocket * m_socket
 
unsigned m_protoVersion
 
std::string m_server
 
unsigned m_port
 
bool m_hang
 Connection hang: while true allow retry.
 
bool m_tainted
 Connection has hung since last reset.
 
size_t m_msgLength
 
size_t m_msgConsumed
 

Detailed Description

Definition at line 41 of file mythlivetvplayback.h.


The documentation for this class was generated from the following files: