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