MythTV  master
interactivetv.cpp
Go to the documentation of this file.
1 
6 // Qt headers
7 #include <QImage>
8 #include <QString>
9 #include <utility>
10 
11 // MythTV headers
12 #include "interactivetv.h"
13 #include "mhi.h"
14 #include "mythlogging.h"
15 
17  : m_context(new MHIContext(this)), m_nvp(nvp)
18 {
19  Restart(0, 0, false);
20 
22  VERBOSE_LEVEL_CHECK(VB_MHEG, LOG_DEBUG) ? MHLogAll :
23  VERBOSE_LEVEL_CHECK(VB_MHEG, LOG_ANY) ?
24  MHLogError | MHLogWarning | MHLogNotifications /*| MHLogLinks | MHLogActions | MHLogDetail*/ :
26 }
27 
29 {
30  delete m_context;
31 }
32 
33 // Start or restart the MHEG engine.
34 void InteractiveTV::Restart(int chanid, int sourceid, bool isLive)
35 {
36  m_context->Restart(chanid, sourceid, isLive);
37 }
38 
39 // Called by the video player to see if the image needs to be updated
41 {
42  return m_context->ImageUpdated();
43 }
44 
45 // Called by the video player to redraw the image.
47  MythPainter *osdPainter)
48 {
49  m_context->UpdateOSD(osdWindow, osdPainter);
50 }
51 
52 // Process an incoming DSMCC table.
54  unsigned char *data, int length,
55  int componentTag, unsigned carouselId, int dataBroadcastId)
56 {
57  m_context->QueueDSMCCPacket(data, length, componentTag,
58  carouselId, dataBroadcastId);
59 }
60 
61 void InteractiveTV::Reinit(const QRect &videoRect, const QRect &dispRect, float aspect)
62 {
63  m_context->Reinit(videoRect, dispRect, aspect);
64 }
65 
66 bool InteractiveTV::OfferKey(const QString& key)
67 {
68  return m_context->OfferKey(key);
69 }
70 
71 void InteractiveTV::GetInitialStreams(int &audioTag, int &videoTag)
72 {
73  m_context->GetInitialStreams(audioTag, videoTag);
74 }
75 
76 void InteractiveTV::SetNetBootInfo(const unsigned char *data, uint length)
77 {
78  m_context->SetNetBootInfo(data, length);
79 }
80 
81 bool InteractiveTV::StreamStarted(bool bStarted)
82 {
83  return m_context->StreamStarted(bStarted);
84 }
void Restart(int chanid, int sourceid, bool isLive)
MHIContext * m_context
Definition: interactivetv.h:49
#define MHLogAll
Definition: freemheg.h:74
void UpdateOSD(InteractiveScreen *osdWindow, MythPainter *osdPainter)
void Restart(int chanid, int sourceid, bool isLive)
Restart the MHEG engine.
Definition: mhi.cpp:173
void Reinit(const QRect &videoRect, const QRect &dispRect, float aspect)
bool ImageUpdated(void)
Definition: mhi.h:166
void GetInitialStreams(int &audioTag, int &videoTag)
bool OfferKey(const QString &key)
Contains various utility functions for interactive television.
Definition: mhi.h:50
void QueueDSMCCPacket(unsigned char *data, int length, int componentTag, unsigned carouselId, int dataBroadcastId)
Definition: mhi.cpp:295
#define VERBOSE_LEVEL_CHECK(_MASK_, _LEVEL_)
Definition: mythlogging.h:24
virtual ~InteractiveTV()
InteractiveTV(MythPlayer *nvp)
This is the interface between an MHEG, or possibly, MHP engine and the rest of Myth.
bool StreamStarted(bool bStarted=true)
Definition: mhi.cpp:1086
unsigned int uint
Definition: compat.h:140
void SetNetBootInfo(const unsigned char *data, uint length)
void ProcessDSMCCSection(unsigned char *data, int length, int componentTag, unsigned carouselId, int dataBroadcastId)
bool StreamStarted(bool bStarted=true)
bool ImageHasChanged(void)
bool OfferKey(const QString &key)
Definition: mhi.cpp:608
void GetInitialStreams(int &audioTag, int &videoTag)
Get the initial component tags.
Definition: mhi.cpp:743
void UpdateOSD(InteractiveScreen *osdWindow, MythPainter *osdPainter)
Update the display.
Definition: mhi.cpp:665
void MHSetLogging(FILE *logStream, unsigned int logLevel)
Definition: Engine.cpp:1488
void SetNetBootInfo(const unsigned char *data, uint length)
Definition: mhi.cpp:315
void Reinit(const QRect &videoRect, const QRect &dispRect, float aspect)
The display area has changed.
Definition: mhi.cpp:624