MHIContext Class Reference

#include <mhi.h>

Inheritance diagram for MHIContext:

MHContext

List of all members.


Detailed Description

Contains various utility functions for interactive television.

Definition at line 41 of file mhi.h.


Public Member Functions

 MHIContext (InteractiveTV *parent)
virtual ~MHIContext ()
void QueueDSMCCPacket (unsigned char *data, int length, int componentTag, unsigned carouselId, int dataBroadcastId)
void SetNetBootInfo (const unsigned char *data, uint length)
void Restart (uint chanid, uint cardid, bool isLive)
 Restart the MHEG engine.
bool OfferKey (QString key)
void UpdateOSD (OSDSet *osdSet)
 Update the display.
void Reinit (const QRect &display)
 The display area has changed.
void StopEngine (void)
 Stop the MHEG engine if it's running and waits until it has.
virtual bool CheckCarouselObject (QString objectPath)
virtual bool GetCarouselData (QString objectPath, QByteArray &result)
virtual void SetInputRegister (int nReg)
virtual void RequireRedraw (const QRegion &region)
 An area of the screen/image needs to be redrawn.
virtual bool CheckStop (void)
 Check whether we have requested a stop.
void GetInitialStreams (int &audioTag, int &videoTag)
 Get the initial component tags.
virtual MHDLADisplayCreateDynamicLineArt (bool isBoxed, MHRgba lineColour, MHRgba fillColour)
 Creation functions for various visibles.
virtual MHTextDisplayCreateText (void)
virtual MHBitmapDisplayCreateBitmap (bool tiling)
virtual void DrawRect (int xPos, int yPos, int width, int height, MHRgba colour)
 Additional drawing functions.
virtual void DrawBackground (const QRegion &reg)
virtual void DrawVideo (const QRect &videoRect, const QRect &displayRect)
void DrawImage (int x, int y, const QRect &rect, const QImage &image)
virtual int GetChannelIndex (const QString &str)
virtual bool GetServiceInfo (int channelId, int &netId, int &origNetId, int &transportId, int &serviceId)
 Get netId etc from the channel index.
virtual bool TuneTo (int channel)
virtual bool BeginAudio (const QString &stream, int tag)
 Begin playing audio from the specified stream.
virtual void StopAudio (void)
 Stop playing audio.
virtual bool BeginVideo (const QString &stream, int tag)
 Begin displaying video from the specified stream.
virtual void StopVideo (void)
 Stop displaying video.
virtual const char * GetReceiverId (void)
virtual const char * GetDSMCCId (void)
void AddToDisplay (const QImage &image, int x, int y)
FT_Face GetFontFace (void)
bool IsFaceLoaded (void)
bool LoadFont (QString name)
bool ImageUpdated (void)
int GetWidth (void)
int GetHeight (void)

Static Public Attributes

static const int StdDisplayWidth = 720
static const int StdDisplayHeight = 576

Protected Member Functions

void RunMHEGEngine (void)
void ProcessDSMCCQueue (void)
void NetworkBootRequested (void)

Static Protected Member Functions

static void * StartMHEGEngine (void *param)

Protected Attributes

InteractiveTVm_parent
Dsmccm_dsmcc
QMutex m_dsmccLock
QPtrQueue< DSMCCPacketm_dsmccQueue
QMutex m_keyLock
QValueList< int > m_keyQueue
int m_keyProfile
MHEGm_engine
QWaitCondition m_engine_wait
bool m_stop
bool m_stopped
QMutex m_display_lock
bool m_updated
int m_displayWidth
int m_displayHeight
QPtrList< MHIImageDatam_display
FT_Face m_face
bool m_face_loaded
pthread_t m_engineThread
int m_currentChannel
bool m_isLive
int m_currentCard
int m_audioTag
int m_videoTag
int m_tuningTo
uint m_lastNbiVersion
QMemArray< unsigned char > m_nbiData
QRect m_videoRect

Constructor & Destructor Documentation

MHIContext::MHIContext ( InteractiveTV parent  ) 

Definition at line 30 of file mhi.cpp.

MHIContext::~MHIContext (  )  [virtual]

Definition at line 87 of file mhi.cpp.


Member Function Documentation

void MHIContext::QueueDSMCCPacket ( unsigned char *  data,
int  length,
int  componentTag,
unsigned  carouselId,
int  dataBroadcastId 
)

Definition at line 238 of file mhi.cpp.

Referenced by InteractiveTV::ProcessDSMCCSection().

void MHIContext::SetNetBootInfo ( const unsigned char *  data,
uint  length 
)

Definition at line 257 of file mhi.cpp.

Referenced by InteractiveTV::SetNetBootInfo().

void MHIContext::Restart ( uint  chanid,
uint  cardid,
bool  isLive 
)

Restart the MHEG engine.

Definition at line 112 of file mhi.cpp.

Referenced by InteractiveTV::Restart().

bool MHIContext::OfferKey ( QString  key  ) 

Definition at line 328 of file mhi.cpp.

Referenced by InteractiveTV::OfferKey().

void MHIContext::UpdateOSD ( OSDSet osdSet  ) 

Update the display.

Definition at line 418 of file mhi.cpp.

Referenced by InteractiveTV::UpdateOSD().

void MHIContext::Reinit ( const QRect &  display  ) 

The display area has changed.

Definition at line 402 of file mhi.cpp.

Referenced by InteractiveTV::Reinit().

void MHIContext::StopEngine ( void   ) 

Stop the MHEG engine if it's running and waits until it has.

Definition at line 96 of file mhi.cpp.

Referenced by Restart(), and ~MHIContext().

bool MHIContext::CheckCarouselObject ( QString  objectPath  )  [virtual]

Implements MHContext.

Definition at line 291 of file mhi.cpp.

bool MHIContext::GetCarouselData ( QString  objectPath,
QByteArray &  result 
) [virtual]

Implements MHContext.

Definition at line 300 of file mhi.cpp.

void MHIContext::SetInputRegister ( int  nReg  )  [virtual]

Implements MHContext.

Definition at line 409 of file mhi.cpp.

void MHIContext::RequireRedraw ( const QRegion &  region  )  [virtual]

An area of the screen/image needs to be redrawn.

Implements MHContext.

Definition at line 444 of file mhi.cpp.

virtual bool MHIContext::CheckStop ( void   )  [inline, virtual]

Check whether we have requested a stop.

Implements MHContext.

Definition at line 85 of file mhi.h.

void MHIContext::GetInitialStreams ( int &  audioTag,
int &  videoTag 
)

Get the initial component tags.

Definition at line 434 of file mhi.cpp.

Referenced by InteractiveTV::GetInitialStreams().

MHDLADisplay * MHIContext::CreateDynamicLineArt ( bool  isBoxed,
MHRgba  lineColour,
MHRgba  fillColour 
) [virtual]

Creation functions for various visibles.

Implements MHContext.

Definition at line 744 of file mhi.cpp.

MHTextDisplay * MHIContext::CreateText ( void   )  [virtual]

Implements MHContext.

Definition at line 751 of file mhi.cpp.

MHBitmapDisplay * MHIContext::CreateBitmap ( bool  tiling  )  [virtual]

Implements MHContext.

Definition at line 757 of file mhi.cpp.

void MHIContext::DrawRect ( int  xPos,
int  yPos,
int  width,
int  height,
MHRgba  colour 
) [virtual]

Additional drawing functions.

Implements MHContext.

Definition at line 763 of file mhi.cpp.

Referenced by MHIDLA::Draw(), and DrawBackground().

void MHIContext::DrawBackground ( const QRegion &  reg  )  [virtual]

Implements MHContext.

Definition at line 839 of file mhi.cpp.

void MHIContext::DrawVideo ( const QRect &  videoRect,
const QRect &  displayRect 
) [virtual]

Implements MHContext.

Definition at line 515 of file mhi.cpp.

void MHIContext::DrawImage ( int  x,
int  y,
const QRect &  rect,
const QImage &  image 
)

Definition at line 795 of file mhi.cpp.

Referenced by MHIBitmap::Draw(), MHIDLA::Draw(), and MHIText::Draw().

int MHIContext::GetChannelIndex ( const QString &  str  )  [virtual]

Implements MHContext.

Definition at line 572 of file mhi.cpp.

Referenced by BeginAudio(), and BeginVideo().

bool MHIContext::GetServiceInfo ( int  channelId,
int &  netId,
int &  origNetId,
int &  transportId,
int &  serviceId 
) [virtual]

Get netId etc from the channel index.

Implements MHContext.

Definition at line 654 of file mhi.cpp.

bool MHIContext::TuneTo ( int  channel  )  [virtual]

Implements MHContext.

Definition at line 674 of file mhi.cpp.

Referenced by BeginAudio(), and BeginVideo().

bool MHIContext::BeginAudio ( const QString &  stream,
int  tag 
) [virtual]

Begin playing audio from the specified stream.

Implements MHContext.

Definition at line 690 of file mhi.cpp.

void MHIContext::StopAudio ( void   )  [virtual]

Stop playing audio.

Implements MHContext.

Definition at line 713 of file mhi.cpp.

bool MHIContext::BeginVideo ( const QString &  stream,
int  tag 
) [virtual]

Begin displaying video from the specified stream.

Implements MHContext.

Definition at line 719 of file mhi.cpp.

void MHIContext::StopVideo ( void   )  [virtual]

Stop displaying video.

Implements MHContext.

Definition at line 738 of file mhi.cpp.

virtual const char* MHIContext::GetReceiverId ( void   )  [inline, virtual]

Implements MHContext.

Definition at line 120 of file mhi.h.

virtual const char* MHIContext::GetDSMCCId ( void   )  [inline, virtual]

Implements MHContext.

Definition at line 122 of file mhi.h.

void MHIContext::AddToDisplay ( const QImage &  image,
int  x,
int  y 
)

Definition at line 454 of file mhi.cpp.

Referenced by DrawImage(), and DrawRect().

FT_Face MHIContext::GetFontFace ( void   )  [inline]

Definition at line 129 of file mhi.h.

Referenced by MHIText::AddText(), and MHIText::GetBounds().

bool MHIContext::IsFaceLoaded ( void   )  [inline]

Definition at line 130 of file mhi.h.

Referenced by MHIText::AddText(), and MHIText::GetBounds().

bool MHIContext::LoadFont ( QString  name  ) 

Definition at line 61 of file mhi.cpp.

Referenced by MHIContext().

bool MHIContext::ImageUpdated ( void   )  [inline]

Definition at line 132 of file mhi.h.

Referenced by InteractiveTV::ImageHasChanged().

int MHIContext::GetWidth ( void   )  [inline]

Definition at line 136 of file mhi.h.

Referenced by DrawImage(), and DrawRect().

int MHIContext::GetHeight ( void   )  [inline]

Definition at line 137 of file mhi.h.

Referenced by DrawImage(), and DrawRect().

void * MHIContext::StartMHEGEngine ( void *  param  )  [static, protected]

Definition at line 168 of file mhi.cpp.

Referenced by Restart().

void MHIContext::RunMHEGEngine ( void   )  [protected]

Definition at line 177 of file mhi.cpp.

Referenced by StartMHEGEngine().

void MHIContext::ProcessDSMCCQueue ( void   )  [protected]

Definition at line 216 of file mhi.cpp.

Referenced by GetCarouselData(), and RunMHEGEngine().

void MHIContext::NetworkBootRequested ( void   )  [protected]

Definition at line 273 of file mhi.cpp.

Referenced by RunMHEGEngine().


Member Data Documentation

const int MHIContext::StdDisplayWidth = 720 [static]

Definition at line 134 of file mhi.h.

Referenced by DrawImage(), DrawRect(), DrawVideo(), and RequireRedraw().

const int MHIContext::StdDisplayHeight = 576 [static]

Definition at line 135 of file mhi.h.

Referenced by DrawImage(), DrawRect(), DrawVideo(), and RequireRedraw().

Definition at line 145 of file mhi.h.

Referenced by BeginAudio(), BeginVideo(), and DrawVideo().

Dsmcc* MHIContext::m_dsmcc [protected]

QMutex MHIContext::m_dsmccLock [protected]

QPtrQueue<DSMCCPacket> MHIContext::m_dsmccQueue [protected]

Definition at line 149 of file mhi.h.

Referenced by MHIContext(), ProcessDSMCCQueue(), QueueDSMCCPacket(), and Restart().

QMutex MHIContext::m_keyLock [protected]

Definition at line 151 of file mhi.h.

Referenced by OfferKey(), Restart(), RunMHEGEngine(), and SetInputRegister().

QValueList<int> MHIContext::m_keyQueue [protected]

Definition at line 152 of file mhi.h.

Referenced by OfferKey(), Restart(), RunMHEGEngine(), and SetInputRegister().

int MHIContext::m_keyProfile [protected]

Definition at line 153 of file mhi.h.

Referenced by OfferKey(), and SetInputRegister().

MHEG* MHIContext::m_engine [protected]

QWaitCondition MHIContext::m_engine_wait [protected]

bool MHIContext::m_stop [protected]

Definition at line 158 of file mhi.h.

Referenced by CheckStop(), GetCarouselData(), Restart(), RunMHEGEngine(), and StopEngine().

Definition at line 159 of file mhi.h.

Referenced by Restart(), StartMHEGEngine(), and StopEngine().

QMutex MHIContext::m_display_lock [protected]

Definition at line 160 of file mhi.h.

Referenced by AddToDisplay(), DrawVideo(), RequireRedraw(), and UpdateOSD().

Definition at line 161 of file mhi.h.

Referenced by ImageUpdated(), NetworkBootRequested(), RequireRedraw(), Restart(), and UpdateOSD().

int MHIContext::m_displayWidth [protected]

Definition at line 162 of file mhi.h.

Referenced by DrawVideo(), GetWidth(), and Reinit().

int MHIContext::m_displayHeight [protected]

Definition at line 163 of file mhi.h.

Referenced by DrawVideo(), GetHeight(), and Reinit().

QPtrList<MHIImageData> MHIContext::m_display [protected]

FT_Face MHIContext::m_face [protected]

Definition at line 168 of file mhi.h.

Referenced by GetFontFace(), LoadFont(), and ~MHIContext().

Definition at line 169 of file mhi.h.

Referenced by IsFaceLoaded(), MHIContext(), and ~MHIContext().

Definition at line 171 of file mhi.h.

Referenced by Restart(), and StopEngine().

Definition at line 173 of file mhi.h.

Referenced by BeginAudio(), BeginVideo(), GetChannelIndex(), and Restart().

Definition at line 174 of file mhi.h.

Referenced by Restart(), and TuneTo().

int MHIContext::m_currentCard [protected]

Definition at line 175 of file mhi.h.

Referenced by GetChannelIndex(), and Restart().

int MHIContext::m_audioTag [protected]

Definition at line 177 of file mhi.h.

Referenced by BeginAudio(), GetInitialStreams(), and Restart().

int MHIContext::m_videoTag [protected]

Definition at line 178 of file mhi.h.

Referenced by BeginVideo(), GetInitialStreams(), and Restart().

int MHIContext::m_tuningTo [protected]

Definition at line 179 of file mhi.h.

Referenced by BeginAudio(), BeginVideo(), and Restart().

Definition at line 181 of file mhi.h.

Referenced by NetworkBootRequested(), SetNetBootInfo(), and TuneTo().

QMemArray<unsigned char> MHIContext::m_nbiData [protected]

Definition at line 182 of file mhi.h.

Referenced by NetworkBootRequested(), SetNetBootInfo(), and TuneTo().

QRect MHIContext::m_videoRect [protected]

Definition at line 184 of file mhi.h.

Referenced by DrawVideo(), and Reinit().


The documentation for this class was generated from the following files:

Generated on Sat Dec 18 05:16:05 2010 for MythTV by  doxygen 1.5.5