From f6c7f5df87629cf926708dda57c613af29c3739d Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sun, 25 Nov 2007 13:29:04 +0000 Subject: [PATCH] Updates to new streaming protocol and live tv --- eventdispatcher.h | 3 +- objects.mk | 2 +- playerlivetv.cc | 500 +++++++++++++++++++++++++++++++++++++++++++ playerlivetv.h | 137 ++++++++++++ vdr.cc | 12 +- vdr.h | 1 + vdrresponsepacket.cc | 8 +- vdrresponsepacket.h | 6 +- vvideolivetv.cc | 29 +-- vvideolivetv.h | 4 +- 10 files changed, 674 insertions(+), 28 deletions(-) create mode 100644 playerlivetv.cc create mode 100644 playerlivetv.h diff --git a/eventdispatcher.h b/eventdispatcher.h index 9f32160..4aa90f1 100644 --- a/eventdispatcher.h +++ b/eventdispatcher.h @@ -76,8 +76,7 @@ class EventDispatcher // The EventDispatcher class will call ed_cb_find() on each receiver until the implementor // returns true = this is the receiver to call. virtual bool ed_cb_find(EDReceiver* edr, void* userTag)=0; - - private: + EDRL receivers; #ifndef WIN32 diff --git a/objects.mk b/objects.mk index e5e33e0..bd8ee20 100644 --- a/objects.mk +++ b/objects.mk @@ -18,4 +18,4 @@ OBJECTS1 = command.o log.o tcp.o dsock.o thread.o timers.o i18n.o mutex.o \ vaudioplayer.o audioplayer.o demuxeraudio.o abstractoption.o \ eventdispatcher.o vdrrequestpacket.o vdrresponsepacket.o \ vvideolivetv.o \ - vvideolive.o vlivebanner.o + vvideolive.o vlivebanner.o playerlivetv.o diff --git a/playerlivetv.cc b/playerlivetv.cc new file mode 100644 index 0000000..46433ba --- /dev/null +++ b/playerlivetv.cc @@ -0,0 +1,500 @@ +/* + Copyright 2007 Chris Tallon + + This file is part of VOMP. + + VOMP is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "playerlivetv.h" + +#include "log.h" +#include "audio.h" +#include "video.h" +#include "demuxerts.h" +#include "vdr.h" +#include "messagequeue.h" +#include "remote.h" +#include "message.h" +#include "channel.h" + +// ----------------------------------- Called from outside, one offs or info funcs + +PlayerLiveTV::PlayerLiveTV(MessageQueue* tmessageQueue, void* tmessageReceiver, ChannelList* tchanList) +: vfeed(this), afeed(this) +{ + messageQueue = tmessageQueue; + messageReceiver = tmessageReceiver; + chanList = tchanList; + + audio = Audio::getInstance(); + video = Video::getInstance(); + logger = Log::getInstance(); + vdr = VDR::getInstance(); + initted = false; + +// videoStartup = false; +// preBuffering = false; + + stopNow = false; + state = 1; + + video->turnVideoOn(); +} + +PlayerLiveTV::~PlayerLiveTV() +{ + if (initted) shutdown(); +} + +int PlayerLiveTV::init() +{ + if (initted) return 0; + + demuxer = new DemuxerTS(); + if (!demuxer) return 0; + + if (!demuxer->init(this, audio, video, 2097152, 524288)) + { + logger->log("PlayerLiveTV", Log::ERR, "Demuxer failed to init"); + shutdown(); + return 0; + } + + vfeed.init(); + afeed.init(); + + video->stop(); + video->blank(); + audio->stop(); + + initted = true; + return 1; +} + +int PlayerLiveTV::shutdown() +{ + if (!initted) return 0; + stop(); + initted = false; + + delete demuxer; + +#ifdef WIN32 + CloseHandle(mutex); +#endif + + return 1; +} + +bool* PlayerLiveTV::getDemuxerMpegAudioChannels() +{ + return demuxer->getmpAudioChannels(); +} + +bool* PlayerLiveTV::getDemuxerAc3AudioChannels() +{ + return demuxer->getac3AudioChannels(); +} + +int PlayerLiveTV::getCurrentAudioChannel() +{ + return demuxer->getAID(); +} + +void PlayerLiveTV::setAudioChannel(int newChannel) +{ + return demuxer->setAID(newChannel); +} + +// ----------------------------------- Externally called events + +void PlayerLiveTV::go(ULONG index) +{ + struct PLTVInstruction i; + i.instruction = 1; + i.channelIndex = index; + instructions.push(i); + + threadStart(); +} + +void PlayerLiveTV::setChannel(ULONG index) +{ +// demuxer->setVID(Vpid); +// demuxer->setAID(Apid); +// play(); + logger->log("PlayerLiveTV", Log::DEBUG, "setChannel"); + + struct PLTVInstruction i; + i.instruction = 1; + i.channelIndex = index; + instructions.push(i); + + threadSignalNoLock(); +} + +void PlayerLiveTV::stop() +{ + logger->log("PlayerLiveTV", Log::DEBUG, "stop"); + + struct PLTVInstruction i; + i.instruction = 2; + instructions.push(i); + + logger->log("PlayerLiveTV", Log::DEBUG, "Pushed instruction"); + + threadSignal(); + + logger->log("PlayerLiveTV", Log::DEBUG, "Signal sent"); + + threadStop(); + + logger->log("PlayerLiveTV", Log::DEBUG, "Stop returning"); +} + +// ----------------------------------- Callback + +void PlayerLiveTV::call(void* caller) +{ + if (caller == demuxer) + { + logger->log("PlayerLiveTV", Log::DEBUG, "Callback from demuxer"); + + if (video->getTVsize() == Video::ASPECT4X3) + { + logger->log("PlayerLiveTV", Log::DEBUG, "TV is 4:3, ignoring aspect switching"); + return; + } + + int dxCurrentAspect = demuxer->getAspectRatio(); + if (dxCurrentAspect == Demuxer::ASPECT_4_3) + { + logger->log("PlayerLiveTV", Log::DEBUG, "Demuxer said video is 4:3 aspect, switching TV"); + video->setAspectRatio(Video::ASPECT4X3); + + Message* m = new Message(); + m->from = this; + m->to = messageReceiver; + m->message = Message::PLAYER_EVENT; + m->parameter = PlayerLiveTV::ASPECT43; + messageQueue->postMessageFromOuterSpace(m); + } + else if (dxCurrentAspect == Demuxer::ASPECT_16_9) + { + logger->log("PlayerLiveTV", Log::DEBUG, "Demuxer said video is 16:9 aspect, switching TV"); + video->setAspectRatio(Video::ASPECT16X9); + + Message* m = new Message(); + m->from = this; + m->to = messageReceiver; + m->message = Message::PLAYER_EVENT; + m->parameter = PlayerLiveTV::ASPECT169; + messageQueue->postMessageFromOuterSpace(m); + } + else + { + logger->log("PlayerLiveTV", Log::DEBUG, "Demuxer said video is something else... ignoring"); + } + + } + else + { + if (videoStartup) + { + logger->log("PlayerLiveTV", Log::DEBUG, "Video startup"); + videoStartup = false; + video->reset(); + video->play(); + video->sync(); + vfeed.release(); + } + + threadSignalNoLock(); + } +} + +// ----------------------------------- + +void PlayerLiveTV::streamReceive(void* data, ULONG len) +{ + logger->log("PlayerLiveTV", Log::DEBUG, "Got data, %p, %lu", data, len); + + + if (streamChunks.size() < 30) + { + StreamChunk s; + s.data = data; + s.len = len; + streamChunks.push(s); + threadSignalNoLock(); + } + else + + { + // Too many chunks in streamChunks, drop this chunk + free(data); + logger->log("PlayerLiveTV", Log::DEBUG, "Dropped chunk"); + } +} + +void PlayerLiveTV::clearStreamChunks() +{ + while(streamChunks.size()) + { + logger->log("PlayerLiveTV", Log::DEBUG, "Dropping chunk from old stream"); + struct StreamChunk s = streamChunks.front(); + streamChunks.pop(); + free(s.data); + } +} + +void PlayerLiveTV::chunkToDemuxer() +{ + StreamChunk s = streamChunks.front(); + streamChunks.pop(); + logger->log("PlayerLiveTV", Log::DEBUG, "About to call demuxer with %p %lu", s.data, s.len); + demuxer->put((UCHAR*)s.data, s.len); + +/* + FILE* fp = fopen("/data.ts", "a"); + fwrite(s.data, s.len, 1, fp); + fclose(fp); +*/ + + /* logger->log("PlayerLiveTV", Log::DEBUG, "Back from demuxer %i", a); + if (0)//(a != 50000) + { + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + logger->log("PlayerLiveTV", Log::ERR, "--------------------------------------- Back from demuxer %i", a); + abort(); + + } + */ + free(s.data); +} + +void PlayerLiveTV::switchState(UCHAR newState) +{ + logger->log("PlayerLiveTV", Log::DEBUG, "Switch from state %u to state %u", state, newState); + + switch(state) + { + case S_STOP: // FROM S_STOP + { + switch(newState) + { + case S_STOP: + { + abort(); + } + case S_PREBUFFERING: + { + break; + } + case S_PLAY: + { + abort(); + } + } + break; + } + + case S_PREBUFFERING: // FROM S_PREBUFFERING + { + switch(newState) + { + case S_STOP: + { + vdr->stopStreaming(); + clearStreamChunks(); + break; + } + case S_PREBUFFERING: + { + vdr->stopStreaming(); + clearStreamChunks(); + break; + } + case S_PLAY: + { + videoStartup = true; + + audio->reset(); + audio->setStreamType(Audio::MPEG2_PES); + audio->systemMuteOff(); + video->reset(); + demuxer->reset(); + demuxer->seek(); + + audio->sync(); + audio->play(); + video->sync(); + video->pause(); + afeed.start(); + vfeed.start(); + break; + } + } + break; + } + + case S_PLAY: // FROM S_PLAY + { + switch(newState) + { + case S_STOP: + { + vdr->stopStreaming(); + clearStreamChunks(); + vfeed.stop(); + afeed.stop(); + video->stop(); + video->blank(); + audio->stop(); + audio->unPause(); + video->reset(); + break; + } + case S_PREBUFFERING: + { + vdr->stopStreaming(); + clearStreamChunks(); + vfeed.stop(); + afeed.stop(); + video->stop(); + video->blank(); + audio->stop(); + audio->unPause(); + video->reset(); + demuxer->reset(); + break; + } + case S_PLAY: + { + abort(); + } + } + break; + } + } + + state = newState; +} + +void PlayerLiveTV::threadMethod() +{ + logger->log("PlayerLiveTV", Log::DEBUG, "Thread started"); + + while(1) + { + while(!instructions.empty()) + { + struct PLTVInstruction i = instructions.front(); + instructions.pop(); + + logger->log("PlayerLiveTV", Log::DEBUG, "%u %lu", i.instruction, i.channelIndex); + + + if (i.instruction == 1) + { + logger->log("PlayerLiveTV", Log::DEBUG, "start new stream"); + + switchState(S_PREBUFFERING); + + Channel* chan = (*chanList)[i.channelIndex]; + chan->loadPids(); + demuxer->setVID(chan->vpid); + demuxer->setAID(chan->apids[0].pid); + logger->log("PlayerLiveTV", Log::DEBUG, "Demuxer pids: %u %u", chan->vpid, chan->apids[0].pid); + vdr->streamChannel(chan->number, this); + + } + else if (i.instruction == 2) + { + logger->log("PlayerLiveTV", Log::DEBUG, "Stopping"); + switchState(S_STOP); + + stopNow = true; + break; + } + } + + if (stopNow) break; + + if (streamChunks.size()) + { + if (state == S_PREBUFFERING) + { + if (streamChunks.size() > 0) + { + while(streamChunks.size()) chunkToDemuxer(); + switchState(S_PLAY); + } + } + else if (state == S_PLAY) + { + while(streamChunks.size()) chunkToDemuxer(); + } + } + + threadLock(); + threadWaitForSignal(); // unlocks and waits for signal + + threadUnlock(); + logger->log("PlayerLiveTV", Log::DEBUG, "Woken"); + } + + logger->log("PlayerLiveTV", Log::DEBUG, "End of thread"); +} + +void PlayerLiveTV::threadPostStopCleanup() +{ + logger->log("PlayerLiveTV", Log::DEBUG, "Post stop cleanup"); +} + +// ----------------------------------- Dev + +#ifdef DEV +void PlayerLiveTV::test1() +{ + logger->log("PlayerLiveTV", Log::DEBUG, "PLAYER TEST 1"); +} + +void PlayerLiveTV::test2() +{ + logger->log("PlayerLiveTV", Log::DEBUG, "PLAYER TEST 2"); +} +#endif + diff --git a/playerlivetv.h b/playerlivetv.h new file mode 100644 index 0000000..21a214e --- /dev/null +++ b/playerlivetv.h @@ -0,0 +1,137 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef PLAYER_H +#define PLAYER_H + +#include +#include +#ifndef WIN32 +#include +#endif +#include + +#include + +#ifdef WIN32 +#include "threadwin.h" +#else +#include "threadp.h" +#endif + +#include "callback.h" +#include "defines.h" +#include "vfeed.h" +#include "afeed.h" +#include "vdr.h" + +class MessageQueue; +class Audio; +class Video; +class Log; +class DemuxerTS; + +struct PLTVInstruction +{ + UCHAR instruction; // 1 = setChannel, 2 = stop + ULONG channelIndex; +}; + +struct StreamChunk +{ + void* data; + ULONG len; +}; + +class PlayerLiveTV : public Thread_TYPE, public Callback, public StreamReceiver +{ + public: + PlayerLiveTV(MessageQueue* messageQueue, void* messageReceiver, ChannelList* chanList); + virtual ~PlayerLiveTV(); + + int init(); + int shutdown(); + + void go(ULONG index); + void setChannel(ULONG index); + void stop(); + void setAudioChannel(int newChannel); + + bool* getDemuxerMpegAudioChannels(); + bool* getDemuxerAc3AudioChannels(); + int getCurrentAudioChannel(); + + void call(void*); // for callback interface + + virtual void streamReceive(void*, ULONG); // stream receiver interface + + // Player events + + // FIXME so far this just duplicates the old system + the wss + + const static UCHAR CONNECTION_LOST = 1; + const static UCHAR STOP_PLAYBACK = 2; + const static UCHAR STREAM_END = 3; + const static UCHAR ASPECT43 = 4; + const static UCHAR ASPECT169 = 5; + +#ifdef DEV + void test1(); + void test2(); +#endif + + protected: + void threadMethod(); + void threadPostStopCleanup(); + + private: + + MessageQueue* messageQueue; + void* messageReceiver; + Log* logger; + Audio* audio; + Video* video; + DemuxerTS* demuxer; + VDR* vdr; + VFeed vfeed; + AFeed afeed; + ChannelList* chanList; + + queue instructions; + queue streamChunks; + + bool initted; + + UCHAR state; + const static UCHAR S_STOP = 1; + const static UCHAR S_PREBUFFERING = 2; + const static UCHAR S_PLAY = 3; + void switchState(UCHAR newState); + + bool videoStartup; + bool stopNow; + + void clearStreamChunks(); + void chunkToDemuxer(); + +}; + +#endif + diff --git a/vdr.cc b/vdr.cc index cb9032b..aa53d0e 100644 --- a/vdr.cc +++ b/vdr.cc @@ -201,6 +201,10 @@ void VDR::threadMethod() Log::getInstance()->log("VDR", Log::DEBUG, "Net read timeout"); // Do timeouts + //edLock(); + //for(EDRL::iterator i = receivers.begin(); i != receivers.end(); i++) + //{ + continue; } @@ -302,6 +306,7 @@ VDR_ResponsePacket* VDR::RequestResponse(VDR_RequestPacket* vrp) // - init with serial number of request packet VDR_PacketReceiver vdrpr; +// vdrpr.requestTime = time(NULL); vdrpr.receiverChannel = VDR::CHANNEL_REQUEST_RESPONSE; vdrpr.requestSerialNumber = vrp->getSerial(); edRegister(&vdrpr); @@ -344,8 +349,9 @@ bool VDR_PacketReceiver::call(void* userTag) if (receiverChannel == VDR::CHANNEL_STREAM) { // It's a stream packet. - streamReceiver->streamReceive(NULL, 0); - delete (VDR_ResponsePacket*)userTag; + VDR_ResponsePacket* vresp = (VDR_ResponsePacket*)userTag; + streamReceiver->streamReceive(vresp->getUserData(), vresp->getUserDataLength()); + delete vresp; return false; } @@ -606,7 +612,7 @@ UCHAR* VDR::getBlock(ULLONG position, UINT maxAmount, UINT* amountReceived, ULON } // Special handling for getblock - UCHAR* toReturn = vresp->getBlock_getUserData(); + UCHAR* toReturn = vresp->getUserData(); *amountReceived = vresp->getUserDataLength(); delete vresp; diff --git a/vdr.h b/vdr.h index 44a8e86..ad3257c 100644 --- a/vdr.h +++ b/vdr.h @@ -89,6 +89,7 @@ class VDR_PacketReceiver : public EDReceiver // implementation in vdr.cc friend class VDR; protected: +// ULONG requestTime; ULONG receiverChannel; // If receiverChannel == 1: diff --git a/vdrresponsepacket.cc b/vdrresponsepacket.cc index e9ca08b..707bd76 100644 --- a/vdrresponsepacket.cc +++ b/vdrresponsepacket.cc @@ -28,7 +28,7 @@ VDR_ResponsePacket::VDR_ResponsePacket() userDataLength = 0; packetPos = 0; userData = NULL; - getBlockRelease = false; + ownBlock = true; channelID = 0; @@ -38,7 +38,7 @@ VDR_ResponsePacket::VDR_ResponsePacket() VDR_ResponsePacket::~VDR_ResponsePacket() { - if (getBlockRelease) return; // don't free if it's a getblock + if (!ownBlock) return; // don't free if it's a getblock if (userData) free(userData); } @@ -119,9 +119,9 @@ long VDR_ResponsePacket::extractLONG() return l; } -UCHAR* VDR_ResponsePacket::getBlock_getUserData() +UCHAR* VDR_ResponsePacket::getUserData() { - getBlockRelease = true; + ownBlock = false; return userData; } diff --git a/vdrresponsepacket.h b/vdrresponsepacket.h index dc35869..7dc327a 100644 --- a/vdrresponsepacket.h +++ b/vdrresponsepacket.h @@ -54,8 +54,8 @@ class VDR_ResponsePacket void dumpUD(); - // Do this a better way? - UCHAR* getBlock_getUserData(); + // If you call this, the memory becomes yours. Free with free() + UCHAR* getUserData(); private: UCHAR* userData; @@ -67,7 +67,7 @@ class VDR_ResponsePacket ULONG requestID; ULONG streamID; - bool getBlockRelease; + bool ownBlock; }; #endif diff --git a/vvideolivetv.cc b/vvideolivetv.cc index a698eb6..2840c0d 100644 --- a/vvideolivetv.cc +++ b/vvideolivetv.cc @@ -22,7 +22,7 @@ #include "vchannellist.h" #include "video.h" -//#include "playerlivetv.h" +#include "playerlivetv.h" #include "channel.h" #include "boxstack.h" #include "colour.h" @@ -69,8 +69,8 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V eventList = NULL; videoMode = video->getMode(); -// player = new PlayerLiveTV(Command::getInstance(), this); -// player->init(chanList); + player = new PlayerLiveTV(Command::getInstance(), this, chanList); + player->init(); setSize(video->getScreenWidth(), video->getScreenHeight()); createBuffer(); @@ -175,7 +175,7 @@ VVideoLiveTV::~VVideoLiveTV() { if (playing) stop(); -// delete player; + delete player; video->setDefaultAspect(); } @@ -311,13 +311,14 @@ void VVideoLiveTV::go() setClock(); displayOSD(); - // start player + player->go(0); } void VVideoLiveTV::stop() { Timers::getInstance()->cancelTimer(this, 1); Timers::getInstance()->cancelTimer(this, 2); + player->stop(); playing = false; } @@ -663,8 +664,8 @@ bool VVideoLiveTV::channelChange(UCHAR changeType, UINT newData) Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Set player to channel %u", currentChannelIndex); + player->setChannel(currentChannelIndex); return true; -// player->setChannel(currentChannelIndex); } void VVideoLiveTV::processMessage(Message* m) @@ -686,14 +687,13 @@ void VVideoLiveTV::processMessage(Message* m) else if (m->message == Message::AUDIO_CHANGE_CHANNEL) { Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Received change audio channel to %i", m->parameter); -// ((Player*)player)->setAudioChannel(m->parameter); + player->setAudioChannel(m->parameter); } else if (m->message == Message::PLAYER_EVENT) { -/* switch(m->parameter) { - case Player::CONNECTION_LOST: // connection lost detected + case PlayerLiveTV::CONNECTION_LOST: // connection lost detected { Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Received connection lost from player"); // I can't handle this, send it to command @@ -703,7 +703,9 @@ void VVideoLiveTV::processMessage(Message* m) Command::getInstance()->postMessageNoLock(m2); break; } - case Player::STREAM_END: + + /* + case PlayerLiveTV::STREAM_END: { // I can't handle this, send it to command - improve this Message* m2 = new Message(); // Must be done after this thread finishes, and must break into master mutex @@ -712,7 +714,9 @@ void VVideoLiveTV::processMessage(Message* m) Command::getInstance()->postMessageNoLock(m2); break; } - case Player::ASPECT43: + */ + + case PlayerLiveTV::ASPECT43: { if (dowss) { @@ -723,7 +727,7 @@ void VVideoLiveTV::processMessage(Message* m) } break; } - case Player::ASPECT169: + case PlayerLiveTV::ASPECT169: { if (dowss) { @@ -735,7 +739,6 @@ void VVideoLiveTV::processMessage(Message* m) break; } } - */ } } diff --git a/vvideolivetv.h b/vvideolivetv.h index 23799bd..99b59bc 100644 --- a/vvideolivetv.h +++ b/vvideolivetv.h @@ -38,7 +38,7 @@ class Video; class VChannelList; class BoxStack; class WTextbox; -//class PlayerLiveTV; +class PlayerLiveTV; class VVideoLiveTV : public Boxx, public TimerReceiver { @@ -68,7 +68,7 @@ class VVideoLiveTV : public Boxx, public TimerReceiver BoxStack* boxstack; VDR* vdr; Video* video; -// PlayerLiveTV* player; + PlayerLiveTV* player; bool playing; ChannelList* chanList; VChannelList* vchannelList; -- 2.39.5