|
MythTV master
|
Contains various utility functions for interactive television. More...
#include <libmythtv/mheg/mhi.h>
Public Member Functions | |
| MHIContext (InteractiveTV *parent) | |
| ~MHIContext () override | |
| void | QueueDSMCCPacket (unsigned char *data, int length, int componentTag, unsigned carouselId, int dataBroadcastId) |
| void | SetNetBootInfo (const unsigned char *data, uint length) |
| void | Restart (int chanid, int sourceid, bool isLive) |
| Restart the MHEG engine. More... | |
| bool | OfferKey (const QString &key) |
| void | UpdateOSD (InteractiveScreen *osdWindow, MythPainter *osdPainter) |
| Update the display. More... | |
| void | Reinit (QRect videoRect, QRect dispRect, float aspect) |
| The display area has changed. More... | |
| void | StopEngine (void) |
| Stop the MHEG engine if it's running and waits until it has. More... | |
| bool | CheckCarouselObject (const QString &objectPath) override |
| bool | GetCarouselData (const QString &objectPath, QByteArray &result) override |
| void | SetInputRegister (int num) override |
| void | RequireRedraw (const QRegion ®ion) override |
| An area of the screen/image needs to be redrawn. More... | |
| bool | CheckStop (void) override |
| Check whether we have requested a stop. More... | |
| void | GetInitialStreams (int &audioTag, int &videoTag) const |
| Get the initial component tags. More... | |
| MHDLADisplay * | CreateDynamicLineArt (bool isBoxed, MHRgba lineColour, MHRgba fillColour) override |
| Creation functions for various visibles. More... | |
| MHTextDisplay * | CreateText (void) override |
| MHBitmapDisplay * | CreateBitmap (bool tiled) override |
| void | DrawRect (int xPos, int yPos, int width, int height, MHRgba colour) override |
| Additional drawing functions. More... | |
| void | DrawBackground (const QRegion ®) override |
| void | DrawVideo (const QRect &videoRect, const QRect &dispRect) override |
| void | DrawImage (int x, int y, QRect rect, const QImage &image, bool bScaled=false, bool bUnder=false) |
| int | GetChannelIndex (const QString &str) override |
| bool | GetServiceInfo (int channelId, int &netId, int &origNetId, int &transportId, int &serviceId) override |
| Get netId etc from the channel index. More... | |
| bool | TuneTo (int channel, int tuneinfo) override |
| bool | BeginStream (const QString &str, MHStream *notify) override |
| Begin playing the specified stream. More... | |
| void | EndStream () override |
| bool | StreamStarted (bool bStarted=true) |
| bool | BeginAudio (int tag) override |
| Begin playing audio. More... | |
| void | StopAudio () override |
| Stop playing audio. More... | |
| bool | BeginVideo (int tag) override |
| Begin displaying video. More... | |
| void | StopVideo () override |
| Stop displaying video. More... | |
| std::chrono::milliseconds | GetStreamPos () override |
| std::chrono::milliseconds | GetStreamMaxPos () override |
| std::chrono::milliseconds | SetStreamPos (std::chrono::milliseconds pos) override |
| void | StreamPlay (bool play) override |
| const char * | GetReceiverId (void) override |
| const char * | GetDSMCCId (void) override |
| int | GetICStatus () override |
| void | AddToDisplay (const QImage &image, QRect rect, bool bUnder=false) |
| int | ScaleX (int n, bool roundup=false) const |
| int | ScaleY (int n, bool roundup=false) const |
| QRect | Scale (QRect r) const |
| int | ScaleVideoX (int n, bool roundup=false) const |
| int | ScaleVideoY (int n, bool roundup=false) const |
| QRect | ScaleVideo (QRect r) const |
| FT_Face | GetFontFace (void) |
| bool | IsFaceLoaded (void) const |
| bool | LoadFont (const QString &name) |
| bool | ImageUpdated (void) const |
Public Member Functions inherited from MHContext | |
| virtual | ~MHContext ()=default |
| virtual bool | CheckCarouselObject (const QString &objectPath)=0 |
| virtual bool | GetCarouselData (const QString &objectPath, QByteArray &result)=0 |
| virtual void | SetInputRegister (int nReg)=0 |
| virtual void | RequireRedraw (const QRegion ®ion)=0 |
| virtual MHDLADisplay * | CreateDynamicLineArt (bool isBoxed, MHRgba lineColour, MHRgba fillColour)=0 |
| virtual MHTextDisplay * | CreateText (void)=0 |
| virtual MHBitmapDisplay * | CreateBitmap (bool tiled)=0 |
| virtual void | DrawRect (int xPos, int yPos, int width, int height, MHRgba colour)=0 |
| virtual void | DrawVideo (const QRect &videoRect, const QRect &displayRect)=0 |
| virtual void | DrawBackground (const QRegion ®)=0 |
| virtual int | GetChannelIndex (const QString &str)=0 |
| virtual bool | GetServiceInfo (int channelId, int &netId, int &origNetId, int &transportId, int &serviceId)=0 |
| virtual bool | TuneTo (int channel, int tuneinfo)=0 |
| virtual bool | CheckStop (void)=0 |
| virtual bool | BeginStream (const QString &str, MHStream *notify=nullptr)=0 |
| virtual void | EndStream ()=0 |
| virtual bool | BeginAudio (int tag)=0 |
| virtual void | StopAudio ()=0 |
| virtual bool | BeginVideo (int tag)=0 |
| virtual void | StopVideo ()=0 |
| virtual std::chrono::milliseconds | GetStreamPos ()=0 |
| virtual std::chrono::milliseconds | GetStreamMaxPos ()=0 |
| virtual std::chrono::milliseconds | SetStreamPos (std::chrono::milliseconds)=0 |
| virtual void | StreamPlay (bool play=true)=0 |
| virtual const char * | GetReceiverId (void)=0 |
| virtual const char * | GetDSMCCId (void)=0 |
| virtual int | GetICStatus ()=0 |
Static Public Attributes | |
| static const int | kStdDisplayWidth = 720 |
| static const int | kStdDisplayHeight = 576 |
Protected Types | |
| using | Val_t = QPair< int, int > |
| using | Key_t = QPair< int, int > |
| using | ChannelCache_t = QMultiMap< Key_t, Val_t > |
Protected Member Functions | |
| void | run (void) override |
| void | ProcessDSMCCQueue (void) |
| void | NetworkBootRequested (void) |
| void | ClearDisplay (void) |
| void | ClearQueue (void) |
| bool | LoadChannelCache () |
| bool | GetDSMCCObject (const QString &objectPath, QByteArray &result) |
| bool | CheckAccess (const QString &objectPath, QByteArray &cert) |
Static Protected Member Functions | |
| static int | Tid (ChannelCache_t::const_iterator it) |
| static int | Cid (ChannelCache_t::const_iterator it) |
| static int | Nid (ChannelCache_t::const_iterator it) |
| static int | Sid (ChannelCache_t::const_iterator it) |
Protected Attributes | |
| InteractiveTV * | m_parent {nullptr} |
| Dsmcc * | m_dsmcc {nullptr} |
| QMutex | m_dsmccLock |
| MythDeque< DSMCCPacket * > | m_dsmccQueue |
| MHInteractionChannel | m_ic |
| MHStream * | m_notify {nullptr} |
| QMutex | m_keyLock |
| MythDeque< int > | m_keyQueue |
| int | m_keyProfile {0} |
| MHEG * | m_engine |
| QMutex | m_runLock |
| QWaitCondition | m_engineWait |
| bool | m_stop {false} |
| QMutex | m_displayLock |
| bool | m_updated {false} |
| std::list< MHIImageData * > | m_display |
| FT_Face | m_face {nullptr} |
| bool | m_faceLoaded {false} |
| MThread * | m_engineThread {nullptr} |
| int | m_currentChannel {-1} |
| int | m_currentStream {-1} |
| bool | m_isLive {false} |
| int | m_currentSource {-1} |
| int | m_audioTag {-1} |
| int | m_videoTag {-1} |
| QList< int > | m_tuneInfo |
| uint | m_lastNbiVersion {NBI_VERSION_UNSET} |
| std::vector< unsigned char > | m_nbiData |
| QRect | m_videoRect |
| QRect | m_videoDisplayRect |
| QRect | m_displayRect |
| ChannelCache_t | m_channelCache |
| QMutex | m_channelMutex |
|
protected |
|
protected |
|
protected |
|
explicit |
Definition at line 788 of file mhi.cpp.
Referenced by DrawImage(), and DrawRect().
|
overridevirtual |
|
overridevirtual |
|
protected |
Definition at line 396 of file mhi.cpp.
Referenced by CheckCarouselObject(), and GetCarouselData().
|
overridevirtual |
|
inlineoverridevirtual |
|
inlinestaticprotected |
Definition at line 232 of file mhi.h.
Referenced by GetChannelIndex(), and GetServiceInfo().
|
protected |
Definition at line 140 of file mhi.cpp.
Referenced by NetworkBootRequested(), RequireRedraw(), Restart(), and ~MHIContext().
|
protected |
Definition at line 149 of file mhi.cpp.
Referenced by Restart(), SetNetBootInfo(), and ~MHIContext().
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
| void MHIContext::DrawImage | ( | int | x, |
| int | y, | ||
| QRect | rect, | ||
| const QImage & | image, | ||
| bool | bScaled = false, |
||
| bool | bUnder = false |
||
| ) |
Definition at line 1203 of file mhi.cpp.
Referenced by MHIText::Draw(), MHIDLA::Draw(), and MHIBitmap::Draw().
|
overridevirtual |
Additional drawing functions.
Implements MHContext.
Definition at line 1186 of file mhi.cpp.
Referenced by MHIDLA::Draw(), and DrawBackground().
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
inlineoverridevirtual |
|
protected |
Definition at line 388 of file mhi.cpp.
Referenced by CheckAccess().
|
inline |
Definition at line 163 of file mhi.h.
Referenced by MHIText::AddText(), and MHIText::GetBounds().
|
overridevirtual |
| void MHIContext::GetInitialStreams | ( | int & | audioTag, |
| int & | videoTag | ||
| ) | const |
|
inlineoverridevirtual |
|
overridevirtual |
Get netId etc from the channel index.
Implements MHContext.
Definition at line 978 of file mhi.cpp.
Referenced by BeginStream().
|
overridevirtual |
|
overridevirtual |
|
inline |
Definition at line 164 of file mhi.h.
Referenced by MHIText::AddText(), and MHIText::GetBounds().
|
protected |
Definition at line 856 of file mhi.cpp.
Referenced by GetChannelIndex(), and GetServiceInfo().
| bool MHIContext::LoadFont | ( | const QString & | name | ) |
Definition at line 98 of file mhi.cpp.
Referenced by MHIContext().
|
protected |
|
inlinestaticprotected |
Definition at line 233 of file mhi.h.
Referenced by GetServiceInfo().
|
protected |
Definition at line 276 of file mhi.cpp.
Referenced by GetCarouselData(), and run().
| void MHIContext::QueueDSMCCPacket | ( | unsigned char * | data, |
| int | length, | ||
| int | componentTag, | ||
| unsigned | carouselId, | ||
| int | dataBroadcastId | ||
| ) |
| void MHIContext::Reinit | ( | QRect | videoRect, |
| QRect | dispRect, | ||
| float | aspect | ||
| ) |
|
overridevirtual |
| void MHIContext::Restart | ( | int | chanid, |
| int | sourceid, | ||
| bool | isLive | ||
| ) |
|
inline |
Definition at line 766 of file mhi.cpp.
Referenced by AddToDisplay(), and DrawVideo().
|
inline |
Definition at line 782 of file mhi.cpp.
Referenced by DrawVideo().
Definition at line 772 of file mhi.cpp.
Referenced by ScaleVideo().
Definition at line 777 of file mhi.cpp.
Referenced by ScaleVideo().
|
overridevirtual |
| void MHIContext::SetNetBootInfo | ( | const unsigned char * | data, |
| uint | length | ||
| ) |
|
overridevirtual |
|
inlinestaticprotected |
Definition at line 234 of file mhi.h.
Referenced by GetServiceInfo().
|
overridevirtual |
| void MHIContext::StopEngine | ( | void | ) |
Stop the MHEG engine if it's running and waits until it has.
Definition at line 157 of file mhi.cpp.
Referenced by Restart(), and ~MHIContext().
|
overridevirtual |
|
overridevirtual |
|
inlinestaticprotected |
Definition at line 231 of file mhi.h.
Referenced by GetChannelIndex(), and GetServiceInfo().
|
overridevirtual |
| void MHIContext::UpdateOSD | ( | InteractiveScreen * | osdWindow, |
| MythPainter * | osdPainter | ||
| ) |
|
static |
Definition at line 169 of file mhi.h.
Referenced by DrawVideo(), RequireRedraw(), ScaleVideoY(), and ScaleY().
|
static |
Definition at line 168 of file mhi.h.
Referenced by DrawVideo(), RequireRedraw(), ScaleVideoX(), and ScaleX().
|
protected |
Definition at line 215 of file mhi.h.
Referenced by BeginAudio(), BeginStream(), GetInitialStreams(), and Restart().
|
protected |
Definition at line 229 of file mhi.h.
Referenced by GetChannelIndex(), GetServiceInfo(), LoadChannelCache(), and Restart().
|
protected |
Definition at line 230 of file mhi.h.
Referenced by GetChannelIndex(), GetServiceInfo(), and Restart().
|
protected |
Definition at line 210 of file mhi.h.
Referenced by GetChannelIndex(), and Restart().
|
protected |
Definition at line 213 of file mhi.h.
Referenced by GetChannelIndex(), LoadChannelCache(), and Restart().
|
protected |
Definition at line 211 of file mhi.h.
Referenced by BeginStream(), GetChannelIndex(), Restart(), and StreamStarted().
|
protected |
Definition at line 203 of file mhi.h.
Referenced by AddToDisplay(), ClearDisplay(), DrawVideo(), and UpdateOSD().
|
protected |
Definition at line 200 of file mhi.h.
Referenced by AddToDisplay(), DrawVideo(), NetworkBootRequested(), RequireRedraw(), and UpdateOSD().
|
protected |
|
protected |
Definition at line 184 of file mhi.h.
Referenced by CheckCarouselObject(), GetCarouselData(), GetDSMCCObject(), NetworkBootRequested(), ProcessDSMCCQueue(), Restart(), SetNetBootInfo(), and ~MHIContext().
|
protected |
Definition at line 185 of file mhi.h.
Referenced by CheckCarouselObject(), GetCarouselData(), GetDSMCCObject(), NetworkBootRequested(), ProcessDSMCCQueue(), QueueDSMCCPacket(), Restart(), SetNetBootInfo(), and TuneTo().
|
protected |
Definition at line 186 of file mhi.h.
Referenced by ClearQueue(), ProcessDSMCCQueue(), and QueueDSMCCPacket().
|
protected |
Definition at line 195 of file mhi.h.
Referenced by NetworkBootRequested(), RequireRedraw(), Restart(), run(), StreamStarted(), and ~MHIContext().
|
protected |
Definition at line 208 of file mhi.h.
Referenced by Restart(), and StopEngine().
|
protected |
Definition at line 198 of file mhi.h.
Referenced by GetCarouselData(), OfferKey(), QueueDSMCCPacket(), run(), SetNetBootInfo(), and StopEngine().
|
protected |
Definition at line 205 of file mhi.h.
Referenced by GetFontFace(), LoadFont(), and ~MHIContext().
Definition at line 206 of file mhi.h.
Referenced by IsFaceLoaded(), MHIContext(), and ~MHIContext().
|
protected |
Definition at line 188 of file mhi.h.
Referenced by CheckCarouselObject(), and GetCarouselData().
|
protected |
Definition at line 191 of file mhi.h.
Referenced by OfferKey(), Restart(), run(), and SetInputRegister().
|
protected |
Definition at line 193 of file mhi.h.
Referenced by OfferKey(), and SetInputRegister().
|
protected |
Definition at line 192 of file mhi.h.
Referenced by OfferKey(), Restart(), run(), and SetInputRegister().
|
protected |
Definition at line 219 of file mhi.h.
Referenced by NetworkBootRequested(), SetNetBootInfo(), and TuneTo().
|
protected |
Definition at line 220 of file mhi.h.
Referenced by NetworkBootRequested(), SetNetBootInfo(), and TuneTo().
|
protected |
Definition at line 189 of file mhi.h.
Referenced by BeginStream(), EndStream(), and StreamStarted().
|
protected |
Definition at line 181 of file mhi.h.
Referenced by BeginAudio(), BeginStream(), BeginVideo(), DrawVideo(), EndStream(), GetStreamMaxPos(), GetStreamPos(), SetStreamPos(), and StreamPlay().
|
mutableprotected |
Definition at line 197 of file mhi.h.
Referenced by GetCarouselData(), Restart(), run(), StopEngine(), and StreamStarted().
Definition at line 199 of file mhi.h.
Referenced by CheckStop(), GetCarouselData(), Restart(), run(), and StopEngine().
|
protected |
Definition at line 201 of file mhi.h.
Referenced by ImageUpdated(), NetworkBootRequested(), RequireRedraw(), Restart(), and UpdateOSD().
|
protected |
Definition at line 222 of file mhi.h.
Referenced by ClearDisplay(), DrawVideo(), Reinit(), and UpdateOSD().
|
protected |
Definition at line 222 of file mhi.h.
Referenced by Reinit(), ScaleVideo(), ScaleVideoX(), and ScaleVideoY().
|
protected |
Definition at line 216 of file mhi.h.
Referenced by BeginStream(), BeginVideo(), GetInitialStreams(), and Restart().