13#include <QWaitCondition>
26#include "libmythbase/mythconfig.h"
57 unsigned carouselId,
int dataBroadcastId);
61 void Restart(
int chanid,
int sourceid,
bool isLive);
68 void Reinit(QRect videoRect, QRect dispRect,
float aspect);
84 bool GetCarouselData(
const QString& objectPath, QByteArray &result)
override;
102 bool isBoxed,
MHRgba lineColour,
MHRgba fillColour)
override;
106 void DrawRect(
int xPos,
int yPos,
int width,
int height,
109 void DrawVideo(
const QRect &videoRect,
const QRect &dispRect)
override;
111 void DrawImage(
int x,
int y, QRect rect,
const QImage &image,
112 bool bScaled =
false,
bool bUnder =
false);
117 int &transportId,
int &serviceId)
override;
118 bool TuneTo(
int channel,
int tuneinfo)
override;
138 std::chrono::milliseconds
SetStreamPos(std::chrono::milliseconds pos)
override;
145 {
return "MYT001001"; }
147 {
return "DSMMYT001"; }
155 void AddToDisplay(
const QImage &image, QRect rect,
bool bUnder =
false);
156 int ScaleX(
int n,
bool roundup =
false)
const;
157 int ScaleY(
int n,
bool roundup =
false)
const;
158 QRect
Scale(QRect r)
const;
159 int ScaleVideoX(
int n,
bool roundup =
false)
const;
160 int ScaleVideoY(
int n,
bool roundup =
false)
const;
172 void run(
void)
override;
178 bool GetDSMCCObject(
const QString &objectPath, QByteArray &result);
179 bool CheckAccess(
const QString &objectPath, QByteArray &cert);
231 static int Tid(ChannelCache_t::const_iterator it) {
return it->first; }
232 static int Cid(ChannelCache_t::const_iterator it) {
return it->second; }
233 static int Nid(ChannelCache_t::const_iterator it) {
return it.key().first; }
234 static int Sid(ChannelCache_t::const_iterator it) {
return it.key().second; }
245 void Draw(
int x,
int y)
override;
246 void Clear(
void)
override;
247 void AddText(
int x,
int y,
const QString &str,
MHRgba colour)
override;
249 void SetSize(
int width,
int height)
override;
250 void SetFont(
int size,
bool isBold,
bool isItalic)
override;
252 QRect
GetBounds(
const QString &str,
int &strLen,
int maxSize = -1)
override;
278 void CreateFromPNG(
const unsigned char *data,
int length)
override;
281 void CreateFromMPEG(
const unsigned char *data,
int length)
override;
284 void CreateFromJPEG(
const unsigned char *data,
int length)
override;
295 void Draw(
int x,
int y, QRect rect,
bool tiled,
bool bUnder)
override;
298 void ScaleImage(
int newWidth,
int newHeight)
override;
323 void Draw(
int x,
int y)
override;
339 void Clear(
void)
override;
344 void DrawOval(
int x,
int y,
int width,
int height)
override;
346 int start,
int arc,
bool isSector)
override;
350 void DrawRect(
int x,
int y,
int width,
int height,
MHRgba colour);
373 unsigned car,
int dbid)
std::vector< int > MHPointVec
Data for the queued DSMCC tables.
DSMCCPacket(unsigned char *data, int length, int tag, unsigned car, int dbid)
This is the interface between an MHEG engine and a MythTV TV object.
Object for drawing bitmaps.
void Draw(int x, int y, QRect rect, bool tiled, bool bUnder) override
Draw the completed drawing onto the display.
MHIBitmap & operator=(const MHIBitmap &)=delete
QSize GetSize(void) override
MHIBitmap(MHIContext *parent, bool tiled)
void ScaleImage(int newWidth, int newHeight) override
Scale the bitmap. Only used for image derived from MPEG I-frames.
void CreateFromMPEG(const unsigned char *data, int length) override
Create bitmap from single I frame MPEG.
void CreateFromPNG(const unsigned char *data, int length) override
Create bitmap from PNG.
MHIBitmap(const MHIBitmap &)=delete
bool IsOpaque(void) override
void CreateFromJPEG(const unsigned char *data, int length) override
Create bitmap from JPEG.
Contains various utility functions for interactive television.
ChannelCache_t m_channelCache
bool OfferKey(const QString &key)
void StreamPlay(bool play) override
void Reinit(QRect videoRect, QRect dispRect, float aspect)
The display area has changed.
const char * GetDSMCCId(void) override
void QueueDSMCCPacket(unsigned char *data, int length, int componentTag, unsigned carouselId, int dataBroadcastId)
MHTextDisplay * CreateText(void) override
bool GetServiceInfo(int channelId, int &netId, int &origNetId, int &transportId, int &serviceId) override
Get netId etc from the channel index.
bool CheckStop(void) override
Check whether we have requested a stop.
std::chrono::milliseconds GetStreamMaxPos() override
QRect ScaleVideo(QRect r) const
MythDeque< DSMCCPacket * > m_dsmccQueue
static int Cid(ChannelCache_t::const_iterator it)
void NetworkBootRequested(void)
bool GetDSMCCObject(const QString &objectPath, QByteArray &result)
std::chrono::milliseconds GetStreamPos() override
std::list< MHIImageData * > m_display
void DrawImage(int x, int y, QRect rect, const QImage &image, bool bScaled=false, bool bUnder=false)
void GetInitialStreams(int &audioTag, int &videoTag) const
Get the initial component tags.
const char * GetReceiverId(void) override
void StopVideo() override
Stop displaying video.
void StopEngine(void)
Stop the MHEG engine if it's running and waits until it has.
MythDeque< int > m_keyQueue
void RequireRedraw(const QRegion ®ion) override
An area of the screen/image needs to be redrawn.
bool GetCarouselData(const QString &objectPath, QByteArray &result) override
std::chrono::milliseconds SetStreamPos(std::chrono::milliseconds pos) override
MHBitmapDisplay * CreateBitmap(bool tiled) override
static int Tid(ChannelCache_t::const_iterator it)
bool TuneTo(int channel, int tuneinfo) override
int GetICStatus() override
int GetChannelIndex(const QString &str) override
void Restart(int chanid, int sourceid, bool isLive)
Restart the MHEG engine.
bool CheckAccess(const QString &objectPath, QByteArray &cert)
void SetNetBootInfo(const unsigned char *data, uint length)
int ScaleVideoX(int n, bool roundup=false) const
std::vector< unsigned char > m_nbiData
QMultiMap< Key_t, Val_t > ChannelCache_t
bool BeginVideo(int tag) override
Begin displaying video.
void ProcessDSMCCQueue(void)
QRect Scale(QRect r) const
bool CheckCarouselObject(const QString &objectPath) override
MHIContext(InteractiveTV *parent)
static int Sid(ChannelCache_t::const_iterator it)
void SetInputRegister(int num) override
bool BeginStream(const QString &str, MHStream *notify) override
Begin playing the specified stream.
QWaitCondition m_engineWait
MHDLADisplay * CreateDynamicLineArt(bool isBoxed, MHRgba lineColour, MHRgba fillColour) override
Creation functions for various visibles.
bool StreamStarted(bool bStarted=true)
void AddToDisplay(const QImage &image, QRect rect, bool bUnder=false)
void DrawVideo(const QRect &videoRect, const QRect &dispRect) override
void DrawRect(int xPos, int yPos, int width, int height, MHRgba colour) override
Additional drawing functions.
bool IsFaceLoaded(void) const
static const int kStdDisplayWidth
int ScaleVideoY(int n, bool roundup=false) const
void EndStream() override
bool BeginAudio(int tag) override
Begin playing audio.
MHInteractionChannel m_ic
void StopAudio() override
Stop playing audio.
void UpdateOSD(InteractiveScreen *osdWindow, MythPainter *osdPainter)
Update the display.
void DrawBackground(const QRegion ®) override
int ScaleX(int n, bool roundup=false) const
static int Nid(ChannelCache_t::const_iterator it)
int ScaleY(int n, bool roundup=false) const
bool LoadFont(const QString &name)
static const int kStdDisplayHeight
bool ImageUpdated(void) const
FT_Face GetFontFace(void)
Object for displaying Dynamic Line Art.
MHRgba m_boxFillColour
Fill colour for the background.
MHIDLA(MHIContext *parent, bool isBoxed, MHRgba lineColour, MHRgba fillColour)
void SetLineSize(int width) override
void DrawPoly(bool isFilled, const MHPointVec &xArray, const MHPointVec &yArray) override
void DrawLine(int x1, int y1, int x2, int y2) override
void DrawBorderedRectangle(int x, int y, int width, int height) override
int m_width
Width of the drawing.
MHRgba m_boxLineColour
Line colour for the background.
void SetLineColour(MHRgba colour) override
void DrawRect(int x, int y, int width, int height, MHRgba colour)
void Clear(void) override
Clear the drawing.
void Draw(int x, int y) override
Draw the completed drawing onto the display.
MHRgba m_lineColour
Current line colour.
void DrawArcSector(int x, int y, int width, int height, int start, int arc, bool isSector) override
int m_lineWidth
Current line width.
void DrawOval(int x, int y, int width, int height) override
bool m_boxed
Does it have a border?
void DrawLineSub(int x1, int y1, int x2, int y2, bool swapped)
MHRgba m_fillColour
Current fill colour.
void SetFillColour(MHRgba colour) override
void SetSize(int width, int height) override
Set the box size. Also clears the drawing.
int m_height
Height of the drawing.
Data for items in the interactive television display stack.
void SetFont(int size, bool isBold, bool isItalic) override
void AddText(int x, int y, const QString &str, MHRgba colour) override
MHIText(MHIContext *parent)
void Clear(void) override
void SetSize(int width, int height) override
void Draw(int x, int y) override
QRect GetBounds(const QString &str, int &strLen, int maxSize=-1) override
~MHIText() override=default
This is a wrapper around QThread that does several additional things.
static constexpr uint16_t NBI_VERSION_UNSET