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 }
MHIContext::Reinit
void Reinit(const QRect &videoRect, const QRect &dispRect, float aspect)
The display area has changed.
Definition: mhi.cpp:633
InteractiveTV::ImageHasChanged
bool ImageHasChanged(void)
Definition: interactivetv.cpp:40
MHIContext::Restart
void Restart(int chanid, int sourceid, bool isLive)
Restart the MHEG engine.
Definition: mhi.cpp:171
InteractiveTV::SetNetBootInfo
void SetNetBootInfo(const unsigned char *data, uint length)
Definition: interactivetv.cpp:76
InteractiveTV::m_context
MHIContext * m_context
Definition: interactivetv.h:51
InteractiveTV::Reinit
void Reinit(const QRect &videoRect, const QRect &dispRect, float aspect)
Definition: interactivetv.cpp:61
MHIContext::QueueDSMCCPacket
void QueueDSMCCPacket(unsigned char *data, int length, int componentTag, unsigned carouselId, int dataBroadcastId)
Definition: mhi.cpp:292
MythPlayer
Definition: mythplayer.h:128
MHLogWarning
@ MHLogWarning
Definition: freemheg.h:69
InteractiveTV::GetInitialStreams
void GetInitialStreams(int &audioTag, int &videoTag)
Definition: interactivetv.cpp:71
MHIContext::OfferKey
bool OfferKey(const QString &key)
Definition: mhi.cpp:617
InteractiveTV::OfferKey
bool OfferKey(const QString &key)
Definition: interactivetv.cpp:66
InteractiveTV::InteractiveTV
InteractiveTV(MythPlayer *nvp)
This is the interface between an MHEG, or possibly, MHP engine and the rest of Myth.
Definition: interactivetv.cpp:16
mythlogging.h
MHIContext::GetInitialStreams
void GetInitialStreams(int &audioTag, int &videoTag) const
Get the initial component tags.
Definition: mhi.cpp:744
MHSetLogging
void MHSetLogging(FILE *logStream, unsigned int logLevel)
Definition: Engine.cpp:1491
InteractiveTV::UpdateOSD
void UpdateOSD(InteractiveScreen *osdWindow, MythPainter *osdPainter)
Definition: interactivetv.cpp:46
InteractiveTV::~InteractiveTV
virtual ~InteractiveTV()
Definition: interactivetv.cpp:28
InteractiveTV::ProcessDSMCCSection
void ProcessDSMCCSection(unsigned char *data, int length, int componentTag, unsigned carouselId, int dataBroadcastId)
Definition: interactivetv.cpp:53
hardwareprofile.distros.mythtv_data.main.stdout
stdout
Definition: main.py:87
uint
unsigned int uint
Definition: compat.h:140
InteractiveTV::StreamStarted
bool StreamStarted(bool bStarted=true)
Definition: interactivetv.cpp:81
InteractiveScreen
Definition: interactivescreen.h:8
MHIContext::StreamStarted
bool StreamStarted(bool bStarted=true)
Definition: mhi.cpp:1089
VERBOSE_LEVEL_CHECK
#define VERBOSE_LEVEL_CHECK(_MASK_, _LEVEL_)
Definition: mythlogging.h:14
MHIContext::UpdateOSD
void UpdateOSD(InteractiveScreen *osdWindow, MythPainter *osdPainter)
Update the display.
Definition: mhi.cpp:674
MHLogError
@ MHLogError
Definition: freemheg.h:68
MythPainter
Definition: mythpainter.h:33
interactivetv.h
MHIContext
Contains various utility functions for interactive television.
Definition: mhi.h:51
MHLogNotifications
@ MHLogNotifications
Definition: freemheg.h:70
MHLogAll
#define MHLogAll
Definition: freemheg.h:77
MHIContext::SetNetBootInfo
void SetNetBootInfo(const unsigned char *data, uint length)
Definition: mhi.cpp:312
InteractiveTV::Restart
void Restart(int chanid, int sourceid, bool isLive)
Definition: interactivetv.cpp:34
mhi.h
MHIContext::ImageUpdated
bool ImageUpdated(void) const
Definition: mhi.h:166