00001
00006
00007 #include <QString>
00008 #include <QImage>
00009
00010
00011 #include "interactivetv.h"
00012 #include "mhi.h"
00013 #include "mythlogging.h"
00014
00015 InteractiveTV::InteractiveTV(MythPlayer *nvp)
00016 : m_context(new MHIContext(this)), m_nvp(nvp)
00017 {
00018 Restart(0, 0, false);
00019
00020 if (VERBOSE_LEVEL_CHECK(VB_MHEG, LOG_ANY))
00021 {
00022 MHSetLogging(stdout, MHLogAll);
00023 }
00024 else
00025 {
00026 MHSetLogging(stdout, MHLogError);
00027 }
00028 }
00029
00030 InteractiveTV::~InteractiveTV()
00031 {
00032 delete m_context;
00033 }
00034
00035
00036 void InteractiveTV::Restart(int chanid, int sourceid, bool isLive)
00037 {
00038 m_context->Restart(chanid, sourceid, isLive);
00039 }
00040
00041
00042 bool InteractiveTV::ImageHasChanged(void)
00043 {
00044 return m_context->ImageUpdated();
00045 }
00046
00047
00048 void InteractiveTV::UpdateOSD(InteractiveScreen *osdWindow,
00049 MythPainter *osdPainter)
00050 {
00051 m_context->UpdateOSD(osdWindow, osdPainter);
00052 }
00053
00054
00055 void InteractiveTV::ProcessDSMCCSection(
00056 unsigned char *data, int length,
00057 int componentTag, unsigned carouselId, int dataBroadcastId)
00058 {
00059 m_context->QueueDSMCCPacket(data, length, componentTag,
00060 carouselId, dataBroadcastId);
00061 }
00062
00063 void InteractiveTV::Reinit(const QRect &display)
00064 {
00065 m_context->Reinit(display);
00066 }
00067
00068 bool InteractiveTV::OfferKey(QString key)
00069 {
00070 return m_context->OfferKey(key);
00071 }
00072
00073 void InteractiveTV::GetInitialStreams(int &audioTag, int &videoTag)
00074 {
00075 m_context->GetInitialStreams(audioTag, videoTag);
00076 }
00077
00078 void InteractiveTV::SetNetBootInfo(const unsigned char *data, uint length)
00079 {
00080 m_context->SetNetBootInfo(data, length);
00081 }