MythTV  master
mhi.h
Go to the documentation of this file.
1 #ifndef MHI_H
2 #define MHI_H
3 
4 // Misc header
5 #include <ft2build.h>
6 #include FT_FREETYPE_H
7 
8 // STL headers
9 #include <list>
10 #include <vector>
11 
12 // Qt headers
13 #include <QWaitCondition>
14 #include <QRunnable>
15 #include <QString>
16 #include <QMutex>
17 #include <QImage>
18 #include <QList>
19 #include <QRect>
20 #include <QPair>
21 #include <QMap> // for QMap
22 #include <QRegion> // for QRegion
23 #include <QSize> // for QSize
24 
25 // MythTV headers
26 #include "mythconfig.h"
27 #include "../libmythfreemheg/freemheg.h"
28 #include "mhegic.h"
29 #include "mythdeque.h"
30 
31 class MythPainter;
32 class InteractiveScreen;
33 class DSMCCPacket;
34 class MHIImageData;
35 class MHIContext;
36 class MythAVCopy;
37 class Dsmcc;
38 class InteractiveTV;
39 class MHStream;
40 class MThread;
41 class QByteArray;
42 
43 // Special value for the NetworkBootInfo version. Real values are a byte.
44 #define NBI_VERSION_UNSET 257
45 
49 class MHIContext : public MHContext, public QRunnable
50 {
51  public:
52  explicit MHIContext(InteractiveTV *parent);
53  ~MHIContext() override;
54 
55  void QueueDSMCCPacket(unsigned char *data, int length, int componentTag,
56  unsigned carouselId, int dataBroadcastId);
57  // A NetworkBootInfo sub-descriptor is present in the PMT.
58  void SetNetBootInfo(const unsigned char *data, uint length);
60  void Restart(int chanid, int sourceid, bool isLive);
61  // Offer a key press. Returns true if it accepts it.
62  // This will depend on the current profile.
63  bool OfferKey(const QString& key);
65  void UpdateOSD(InteractiveScreen *osdWindow, MythPainter *osdPainter);
67  void Reinit(const QRect &videoRect, const QRect &dispRect, float aspect);
68 
70  void StopEngine(void);
71 
72  // Test for an object in the carousel.
73  // Returns true if the object is present and
74  // so a call to GetCarouselData will not block and will return the data.
75  // Returns false if the object is not currently present because it has not
76  // yet appeared and also if it is not present in the containing directory.
77  bool CheckCarouselObject(QString objectPath) override; // MHContext
78 
79  // Get an object from the carousel. Returns true and sets the data if
80  // it was able to retrieve the named object. Blocks if the object seems
81  // to be present but has not yet appeared. Returns false if the object
82  // cannot be retrieved.
83  bool GetCarouselData(QString objectPath, QByteArray &result) override; // MHContext
84 
85  // Set the input register. This sets the keys that are to be handled
86  // by MHEG. Flushes the key queue.
87  void SetInputRegister(int num) override; // MHContext
88 
90  void RequireRedraw(const QRegion &region) override; // MHContext
91 
93  bool CheckStop(void) override // MHContext
94  { return m_stop; }
95 
97  void GetInitialStreams(int &audioTag, int &videoTag) const;
98 
101  bool isBoxed, MHRgba lineColour, MHRgba fillColour) override; // MHContext
102  MHTextDisplay *CreateText(void) override; // MHContext
103  MHBitmapDisplay *CreateBitmap(bool tiled) override; // MHContext
105  void DrawRect(int xPos, int yPos, int width, int height,
106  MHRgba colour) override; // MHContext
107  void DrawBackground(const QRegion &reg) override; // MHContext
108  void DrawVideo(const QRect &videoRect, const QRect &dispRect) override; // MHContext
109 
110  void DrawImage(int x, int y, const QRect &rect, const QImage &image,
111  bool bScaled = false, bool bUnder = false);
112 
113  int GetChannelIndex(const QString &str) override; // MHContext
115  bool GetServiceInfo(int channelId, int &netId, int &origNetId,
116  int &transportId, int &serviceId) override; // MHContext
117  bool TuneTo(int channel, int tuneinfo) override; // MHContext
118 
120  bool BeginStream(const QString &str, MHStream* notify) override; // MHContext
121  void EndStream() override; // MHContext
122  // Called when the stream starts or stops
123  bool StreamStarted(bool bStarted = true);
125  bool BeginAudio(int tag) override; // MHContext
127  void StopAudio() override; // MHContext
129  bool BeginVideo(int tag) override; // MHContext
131  void StopVideo() override; // MHContext
132  // Get current stream position, -1 if unknown
133  long GetStreamPos() override; // MHContext
134  // Get current stream size, -1 if unknown
135  long GetStreamMaxPos() override; // MHContext
136  // Set current stream position
137  long SetStreamPos(long pos) override; // MHContext
138  // Play or pause a stream
139  void StreamPlay(bool play) override; // MHContext
140 
141  // Get the context id strings. The format of these strings is specified
142  // by the UK MHEG profile.
143  const char *GetReceiverId(void) override // MHContext
144  { return "MYT001001"; } // Version number?
145  const char *GetDSMCCId(void) override // MHContext
146  { return "DSMMYT001"; } // DSMCC version.
147 
148  // InteractionChannel
149  // 0= Active, 1= Inactive, 2= Disabled
150  int GetICStatus() override; // MHContext
151 
152  // Operations used by the display classes
153  // Add an item to the display vector
154  void AddToDisplay(const QImage &image, const QRect &rect, bool bUnder = false);
155  int ScaleX(int n, bool roundup = false) const;
156  int ScaleY(int n, bool roundup = false) const;
157  QRect Scale(const QRect &r) const;
158  int ScaleVideoX(int n, bool roundup = false) const;
159  int ScaleVideoY(int n, bool roundup = false) const;
160  QRect ScaleVideo(const QRect &r) const;
161 
162  FT_Face GetFontFace(void) { return m_face; }
163  bool IsFaceLoaded(void) const { return m_faceLoaded; }
164  bool LoadFont(const QString& name);
165  bool ImageUpdated(void) const { return m_updated; }
166 
167  static const int kStdDisplayWidth = 720;
168  static const int kStdDisplayHeight = 576;
169 
170  protected:
171  void run(void) override; // QRunnable
172  void ProcessDSMCCQueue(void);
173  void NetworkBootRequested(void);
174  void ClearDisplay(void);
175  void ClearQueue(void);
176  bool LoadChannelCache();
177  bool GetDSMCCObject(const QString &objectPath, QByteArray &result);
178  bool CheckAccess(const QString &objectPath, QByteArray &cert);
179 
181 
182  // Pointer to the DSMCC object carousel.
183  Dsmcc *m_dsmcc {nullptr};
184  QMutex m_dsmccLock;
186 
187  MHInteractionChannel m_ic; // Interaction channel
188  MHStream *m_notify {nullptr};
189 
190  QMutex m_keyLock;
192  int m_keyProfile {0};
193 
194  MHEG *m_engine; // Pointer to the MHEG engine
195 
196  mutable QMutex m_runLock;
197  QWaitCondition m_engineWait; // protected by m_runLock
198  bool m_stop {false}; // protected by m_runLock
200  bool m_updated {false};
201 
202  std::list<MHIImageData*> m_display; // List of items to display
203 
204  FT_Face m_face {nullptr};
205  bool m_faceLoaded {false};
206 
208 
210  int m_currentStream {-1};
211  bool m_isLive {false};
212  int m_currentSource {-1};
213 
214  int m_audioTag {-1};
215  int m_videoTag {-1};
216  QList<int> m_tuneInfo;
217 
219  std::vector<unsigned char> m_nbiData;
220 
223 
224  // Channel index database cache
225  using Val_t = QPair< int, int >; // transportid, chanid
226  using Key_t = QPair< int, int >; // networkid, serviceid
227  using ChannelCache_t = QMultiMap< Key_t, Val_t >;
230  static inline int Tid(ChannelCache_t::const_iterator it) { return it->first; }
231  static inline int Cid(ChannelCache_t::const_iterator it) { return it->second; }
232  static inline int Nid(ChannelCache_t::const_iterator it) { return it.key().first; }
233  static inline int Sid(ChannelCache_t::const_iterator it) { return it.key().second; }
234 };
235 
236 // Object for drawing text.
237 class MHIText : public MHTextDisplay
238 {
239  public:
240  explicit MHIText(MHIContext *parent)
241  : m_parent(parent) {}
242  ~MHIText() override = default;
243 
244  void Draw(int x, int y) override; // MHTextDisplay
245  void Clear(void) override; // MHTextDisplay
246  void AddText(int x, int y, const QString &str, MHRgba colour) override; // MHTextDisplay
247 
248  void SetSize(int width, int height) override; // MHTextDisplay
249  void SetFont(int size, bool isBold, bool isItalic) override; // MHTextDisplay
250 
251  QRect GetBounds(const QString &str, int &strLen, int maxSize = -1) override; // MHTextDisplay
252 
253  public:
254  MHIContext *m_parent {nullptr};
255  QImage m_image;
256  int m_fontSize {12};
257  bool m_fontItalic {false};
258  bool m_fontBold {false};
259  int m_width {0};
260  int m_height {0};
261 };
262 
267 {
268  public:
269  MHIBitmap(MHIContext *parent, bool tiled);
270  ~MHIBitmap() override;
271 
272  // Deleted functions should be public.
273  MHIBitmap(const MHIBitmap &) = delete; // not copyable
274  MHIBitmap &operator=(const MHIBitmap &) = delete; // not copyable
275 
277  void CreateFromPNG(const unsigned char *data, int length) override; // MHBitmapDisplay
278 
280  void CreateFromMPEG(const unsigned char *data, int length) override; // MHBitmapDisplay
281 
283  void CreateFromJPEG(const unsigned char *data, int length) override; // MHBitmapDisplay
284 
294  void Draw(int x, int y, QRect rect, bool tiled, bool bUnder) override; // MHBitmapDisplay
295 
297  void ScaleImage(int newWidth, int newHeight) override; // MHBitmapDisplay
298 
299  // Gets
300  QSize GetSize(void) override { return m_image.size(); } // MHBitmapDisplay
301  bool IsOpaque(void) override { return !m_image.isNull() && m_opaque; } // MHBitmapDisplay
302 
303  public:
304  MHIContext *m_parent {nullptr};
305  bool m_tiled;
306  QImage m_image;
307  bool m_opaque {false};
308  MythAVCopy *m_copyCtx {nullptr};
309 };
310 
314 class MHIDLA : public MHDLADisplay
315 {
316  public:
317  MHIDLA(MHIContext *parent, bool isBoxed,
318  MHRgba lineColour, MHRgba fillColour)
319  : m_parent(parent), m_boxed(isBoxed),
320  m_boxLineColour(lineColour), m_boxFillColour(fillColour) {}
322  void Draw(int x, int y) override; // MHDLADisplay
324  void SetSize(int width, int height) override // MHDLADisplay
325  {
326  m_width = width;
327  m_height = height;
328  Clear();
329  }
330  void SetLineSize(int width) override // MHDLADisplay
331  { m_lineWidth = width; }
332  void SetLineColour(MHRgba colour) override // MHDLADisplay
333  { m_lineColour = colour; }
334  void SetFillColour(MHRgba colour) override // MHDLADisplay
335  { m_fillColour = colour; }
336 
338  void Clear(void) override; // MHDLADisplay
339 
340  // add items to the drawing.
341  void DrawLine(int x1, int y1, int x2, int y2) override; // MHDLADisplay
342  void DrawBorderedRectangle(int x, int y, int width, int height) override; // MHDLADisplay
343  void DrawOval(int x, int y, int width, int height) override; // MHDLADisplay
344  void DrawArcSector(int x, int y, int width, int height,
345  int start, int arc, bool isSector) override; // MHDLADisplay
346  void DrawPoly(bool isFilled, const MHPointVec& xArray, const MHPointVec& yArray) override; // MHDLADisplay
347 
348  protected:
349  void DrawRect(int x, int y, int width, int height, MHRgba colour);
350  void DrawLineSub(int x1, int y1, int x2, int y2, bool swapped);
351 
352  protected:
353  MHIContext *m_parent {nullptr};
354  QImage m_image;
355  int m_width {0};
356  int m_height {0};
357  bool m_boxed;
362  int m_lineWidth {0};
363 };
364 
369 {
370  public:
371  DSMCCPacket(unsigned char *data, int length, int tag,
372  unsigned car, int dbid)
373  : m_data(data), m_length(length),
374  m_componentTag(tag), m_carouselId(car),
375  m_dataBroadcastId(dbid)
376  {
377  }
378 
380  {
381  free(m_data);
382  }
383 
384  public:
385  unsigned char *m_data {nullptr};
386  int m_length;
388  unsigned m_carouselId;
390 };
391 
392 #endif // MHI_H
MHIContext::m_isLive
bool m_isLive
Definition: mhi.h:211
MHIContext::Reinit
void Reinit(const QRect &videoRect, const QRect &dispRect, float aspect)
The display area has changed.
Definition: mhi.cpp:633
MHIContext::CreateText
MHTextDisplay * CreateText(void) override
Definition: mhi.cpp:1177
MHIText::Draw
void Draw(int x, int y) override
Definition: mhi.cpp:1239
MHIContext::m_updated
bool m_updated
Definition: mhi.h:200
channel
QDomElement channel
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:501
MHIContext::GetFontFace
FT_Face GetFontFace(void)
Definition: mhi.h:162
MHIContext::IsFaceLoaded
bool IsFaceLoaded(void) const
Definition: mhi.h:163
MHIContext::m_notify
MHStream * m_notify
Definition: mhi.h:188
MHIContext::m_ic
MHInteractionChannel m_ic
Definition: mhi.h:187
MHIContext::Restart
void Restart(int chanid, int sourceid, bool isLive)
Restart the MHEG engine.
Definition: mhi.cpp:171
MHIDLA::DrawOval
void DrawOval(int x, int y, int width, int height) override
Definition: mhi.cpp:1685
MHIContext::m_currentStream
int m_currentStream
Definition: mhi.h:210
MHIContext::m_lastNbiVersion
uint m_lastNbiVersion
Definition: mhi.h:218
MHIContext::EndStream
void EndStream() override
Definition: mhi.cpp:1079
MHIContext::BeginVideo
bool BeginVideo(int tag) override
Begin displaying video.
Definition: mhi.cpp:1125
MHIContext::m_display
std::list< MHIImageData * > m_display
Definition: mhi.h:202
MHIText::AddText
void AddText(int x, int y, const QString &str, MHRgba colour) override
Definition: mhi.cpp:1371
MHIContext::run
void run(void) override
Definition: mhi.cpp:238
MHIContext::ScaleVideoY
int ScaleVideoY(int n, bool roundup=false) const
Definition: mhi.cpp:786
MHIContext::MHIContext
MHIContext(InteractiveTV *parent)
Definition: mhi.cpp:75
MHIContext::m_dsmcc
Dsmcc * m_dsmcc
Definition: mhi.h:183
MHIContext::m_displayRect
QRect m_displayRect
Definition: mhi.h:222
MHStream
Definition: Stream.h:33
MHIDLA::m_height
int m_height
Height of the drawing.
Definition: mhi.h:356
MHIContext::m_tuneInfo
QList< int > m_tuneInfo
Definition: mhi.h:216
MHIContext::CheckCarouselObject
bool CheckCarouselObject(QString objectPath) override
Definition: mhi.cpp:365
MHIText::Clear
void Clear(void) override
Definition: mhi.cpp:1355
MHIDLA::DrawRect
void DrawRect(int x, int y, int width, int height, MHRgba colour)
Definition: mhi.cpp:1455
MHIDLA::m_lineWidth
int m_lineWidth
Current line width.
Definition: mhi.h:362
MHDLADisplay
Definition: freemheg.h:172
MHIContext::GetChannelIndex
int GetChannelIndex(const QString &str) override
Definition: mhi.cpp:900
MHIContext::Nid
static int Nid(ChannelCache_t::const_iterator it)
Definition: mhi.h:232
x2
static int x2
Definition: mythsocket.cpp:61
MHIDLA::DrawArcSector
void DrawArcSector(int x, int y, int width, int height, int start, int arc, bool isSector) override
Definition: mhi.cpp:1691
MHIContext::m_keyProfile
int m_keyProfile
Definition: mhi.h:192
MHIBitmap::GetSize
QSize GetSize(void) override
Definition: mhi.h:300
MHIBitmap::CreateFromPNG
void CreateFromPNG(const unsigned char *data, int length) override
Create bitmap from PNG.
Definition: mhi.cpp:1837
MHIText::MHIText
MHIText(MHIContext *parent)
Definition: mhi.h:240
MHIContext::m_engineThread
MThread * m_engineThread
Definition: mhi.h:207
MHIContext::SetStreamPos
long SetStreamPos(long pos) override
Definition: mhi.cpp:1157
MHIContext::kStdDisplayHeight
static const int kStdDisplayHeight
Definition: mhi.h:168
MHIContext::GetStreamMaxPos
long GetStreamMaxPos() override
Definition: mhi.cpp:1151
MHIBitmap::m_image
QImage m_image
Definition: mhi.h:306
DSMCCPacket::m_length
int m_length
Definition: mhi.h:386
MHIContext::GetDSMCCObject
bool GetDSMCCObject(const QString &objectPath, QByteArray &result)
Definition: mhi.cpp:389
MHIContext::NetworkBootRequested
void NetworkBootRequested(void)
Definition: mhi.cpp:337
MHIContext::m_face
FT_Face m_face
Definition: mhi.h:204
MHIContext::QueueDSMCCPacket
void QueueDSMCCPacket(unsigned char *data, int length, int componentTag, unsigned carouselId, int dataBroadcastId)
Definition: mhi.cpp:292
MHIContext::CheckAccess
bool CheckAccess(const QString &objectPath, QByteArray &cert)
Definition: mhi.cpp:401
MHIText::m_image
QImage m_image
Definition: mhi.h:255
MHIBitmap::m_parent
MHIContext * m_parent
Definition: mhi.h:304
MHIContext::m_engineWait
QWaitCondition m_engineWait
Definition: mhi.h:197
MHIDLA::SetLineColour
void SetLineColour(MHRgba colour) override
Definition: mhi.h:332
MHIContext::m_engine
MHEG * m_engine
Definition: mhi.h:194
MHIContext::AddToDisplay
void AddToDisplay(const QImage &image, const QRect &rect, bool bUnder=false)
Definition: mhi.cpp:797
MHIContext::BeginStream
bool BeginStream(const QString &str, MHStream *notify) override
Begin playing the specified stream.
Definition: mhi.cpp:1035
MHIContext::m_currentChannel
int m_currentChannel
Definition: mhi.h:209
MHIContext::GetServiceInfo
bool GetServiceInfo(int channelId, int &netId, int &origNetId, int &transportId, int &serviceId) override
Get netId etc from the channel index.
Definition: mhi.cpp:985
MHIContext::ClearQueue
void ClearQueue(void)
Definition: mhi.cpp:146
mythdeque.h
MHIDLA::m_boxFillColour
MHRgba m_boxFillColour
Fill colour for the background.
Definition: mhi.h:359
MHIContext::OfferKey
bool OfferKey(const QString &key)
Definition: mhi.cpp:617
MHIContext::BeginAudio
bool BeginAudio(int tag) override
Begin playing audio.
Definition: mhi.cpp:1105
MHIDLA::SetFillColour
void SetFillColour(MHRgba colour) override
Definition: mhi.h:334
MHIContext::m_videoTag
int m_videoTag
Definition: mhi.h:215
MHIContext::DrawRect
void DrawRect(int xPos, int yPos, int width, int height, MHRgba colour) override
Additional drawing functions.
Definition: mhi.cpp:1189
MHIContext::Sid
static int Sid(ChannelCache_t::const_iterator it)
Definition: mhi.h:233
MHIContext::ScaleY
int ScaleY(int n, bool roundup=false) const
Definition: mhi.cpp:770
MHIBitmap::m_opaque
bool m_opaque
Definition: mhi.h:307
MHIContext::DrawImage
void DrawImage(int x, int y, const QRect &rect, const QImage &image, bool bScaled=false, bool bUnder=false)
Definition: mhi.cpp:1206
MHIText::m_fontSize
int m_fontSize
Definition: mhi.h:256
MHIContext::CreateBitmap
MHBitmapDisplay * CreateBitmap(bool tiled) override
Definition: mhi.cpp:1183
MHIContext::m_keyQueue
MythDeque< int > m_keyQueue
Definition: mhi.h:191
MHIContext::SetInputRegister
void SetInputRegister(int num) override
Definition: mhi.cpp:659
MHIDLA::SetLineSize
void SetLineSize(int width) override
Definition: mhi.h:330
MHIText::m_width
int m_width
Definition: mhi.h:259
MHIContext::Key_t
QPair< int, int > Key_t
Definition: mhi.h:226
MHIDLA::m_lineColour
MHRgba m_lineColour
Current line colour.
Definition: mhi.h:360
MHIContext::m_faceLoaded
bool m_faceLoaded
Definition: mhi.h:205
MHIContext::m_videoRect
QRect m_videoRect
Definition: mhi.h:221
MHIContext::StopVideo
void StopVideo() override
Stop displaying video.
Definition: mhi.cpp:1139
MHIBitmap::operator=
MHIBitmap & operator=(const MHIBitmap &)=delete
MHIContext::m_stop
bool m_stop
Definition: mhi.h:198
MHIBitmap::Draw
void Draw(int x, int y, QRect rect, bool tiled, bool bUnder) override
Draw the completed drawing onto the display.
Definition: mhi.cpp:1809
MHIContext::GetReceiverId
const char * GetReceiverId(void) override
Definition: mhi.h:143
MHIBitmap::m_copyCtx
MythAVCopy * m_copyCtx
Definition: mhi.h:308
MHIDLA::DrawLineSub
void DrawLineSub(int x1, int y1, int x2, int y2, bool swapped)
Definition: mhi.cpp:1579
x1
static int x1
Definition: mythsocket.cpp:60
MHIContext::GetInitialStreams
void GetInitialStreams(int &audioTag, int &videoTag) const
Get the initial component tags.
Definition: mhi.cpp:744
DSMCCPacket::DSMCCPacket
DSMCCPacket(unsigned char *data, int length, int tag, unsigned car, int dbid)
Definition: mhi.h:371
MHInteractionChannel
Definition: mhegic.h:17
DSMCCPacket::m_dataBroadcastId
int m_dataBroadcastId
Definition: mhi.h:389
MHIContext::m_keyLock
QMutex m_keyLock
Definition: mhi.h:190
MHIContext::m_audioTag
int m_audioTag
Definition: mhi.h:214
MHIBitmap::~MHIBitmap
~MHIBitmap() override
Definition: mhi.cpp:1804
MHIDLA::m_image
QImage m_image
Definition: mhi.h:354
MHIContext::ScaleVideoX
int ScaleVideoX(int n, bool roundup=false) const
Definition: mhi.cpp:781
MHIContext::m_parent
InteractiveTV * m_parent
Definition: mhi.h:180
MHIBitmap::m_tiled
bool m_tiled
Definition: mhi.h:305
MHIContext::m_currentSource
int m_currentSource
Definition: mhi.h:212
MHIText::GetBounds
QRect GetBounds(const QString &str, int &strLen, int maxSize=-1) override
Definition: mhi.cpp:1278
MHIContext::GetCarouselData
bool GetCarouselData(QString objectPath, QByteArray &result) override
Definition: mhi.cpp:441
DSMCCPacket::m_data
unsigned char * m_data
Definition: mhi.h:385
MHIDLA::m_fillColour
MHRgba m_fillColour
Current fill colour.
Definition: mhi.h:361
MHBitmapDisplay
Definition: freemheg.h:209
MHIBitmap::ScaleImage
void ScaleImage(int newWidth, int newHeight) override
Scale the bitmap. Only used for image derived from MPEG I-frames.
Definition: mhi.cpp:1974
MHIDLA::DrawLine
void DrawLine(int x1, int y1, int x2, int y2) override
Definition: mhi.cpp:1557
MHIDLA::MHIDLA
MHIDLA(MHIContext *parent, bool isBoxed, MHRgba lineColour, MHRgba fillColour)
Definition: mhi.h:317
MHIContext::ScaleVideo
QRect ScaleVideo(const QRect &r) const
Definition: mhi.cpp:791
uint
unsigned int uint
Definition: compat.h:140
MHIContext::GetStreamPos
long GetStreamPos() override
Definition: mhi.cpp:1145
MHIText::m_fontItalic
bool m_fontItalic
Definition: mhi.h:257
MHIText::m_fontBold
bool m_fontBold
Definition: mhi.h:258
MHIContext::m_dsmccQueue
MythDeque< DSMCCPacket * > m_dsmccQueue
Definition: mhi.h:185
MHIBitmap::MHIBitmap
MHIBitmap(MHIContext *parent, bool tiled)
Definition: mhi.cpp:1798
MHIContext::StreamPlay
void StreamPlay(bool play) override
Definition: mhi.cpp:1163
MHIDLA::m_boxed
bool m_boxed
Does it have a border?
Definition: mhi.h:357
MHIText::SetSize
void SetSize(int width, int height) override
Definition: mhi.cpp:1244
MHIContext::StopEngine
void StopEngine(void)
Stop the MHEG engine if it's running and waits until it has.
Definition: mhi.cpp:154
MHIBitmap::MHIBitmap
MHIBitmap(const MHIBitmap &)=delete
mhegic.h
MHIContext::m_videoDisplayRect
QRect m_videoDisplayRect
Definition: mhi.h:221
MHIBitmap::CreateFromMPEG
void CreateFromMPEG(const unsigned char *data, int length) override
Create bitmap from single I frame MPEG.
Definition: mhi.cpp:1872
MHIBitmap
Object for drawing bitmaps.
Definition: mhi.h:267
MHIText::SetFont
void SetFont(int size, bool isBold, bool isItalic) override
Definition: mhi.cpp:1250
MHIContext::m_dsmccLock
QMutex m_dsmccLock
Definition: mhi.h:184
MHIText::m_parent
MHIContext * m_parent
Definition: mhi.h:254
InteractiveScreen
Definition: interactivescreen.h:8
MHIText::~MHIText
~MHIText() override=default
MHIContext::Cid
static int Cid(ChannelCache_t::const_iterator it)
Definition: mhi.h:231
MHIDLA::m_parent
MHIContext * m_parent
Definition: mhi.h:353
MHIContext::StreamStarted
bool StreamStarted(bool bStarted=true)
Definition: mhi.cpp:1089
DSMCCPacket
Data for the queued DSMCC tables.
Definition: mhi.h:369
MHIContext::UpdateOSD
void UpdateOSD(InteractiveScreen *osdWindow, MythPainter *osdPainter)
Update the display.
Definition: mhi.cpp:674
MHIContext::CreateDynamicLineArt
MHDLADisplay * CreateDynamicLineArt(bool isBoxed, MHRgba lineColour, MHRgba fillColour) override
Creation functions for various visibles.
Definition: mhi.cpp:1170
MHIContext::m_channelMutex
QMutex m_channelMutex
Definition: mhi.h:229
Dsmcc
Definition: dsmcc.h:78
MHIContext::LoadFont
bool LoadFont(const QString &name)
Definition: mhi.cpp:95
DSMCCPacket::~DSMCCPacket
~DSMCCPacket()
Definition: mhi.h:379
MHIContext::CheckStop
bool CheckStop(void) override
Check whether we have requested a stop.
Definition: mhi.h:93
MHIBitmap::CreateFromJPEG
void CreateFromJPEG(const unsigned char *data, int length) override
Create bitmap from JPEG.
Definition: mhi.cpp:1853
MythPainter
Definition: mythpainter.h:33
MythDeque< DSMCCPacket * >
MHIDLA::Clear
void Clear(void) override
Clear the drawing.
Definition: mhi.cpp:1497
MHIContext::Val_t
QPair< int, int > Val_t
Definition: mhi.h:225
MHContext
Definition: freemheg.h:96
MHIBitmap::IsOpaque
bool IsOpaque(void) override
Definition: mhi.h:301
MHIContext::ClearDisplay
void ClearDisplay(void)
Definition: mhi.cpp:137
MHIContext::m_channelCache
ChannelCache_t m_channelCache
Definition: mhi.h:228
MThread
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:49
MHIContext::LoadChannelCache
bool LoadChannelCache()
Definition: mhi.cpp:865
MHIText
Definition: mhi.h:238
MHIDLA::Draw
void Draw(int x, int y) override
Draw the completed drawing onto the display.
Definition: mhi.cpp:1509
MHIContext::ScaleX
int ScaleX(int n, bool roundup=false) const
Definition: mhi.cpp:765
MHIContext::m_nbiData
std::vector< unsigned char > m_nbiData
Definition: mhi.h:219
MHIDLA::SetSize
void SetSize(int width, int height) override
Set the box size. Also clears the drawing.
Definition: mhi.h:324
MythAVCopy
Definition: mythavutil.h:41
MHIContext::RequireRedraw
void RequireRedraw(const QRegion &region) override
An area of the screen/image needs to be redrawn.
Definition: mhi.cpp:754
MHIContext::GetDSMCCId
const char * GetDSMCCId(void) override
Definition: mhi.h:145
MHIContext
Contains various utility functions for interactive television.
Definition: mhi.h:50
MHEG
Definition: freemheg.h:52
MHIDLA::DrawPoly
void DrawPoly(bool isFilled, const MHPointVec &xArray, const MHPointVec &yArray) override
Definition: mhi.cpp:1703
MHIText::m_height
int m_height
Definition: mhi.h:260
MHIContext::ProcessDSMCCQueue
void ProcessDSMCCQueue(void)
Definition: mhi.cpp:273
NBI_VERSION_UNSET
#define NBI_VERSION_UNSET
Definition: mhi.h:44
MHIContext::StopAudio
void StopAudio() override
Stop playing audio.
Definition: mhi.cpp:1119
MHIImageData
Data for items in the interactive television display stack.
Definition: mhi.cpp:67
InteractiveTV
This is the interface between an MHEG engine and a MythTV TV object.
Definition: interactivetv.h:13
MHIContext::SetNetBootInfo
void SetNetBootInfo(const unsigned char *data, uint length)
Definition: mhi.cpp:312
MHIDLA
Object for displaying Dynamic Line Art.
Definition: mhi.h:315
MHIContext::~MHIContext
~MHIContext() override
Definition: mhi.cpp:125
MHIContext::Scale
QRect Scale(const QRect &r) const
Definition: mhi.cpp:775
MHIContext::Tid
static int Tid(ChannelCache_t::const_iterator it)
Definition: mhi.h:230
MHIContext::DrawVideo
void DrawVideo(const QRect &videoRect, const QRect &dispRect) override
Definition: mhi.cpp:841
MHIDLA::m_width
int m_width
Width of the drawing.
Definition: mhi.h:355
MHTextDisplay
Definition: freemheg.h:192
MHIDLA::m_boxLineColour
MHRgba m_boxLineColour
Line colour for the background.
Definition: mhi.h:358
MHIContext::TuneTo
bool TuneTo(int channel, int tuneinfo) override
Definition: mhi.cpp:1010
MHIContext::ChannelCache_t
QMultiMap< Key_t, Val_t > ChannelCache_t
Definition: mhi.h:227
DSMCCPacket::m_componentTag
int m_componentTag
Definition: mhi.h:387
MHIDLA::DrawBorderedRectangle
void DrawBorderedRectangle(int x, int y, int width, int height) override
Definition: mhi.cpp:1653
MHIContext::DrawBackground
void DrawBackground(const QRegion &reg) override
Definition: mhi.cpp:1229
DSMCCPacket::m_carouselId
unsigned m_carouselId
Definition: mhi.h:388
MHRgba
Definition: freemheg.h:80
MHIContext::m_runLock
QMutex m_runLock
Definition: mhi.h:196
MHPointVec
std::vector< int > MHPointVec
Definition: BaseClasses.h:34
MHIContext::m_displayLock
QMutex m_displayLock
Definition: mhi.h:199
MHIContext::ImageUpdated
bool ImageUpdated(void) const
Definition: mhi.h:165
MHIContext::GetICStatus
int GetICStatus() override
Definition: mhi.cpp:667
MHIContext::kStdDisplayWidth
static const int kStdDisplayWidth
Definition: mhi.h:167