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
13 #include "interactivetv.h"
14 #include "mhi.h"
15 
17  : m_context(new MHIContext(this)),
18  m_player(Player)
19 {
20  Restart(0, 0, false);
21 
22  if (VERBOSE_LEVEL_CHECK(VB_MHEG, LOG_DEBUG))
24  else if (VERBOSE_LEVEL_CHECK(VB_MHEG, LOG_ANY))
25  MHSetLogging(stdout, MHLogError | MHLogWarning | MHLogNotifications /*| MHLogLinks | MHLogActions | MHLogDetail*/);
26  else
28 }
29 
31 {
32  delete m_context;
33 }
34 
35 // Start or restart the MHEG engine.
36 void InteractiveTV::Restart(int chanid, int sourceid, bool isLive)
37 {
38  m_context->Restart(chanid, sourceid, isLive);
39 }
40 
41 // Called by the video player to see if the image needs to be updated
43 {
44  return m_context->ImageUpdated();
45 }
46 
47 // Called by the video player to redraw the image.
49  MythPainter *osdPainter)
50 {
51  m_context->UpdateOSD(osdWindow, osdPainter);
52 }
53 
54 // Process an incoming DSMCC table.
56  unsigned char *data, int length,
57  int componentTag, unsigned carouselId, int dataBroadcastId)
58 {
59  m_context->QueueDSMCCPacket(data, length, componentTag,
60  carouselId, dataBroadcastId);
61 }
62 
63 void InteractiveTV::Reinit(QRect videoRect, QRect dispRect, float aspect)
64 {
65  m_context->Reinit(videoRect, dispRect, aspect);
66 }
67 
68 bool InteractiveTV::OfferKey(const QString& key)
69 {
70  return m_context->OfferKey(key);
71 }
72 
73 void InteractiveTV::GetInitialStreams(int &audioTag, int &videoTag)
74 {
75  m_context->GetInitialStreams(audioTag, videoTag);
76 }
77 
78 void InteractiveTV::SetNetBootInfo(const unsigned char *data, uint length)
79 {
80  m_context->SetNetBootInfo(data, length);
81 }
82 
83 bool InteractiveTV::StreamStarted(bool bStarted)
84 {
85  return m_context->StreamStarted(bStarted);
86 }
InteractiveTV::ImageHasChanged
bool ImageHasChanged(void)
Definition: interactivetv.cpp:42
MHIContext::Restart
void Restart(int chanid, int sourceid, bool isLive)
Restart the MHEG engine.
Definition: mhi.cpp:174
InteractiveTV::SetNetBootInfo
void SetNetBootInfo(const unsigned char *data, uint length)
Definition: interactivetv.cpp:78
InteractiveTV::m_context
MHIContext * m_context
Definition: interactivetv.h:54
MHIContext::Reinit
void Reinit(QRect videoRect, QRect dispRect, float aspect)
The display area has changed.
Definition: mhi.cpp:624
InteractiveTV::InteractiveTV
InteractiveTV(MythPlayerCaptionsUI *Player)
This is the interface between an MHEG, or possibly, MHP engine and the rest of Myth.
Definition: interactivetv.cpp:16
MHLogWarning
@ MHLogWarning
Definition: freemheg.h:72
MythPlayerCaptionsUI
Definition: mythplayercaptionsui.h:8
VERBOSE_LEVEL_CHECK
static bool VERBOSE_LEVEL_CHECK(uint64_t mask, LogLevel_t level)
Definition: mythlogging.h:29
MHLogError
@ MHLogError
Definition: freemheg.h:71
MHIContext::QueueDSMCCPacket
void QueueDSMCCPacket(unsigned char *data, int length, int componentTag, unsigned carouselId, int dataBroadcastId)
Definition: mhi.cpp:295
InteractiveTV::Reinit
void Reinit(QRect videoRect, QRect dispRect, float aspect)
Definition: interactivetv.cpp:63
InteractiveTV::GetInitialStreams
void GetInitialStreams(int &audioTag, int &videoTag)
Definition: interactivetv.cpp:73
MHIContext::OfferKey
bool OfferKey(const QString &key)
Definition: mhi.cpp:608
InteractiveTV::OfferKey
bool OfferKey(const QString &key)
Definition: interactivetv.cpp:68
mythlogging.h
MHIContext::GetInitialStreams
void GetInitialStreams(int &audioTag, int &videoTag) const
Get the initial component tags.
Definition: mhi.cpp:735
MHSetLogging
void MHSetLogging(FILE *logStream, unsigned int logLevel)
Definition: Engine.cpp:1526
InteractiveTV::UpdateOSD
void UpdateOSD(InteractiveScreen *osdWindow, MythPainter *osdPainter)
Definition: interactivetv.cpp:48
InteractiveTV::~InteractiveTV
virtual ~InteractiveTV()
Definition: interactivetv.cpp:30
InteractiveTV::ProcessDSMCCSection
void ProcessDSMCCSection(unsigned char *data, int length, int componentTag, unsigned carouselId, int dataBroadcastId)
Definition: interactivetv.cpp:55
hardwareprofile.distros.mythtv_data.main.stdout
stdout
Definition: main.py:87
InteractiveTV::StreamStarted
bool StreamStarted(bool bStarted=true)
Definition: interactivetv.cpp:83
InteractiveScreen
Definition: interactivescreen.h:9
MHIContext::StreamStarted
bool StreamStarted(bool bStarted=true)
Definition: mhi.cpp:1085
MHIContext::UpdateOSD
void UpdateOSD(InteractiveScreen *osdWindow, MythPainter *osdPainter)
Update the display.
Definition: mhi.cpp:665
MythPainter
Definition: mythpainter.h:34
interactivetv.h
MHIContext
Contains various utility functions for interactive television.
Definition: mhi.h:50
MHLogNotifications
@ MHLogNotifications
Definition: freemheg.h:73
Player
Definition: zmliveplayer.h:34
MHLogAll
#define MHLogAll
Definition: freemheg.h:80
MHIContext::SetNetBootInfo
void SetNetBootInfo(const unsigned char *data, uint length)
Definition: mhi.cpp:315
InteractiveTV::Restart
void Restart(int chanid, int sourceid, bool isLive)
Definition: interactivetv.cpp:36
mhi.h
uint
unsigned int uint
Definition: freesurround.h:24
MHIContext::ImageUpdated
bool ImageUpdated(void) const
Definition: mhi.h:166