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 
23  VERBOSE_LEVEL_CHECK(VB_MHEG, LOG_DEBUG) ? MHLogAll :
24  VERBOSE_LEVEL_CHECK(VB_MHEG, LOG_ANY) ?
25  MHLogError | MHLogWarning | MHLogNotifications /*| MHLogLinks | MHLogActions | MHLogDetail*/ :
27 }
28 
30 {
31  delete m_context;
32 }
33 
34 // Start or restart the MHEG engine.
35 void InteractiveTV::Restart(int chanid, int sourceid, bool isLive)
36 {
37  m_context->Restart(chanid, sourceid, isLive);
38 }
39 
40 // Called by the video player to see if the image needs to be updated
42 {
43  return m_context->ImageUpdated();
44 }
45 
46 // Called by the video player to redraw the image.
48  MythPainter *osdPainter)
49 {
50  m_context->UpdateOSD(osdWindow, osdPainter);
51 }
52 
53 // Process an incoming DSMCC table.
55  unsigned char *data, int length,
56  int componentTag, unsigned carouselId, int dataBroadcastId)
57 {
58  m_context->QueueDSMCCPacket(data, length, componentTag,
59  carouselId, dataBroadcastId);
60 }
61 
62 void InteractiveTV::Reinit(QRect videoRect, QRect dispRect, float aspect)
63 {
64  m_context->Reinit(videoRect, dispRect, aspect);
65 }
66 
67 bool InteractiveTV::OfferKey(const QString& key)
68 {
69  return m_context->OfferKey(key);
70 }
71 
72 void InteractiveTV::GetInitialStreams(int &audioTag, int &videoTag)
73 {
74  m_context->GetInitialStreams(audioTag, videoTag);
75 }
76 
77 void InteractiveTV::SetNetBootInfo(const unsigned char *data, uint length)
78 {
79  m_context->SetNetBootInfo(data, length);
80 }
81 
82 bool InteractiveTV::StreamStarted(bool bStarted)
83 {
84  return m_context->StreamStarted(bStarted);
85 }
InteractiveTV::ImageHasChanged
bool ImageHasChanged(void)
Definition: interactivetv.cpp:41
MHIContext::Restart
void Restart(int chanid, int sourceid, bool isLive)
Restart the MHEG engine.
Definition: mhi.cpp:172
InteractiveTV::SetNetBootInfo
void SetNetBootInfo(const unsigned char *data, uint length)
Definition: interactivetv.cpp:77
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:634
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
MythPlayerCaptionsUI
Definition: mythplayercaptionsui.h:8
VERBOSE_LEVEL_CHECK
static bool VERBOSE_LEVEL_CHECK(uint64_t mask, LogLevel_t level)
Definition: mythlogging.h:29
MHIContext::QueueDSMCCPacket
void QueueDSMCCPacket(unsigned char *data, int length, int componentTag, unsigned carouselId, int dataBroadcastId)
Definition: mhi.cpp:293
InteractiveTV::Reinit
void Reinit(QRect videoRect, QRect dispRect, float aspect)
Definition: interactivetv.cpp:62
InteractiveTV::GetInitialStreams
void GetInitialStreams(int &audioTag, int &videoTag)
Definition: interactivetv.cpp:72
MHIContext::OfferKey
bool OfferKey(const QString &key)
Definition: mhi.cpp:618
InteractiveTV::OfferKey
bool OfferKey(const QString &key)
Definition: interactivetv.cpp:67
mythlogging.h
MHLogNotifications
@ MHLogNotifications
Definition: freemheg.h:73
MHIContext::GetInitialStreams
void GetInitialStreams(int &audioTag, int &videoTag) const
Get the initial component tags.
Definition: mhi.cpp:745
MHSetLogging
void MHSetLogging(FILE *logStream, unsigned int logLevel)
Definition: Engine.cpp:1492
InteractiveTV::UpdateOSD
void UpdateOSD(InteractiveScreen *osdWindow, MythPainter *osdPainter)
Definition: interactivetv.cpp:47
InteractiveTV::~InteractiveTV
virtual ~InteractiveTV()
Definition: interactivetv.cpp:29
InteractiveTV::ProcessDSMCCSection
void ProcessDSMCCSection(unsigned char *data, int length, int componentTag, unsigned carouselId, int dataBroadcastId)
Definition: interactivetv.cpp:54
hardwareprofile.distros.mythtv_data.main.stdout
stdout
Definition: main.py:87
uint
unsigned int uint
Definition: compat.h:81
InteractiveTV::StreamStarted
bool StreamStarted(bool bStarted=true)
Definition: interactivetv.cpp:82
MHLogWarning
@ MHLogWarning
Definition: freemheg.h:72
MHLogError
@ MHLogError
Definition: freemheg.h:71
InteractiveScreen
Definition: interactivescreen.h:9
MHIContext::StreamStarted
bool StreamStarted(bool bStarted=true)
Definition: mhi.cpp:1091
MHIContext::UpdateOSD
void UpdateOSD(InteractiveScreen *osdWindow, MythPainter *osdPainter)
Update the display.
Definition: mhi.cpp:675
MythPainter
Definition: mythpainter.h:34
interactivetv.h
MHIContext
Contains various utility functions for interactive television.
Definition: mhi.h:50
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:313
InteractiveTV::Restart
void Restart(int chanid, int sourceid, bool isLive)
Definition: interactivetv.cpp:35
mhi.h
MHIContext::ImageUpdated
bool ImageUpdated(void) const
Definition: mhi.h:166