From b39ba2352794818e59c351fa7ab213d3669cc2e3 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Tue, 3 Mar 2020 21:40:25 +0000 Subject: [PATCH] Rename class: PlayerLiveTV to PlayerVideoLive --- objects.mk | 7 +- playerlivetv.cc => playervideolive.cc | 138 +++++++++++++------------- playerlivetv.h => playervideolive.h | 10 +- vteletextview.cc | 4 +- vteletextview.h | 6 +- vvideolivetv.cc | 58 +++++------ 6 files changed, 112 insertions(+), 111 deletions(-) rename playerlivetv.cc => playervideolive.cc (78%) rename playerlivetv.h => playervideolive.h (92%) diff --git a/objects.mk b/objects.mk index 1e81873..dd220df 100644 --- a/objects.mk +++ b/objects.mk @@ -1,7 +1,7 @@ OBJ_COMMON = command.o tcp.o dsock.o thread.o timers.o i18n.o vdp6.o \ message.o messagequeue.o wol.o audio.o video.o log.o \ vdr.o recman.o recording.o recinfo.o channel.o rectimer.o event.o \ - directory.o mark.o option.o playervideorec.o playerradio.o vfeed.o afeed.o \ + directory.o mark.o option.o playerradio.o vfeed.o afeed.o \ demuxer.o demuxervdr.o demuxerts.o stream.o osd.o surface.o \ region.o colour.o boxstack.o boxx.o tbboxx.o vrecording.o \ vinfo.o vquestion.o vrecordinglist.o vrecordinglistclassic.o \ @@ -14,11 +14,12 @@ OBJ_COMMON = command.o tcp.o dsock.o thread.o timers.o i18n.o vdp6.o woptionpane.o woptionbox.o wremoteconfig.o wtabbar.o led.o \ inputman.o input.o inputudp.o vpicturebanner.o abstractoption.o \ eventdispatcher.o vdrrequestpacket.o vdrresponsepacket.o \ - vvideolivetv.o vsleeptimer.o playerlivetv.o playerliveradio.o \ + vvideolivetv.o vsleeptimer.o playerliveradio.o \ wprogressbar.o bitmap.o dvbsubtitles.o tfeed.o vteletextview.o \ teletextdecodervbiebu.o teletxt/txtfont.o movieinfo.o seriesinfo.o \ wmovieview.o wseriesview.o tvmedia.o wtvmedia.o wpictureview.o \ - osdvector.o surfacevector.o buffer.o + osdvector.o surfacevector.o buffer.o \ + playervideorec.o playervideolive.o OBJ_RASPBERRY = main.o threadp.o osdopenvg.o \ ledraspberry.o videoomx.o audioomx.o imageomx.o \ diff --git a/playerlivetv.cc b/playervideolive.cc similarity index 78% rename from playerlivetv.cc rename to playervideolive.cc index 62004b0..bd68b07 100644 --- a/playerlivetv.cc +++ b/playervideolive.cc @@ -17,8 +17,6 @@ along with VOMP. If not, see . */ -#include "playerlivetv.h" - #include "defines.h" #include "log.h" #include "audio.h" @@ -33,9 +31,11 @@ #include "osdreceiver.h" #include "command.h" +#include "playervideolive.h" + // ----------------------------------- Called from outside, one offs or info funcs -PlayerLiveTV::PlayerLiveTV(MessageQueue* tmessageQueue, void* tmessageReceiver, OSDReceiver* tosdReceiver, ChannelList* tchanList) +PlayerVideoLive::PlayerVideoLive(MessageQueue* tmessageQueue, void* tmessageReceiver, OSDReceiver* tosdReceiver, ChannelList* tchanList) : vfeed(this), afeed(this), tfeed(this) { messageQueue = tmessageQueue; @@ -59,12 +59,12 @@ PlayerLiveTV::PlayerLiveTV(MessageQueue* tmessageQueue, void* tmessageReceiver, video->turnVideoOn(); } -PlayerLiveTV::~PlayerLiveTV() +PlayerVideoLive::~PlayerVideoLive() { if (initted) shutdown(); } -int PlayerLiveTV::init() +int PlayerVideoLive::init() { if (initted) return 0; @@ -92,7 +92,7 @@ int PlayerLiveTV::init() if (!demuxer->init(this, audio, video, teletext, demux_video_size, demux_audio_size, 65536 * text_fak, 25./*unimportant*/, subtitles)) { - logger->log("PlayerLiveTV", Log::ERR, "Demuxer failed to init"); + logger->log("PlayerVideoLive", Log::ERR, "Demuxer failed to init"); shutdown(); return 0; } @@ -106,10 +106,10 @@ int PlayerLiveTV::init() return 1; } -int PlayerLiveTV::shutdown() +int PlayerVideoLive::shutdown() { if (!initted) return 0; - logger->log("PlayerLiveTV", Log::DEBUG, "Shutdown"); + logger->log("PlayerVideoLive", Log::DEBUG, "Shutdown"); stop(); initted = false; @@ -120,42 +120,42 @@ int PlayerLiveTV::shutdown() return 1; } -bool* PlayerLiveTV::getDemuxerMpegAudioChannels() +bool* PlayerVideoLive::getDemuxerMpegAudioChannels() { return demuxer->getmpAudioChannels(); } -bool* PlayerLiveTV::getDemuxerAc3AudioChannels() +bool* PlayerVideoLive::getDemuxerAc3AudioChannels() { return demuxer->getac3AudioChannels(); } -int PlayerLiveTV::getCurrentAudioChannel() +int PlayerVideoLive::getCurrentAudioChannel() { return demuxer->getAID(); } -void PlayerLiveTV::setAudioChannel(int newChannel, int type,int streamtype) +void PlayerVideoLive::setAudioChannel(int newChannel, int type,int streamtype) { demuxer->setAID(newChannel, type, streamtype, true); } -void PlayerLiveTV::setSubtitleChannel(int newChannel) +void PlayerVideoLive::setSubtitleChannel(int newChannel) { demuxer->setSubID(newChannel); } -int* PlayerLiveTV::getTeletxtSubtitlePages() +int* PlayerVideoLive::getTeletxtSubtitlePages() { return teletext->getSubtitlePages(); } -int PlayerLiveTV::getCurrentSubtitleChannel() +int PlayerVideoLive::getCurrentSubtitleChannel() { return demuxer->getSubID(); } -bool PlayerLiveTV::toggleSubtitles() +bool PlayerVideoLive::toggleSubtitles() { if (!subtitlesShowing) { @@ -170,7 +170,7 @@ bool PlayerLiveTV::toggleSubtitles() return subtitlesShowing; } -void PlayerLiveTV::turnSubtitlesOn(bool ison) +void PlayerVideoLive::turnSubtitlesOn(bool ison) { if (ison) { @@ -184,14 +184,14 @@ void PlayerLiveTV::turnSubtitlesOn(bool ison) } } -void PlayerLiveTV::tellSubtitlesOSDVisible(bool visible) +void PlayerVideoLive::tellSubtitlesOSDVisible(bool visible) { subtitles->setOSDMenuVisibility(visible); } // ----------------------------------- Externally called events -void PlayerLiveTV::go(ULONG index) +void PlayerVideoLive::go(ULONG index) { struct PLInstruction i; i.instruction = I_SETCHANNEL; @@ -200,9 +200,9 @@ void PlayerLiveTV::go(ULONG index) threadStart(); } -void PlayerLiveTV::setChannel(ULONG index) +void PlayerVideoLive::setChannel(ULONG index) { - logger->log("PlayerLiveTV", Log::DEBUG, "setChannel"); + logger->log("PlayerVideoLive", Log::DEBUG, "setChannel"); struct PLInstruction i; i.instruction = I_SETCHANNEL; i.channelIndex = index; @@ -210,24 +210,24 @@ void PlayerLiveTV::setChannel(ULONG index) threadSignalNoLock(); } -void PlayerLiveTV::stop() +void PlayerVideoLive::stop() { - logger->log("PlayerLiveTV", Log::DEBUG, "stop"); + logger->log("PlayerVideoLive", Log::DEBUG, "stop"); struct PLInstruction i; i.instruction = I_STOP; instructions.push(i); threadSignal(); threadStop(); - logger->log("PlayerLiveTV", Log::DEBUG, "stop succesfull"); + logger->log("PlayerVideoLive", Log::DEBUG, "stop succesfull"); } // ----------------------------------- Callback -void PlayerLiveTV::call(void* caller) +void PlayerVideoLive::call(void* caller) { if (caller == demuxer) { - logger->log("PlayerLiveTV", Log::DEBUG, "Callback from demuxer"); + logger->log("PlayerVideoLive", Log::DEBUG, "Callback from demuxer"); int parx,pary; UCHAR dxCurrentAspect = demuxer->getAspectRatio(&parx, &pary); @@ -235,43 +235,43 @@ void PlayerLiveTV::call(void* caller) { if (video->getTVsize() == Video::ASPECT16X9) { - logger->log("PlayerLiveTV", Log::DEBUG, "Demuxer said video is 4:3 aspect, switching TV"); + logger->log("PlayerVideoLive", Log::DEBUG, "Demuxer said video is 4:3 aspect, switching TV"); video->setAspectRatio(Video::ASPECT4X3, parx, pary); } else { - logger->log("PlayerLiveTV", Log::DEBUG, "TV is 4:3, ignoring aspect switching"); + logger->log("PlayerVideoLive", Log::DEBUG, "TV is 4:3, ignoring aspect switching"); } Message* m = new Message(); m->from = this; m->to = messageReceiver; m->message = Message::PLAYER_EVENT; - m->parameter = PlayerLiveTV::ASPECT43; + m->parameter = PlayerVideoLive::ASPECT43; messageQueue->postMessage(m); } else if (dxCurrentAspect == Demuxer::ASPECT_16_9) { if (video->getTVsize() == Video::ASPECT16X9) { - logger->log("PlayerLiveTV", Log::DEBUG, "Demuxer said video is 16:9 aspect, switching TV"); + logger->log("PlayerVideoLive", Log::DEBUG, "Demuxer said video is 16:9 aspect, switching TV"); video->setAspectRatio(Video::ASPECT16X9, parx, pary); } else { - logger->log("PlayerLiveTV", Log::DEBUG, "TV is 4:3, ignoring aspect switching"); + logger->log("PlayerVideoLive", Log::DEBUG, "TV is 4:3, ignoring aspect switching"); } Message* m = new Message(); m->from = this; m->to = messageReceiver; m->message = Message::PLAYER_EVENT; - m->parameter = PlayerLiveTV::ASPECT169; + m->parameter = PlayerVideoLive::ASPECT169; messageQueue->postMessage(m); } else { - logger->log("PlayerLiveTV", Log::DEBUG, "Demuxer said video is something else... switch anyway"); + logger->log("PlayerVideoLive", Log::DEBUG, "Demuxer said video is something else... switch anyway"); video->setAspectRatio(dxCurrentAspect, parx, pary); } } @@ -279,7 +279,7 @@ void PlayerLiveTV::call(void* caller) { if (state == S_VIDEOSTARTUP) { - logger->log("PlayerLiveTV", Log::DEBUG, "afeed video startup"); + logger->log("PlayerVideoLive", Log::DEBUG, "afeed video startup"); videoStartup = true; threadSignalNoLock(); } @@ -288,14 +288,14 @@ void PlayerLiveTV::call(void* caller) // ----------------------------------- -void PlayerLiveTV::streamReceive(ULONG flag, void* data, ULONG len) +void PlayerVideoLive::streamReceive(ULONG flag, void* data, ULONG len) { // Flag: // 0 = normal stream packet // 1 = stream end // 2 = connection lost - //logger->log("PlayerLiveTV", Log::DEBUG, "Received a streamchunk from VDR, flag = %lu", flag); + //logger->log("PlayerVideoLive", Log::DEBUG, "Received a streamchunk from VDR, flag = %lu", flag); if (flag == 1) { @@ -305,7 +305,7 @@ void PlayerLiveTV::streamReceive(ULONG flag, void* data, ULONG len) m->from = this; m->to = messageReceiver; m->message = Message::PLAYER_EVENT; - m->parameter = PlayerLiveTV::STREAM_END; + m->parameter = PlayerVideoLive::STREAM_END; messageQueue->postMessage(m); } @@ -321,28 +321,28 @@ void PlayerLiveTV::streamReceive(ULONG flag, void* data, ULONG len) { // Too many chunks in streamChunks, drop this chunk free(data); - logger->log("PlayerLiveTV", Log::WARN, "Dropped chunk"); + logger->log("PlayerVideoLive", Log::WARN, "Dropped chunk"); } } -void PlayerLiveTV::clearStreamChunks() +void PlayerVideoLive::clearStreamChunks() { while(streamChunks.size()) { - logger->log("PlayerLiveTV", Log::DEBUG, "Dropping chunk from old stream"); + logger->log("PlayerVideoLive", Log::DEBUG, "Dropping chunk from old stream"); struct StreamChunk s = streamChunks.front(); streamChunks.pop(); free(s.data); } } -void PlayerLiveTV::chunkToDemuxer() +void PlayerVideoLive::chunkToDemuxer() { StreamChunk s = streamChunks.front(); streamChunks.pop(); -// logger->log("PlayerLiveTV", Log::DEBUG, "About to call demuxer with %p %lu", s.data, s.len); +// logger->log("PlayerVideoLive", Log::DEBUG, "About to call demuxer with %p %lu", s.data, s.len); /* int a =*/ demuxer->put(static_cast(s.data), s.len); -// logger->log("PlayerLiveTV", Log::DEBUG, "put %i to demuxer", a); +// logger->log("PlayerVideoLive", Log::DEBUG, "put %i to demuxer", a); free(s.data); if (pendingAudioPlay && (demuxer->getHorizontalSize() || !video->independentAVStartUp())) //Horizontal Size is zero, if not parsed { @@ -357,9 +357,9 @@ void PlayerLiveTV::chunkToDemuxer() } } -void PlayerLiveTV::switchState(UCHAR newState) +void PlayerVideoLive::switchState(UCHAR newState) { - logger->log("PlayerLiveTV", Log::DEBUG, "Switch from state %u to state %u", state, newState); + logger->log("PlayerVideoLive", Log::DEBUG, "Switch from state %u to state %u", state, newState); switch(state) { @@ -410,7 +410,7 @@ void PlayerLiveTV::switchState(UCHAR newState) } default: { - logger->log("PlayerLiveTV", Log::EMERG, "Thread called state %u to state %u which is not supported", state, newState); + logger->log("PlayerVideoLive", Log::EMERG, "Thread called state %u to state %u which is not supported", state, newState); abort(); break; } @@ -485,7 +485,7 @@ void PlayerLiveTV::switchState(UCHAR newState) } default: { - logger->log("PlayerLiveTV", Log::EMERG, "Thread called state %u to state %u which is not supported", state, newState); + logger->log("PlayerVideoLive", Log::EMERG, "Thread called state %u to state %u which is not supported", state, newState); abort(); break; } @@ -559,7 +559,7 @@ void PlayerLiveTV::switchState(UCHAR newState) } default: { - logger->log("PlayerLiveTV", Log::EMERG, "Thread called state %u to state %u which is not supported", state, newState); + logger->log("PlayerVideoLive", Log::EMERG, "Thread called state %u to state %u which is not supported", state, newState); abort(); break; } @@ -629,7 +629,7 @@ void PlayerLiveTV::switchState(UCHAR newState) } default: { - logger->log("PlayerLiveTV", Log::EMERG, "Thread called state %u to state %u which is not supported", state, newState); + logger->log("PlayerVideoLive", Log::EMERG, "Thread called state %u to state %u which is not supported", state, newState); abort(); break; } @@ -638,7 +638,7 @@ void PlayerLiveTV::switchState(UCHAR newState) } } -bool PlayerLiveTV::checkError() +bool PlayerVideoLive::checkError() { if (!vdr->isConnected()) { @@ -648,7 +648,7 @@ bool PlayerLiveTV::checkError() m->from = this; m->to = messageReceiver; m->message = Message::PLAYER_EVENT; - m->parameter = PlayerLiveTV::CONNECTION_LOST; + m->parameter = PlayerVideoLive::CONNECTION_LOST; messageQueue->postMessage(m); return true; @@ -656,7 +656,7 @@ bool PlayerLiveTV::checkError() return false; } -void PlayerLiveTV::optimizeInstructionQueue() +void PlayerVideoLive::optimizeInstructionQueue() { // Walk the list @@ -677,14 +677,14 @@ void PlayerLiveTV::optimizeInstructionQueue() } } -void PlayerLiveTV::threadMethod() +void PlayerVideoLive::threadMethod() { while(1) { - //logger->log("PlayerLiveTV", Log::DEBUG, "VS: %d pA %d",videoStartup,pendingAudioPlay); + //logger->log("PlayerVideoLive", Log::DEBUG, "VS: %d pA %d",videoStartup,pendingAudioPlay); if (videoStartup && !pendingAudioPlay) // we are in S_VIDEOSTARTUP, afeed has signalled that it has written some data { - logger->log("PlayerLiveTV", Log::DEBUG, "Enter prebuffering"); + logger->log("PlayerVideoLive", Log::DEBUG, "Enter prebuffering"); switchState(S_PREBUFFERING); videoStartup = false; preBufferCount = 0; @@ -700,7 +700,7 @@ void PlayerLiveTV::threadMethod() if (i.instruction == I_SETCHANNEL) { - logger->log("PlayerLiveTV", Log::DEBUG, "start new stream"); + logger->log("PlayerVideoLive", Log::DEBUG, "start new stream"); bool subsRestore = subtitles->isShowing(); @@ -762,17 +762,17 @@ void PlayerLiveTV::threadMethod() if (dolby) { demuxer->setAID(chan->dpids[selected].pid, 1, chan->dpids[selected].type, true); audio->setStreamType(Audio::MPEG2_PES); - logger->log("PlayerLiveTV", Log::DEBUG, "Demuxer pids: %u %u (ac3) %u", + logger->log("PlayerVideoLive", Log::DEBUG, "Demuxer pids: %u %u (ac3) %u", chan->vpid, chan->dpids[selected].pid, chan->dpids[selected].type); } else { demuxer->setAID(chan->apids[selected].pid, 0, chan->apids[selected].type, true); audio->setStreamType(Audio::MPEG2_PES); - logger->log("PlayerLiveTV", Log::DEBUG, "Demuxer pids: %u %u %u", chan->vpid, chan->apids[selected].pid, + logger->log("PlayerVideoLive", Log::DEBUG, "Demuxer pids: %u %u %u", chan->vpid, chan->apids[selected].pid, chan->apids[selected].type); } } else { - logger->log("PlayerLiveTV", Log::WARN, "Demuxer video pid only: %u", chan->vpid); + logger->log("PlayerVideoLive", Log::WARN, "Demuxer video pid only: %u", chan->vpid); } @@ -823,14 +823,14 @@ void PlayerLiveTV::threadMethod() m->from = this; m->to = messageReceiver; m->message = Message::PLAYER_EVENT; - m->parameter = PlayerLiveTV::STREAM_END; + m->parameter = PlayerVideoLive::STREAM_END; messageQueue->postMessage(m); } } } else if (i.instruction == I_STOP) { - logger->log("PlayerLiveTV", Log::DEBUG, "Stopping"); + logger->log("PlayerVideoLive", Log::DEBUG, "Stopping"); switchState(S_STOP); checkError(); @@ -845,22 +845,22 @@ void PlayerLiveTV::threadMethod() while(streamChunks.size()) { - //logger->log("PlayerLiveTV", Log::DEBUG, "chunk mark1 %d", streamChunks.size()); + //logger->log("PlayerVideoLive", Log::DEBUG, "chunk mark1 %d", streamChunks.size()); chunkToDemuxer(); - //logger->log("PlayerLiveTV", Log::DEBUG, "chunk mark2 %d", streamChunks.size()); + //logger->log("PlayerVideoLive", Log::DEBUG, "chunk mark2 %d", streamChunks.size()); if (state == S_PREBUFFERING) { - // logger->log("PlayerLiveTV", Log::DEBUG, "chunk mark3"); + // logger->log("PlayerVideoLive", Log::DEBUG, "chunk mark3"); ++preBufferCount; ULONG percentDone = (preBufferCount * 100) / preBufferAmount; - logger->log("PlayerLiveTV", Log::DEBUG, "Prebuffering %lu%%", percentDone); + logger->log("PlayerVideoLive", Log::DEBUG, "Prebuffering %lu%%", percentDone); Message* m = new Message(); m->from = this; m->to = messageReceiver; m->message = Message::PLAYER_EVENT; - m->parameter = PlayerLiveTV::PREBUFFERING; + m->parameter = PlayerVideoLive::PREBUFFERING; m->tag = percentDone; messageQueue->postMessage(m); @@ -871,12 +871,12 @@ void PlayerLiveTV::threadMethod() } } } - //logger->log("PlayerLiveTV", Log::DEBUG, "wait for signal %d", streamChunks.size()); + //logger->log("PlayerVideoLive", Log::DEBUG, "wait for signal %d", streamChunks.size()); threadLock(); threadWaitForSignal(); // unlocks and waits for signal threadUnlock(); - //logger->log("PlayerLiveTV", Log::DEBUG, "wait for signal2 %d",streamChunks.size()); + //logger->log("PlayerVideoLive", Log::DEBUG, "wait for signal2 %d",streamChunks.size()); } - logger->log("PlayerLiveTV", Log::DEBUG, "End of thread"); + logger->log("PlayerVideoLive", Log::DEBUG, "End of thread"); } diff --git a/playerlivetv.h b/playervideolive.h similarity index 92% rename from playerlivetv.h rename to playervideolive.h index 75fe986..5fe49c2 100644 --- a/playerlivetv.h +++ b/playervideolive.h @@ -17,8 +17,8 @@ along with VOMP. If not, see . */ -#ifndef PLAYERLIVETV_H -#define PLAYERLIVETV_H +#ifndef PLAYERVIDEOLIVE_H +#define PLAYERVIDEOLIVE_H #include #include @@ -54,11 +54,11 @@ class DemuxerTS; class OSDReceiver; class DVBSubtitles; -class PlayerLiveTV : public PlayerLive, public Thread_TYPE, public Callback, public StreamReceiver +class PlayerVideoLive : public PlayerLive, public Thread_TYPE, public Callback, public StreamReceiver { public: - PlayerLiveTV(MessageQueue* messageQueue, void* messageReceiver, OSDReceiver* tosdReceiver, ChannelList* chanList); - virtual ~PlayerLiveTV(); + PlayerVideoLive(MessageQueue* messageQueue, void* messageReceiver, OSDReceiver* tosdReceiver, ChannelList* chanList); + virtual ~PlayerVideoLive(); virtual int init(); virtual int shutdown(); diff --git a/vteletextview.cc b/vteletextview.cc index 15a1ce6..b45d19b 100644 --- a/vteletextview.cc +++ b/vteletextview.cc @@ -22,11 +22,11 @@ #include "video.h" #include "boxstack.h" #include "input.h" -#include "playerlivetv.h" +#include "playervideolive.h" #include "vteletextview.h" -VTeletextView::VTeletextView(TeletextDecoderVBIEBU* TTdecoder, Boxx* playerview, PlayerLiveTV* playerObj) +VTeletextView::VTeletextView(TeletextDecoderVBIEBU* TTdecoder, Boxx* playerview, PlayerVideoLive* playerObj) { ttdecoder = TTdecoder; pv = playerview; diff --git a/vteletextview.h b/vteletextview.h index 5e7ac45..819ebb0 100644 --- a/vteletextview.h +++ b/vteletextview.h @@ -24,12 +24,12 @@ #include "teletextdecodervbiebu.h" -class PlayerLiveTV; +class PlayerVideoLive; class VTeletextView : public Boxx { public: - VTeletextView(TeletextDecoderVBIEBU* TTdecoder, Boxx* playerview, PlayerLiveTV* palyerObj); + VTeletextView(TeletextDecoderVBIEBU* TTdecoder, Boxx* playerview, PlayerVideoLive* palyerObj); ~VTeletextView(); void draw(bool completedraw, bool onlyfirstline); void draw() { draw(true, false); } @@ -49,7 +49,7 @@ class VTeletextView : public Boxx int page; bool subtitlemode{}; Boxx* pv; - PlayerLiveTV* player; + PlayerVideoLive* player; }; #endif diff --git a/vvideolivetv.cc b/vvideolivetv.cc index 77a0aa1..2c9178e 100644 --- a/vvideolivetv.cc +++ b/vvideolivetv.cc @@ -23,7 +23,7 @@ #include "video.h" #include "audio.h" #include "playerlive.h" -#include "playerlivetv.h" +#include "playervideolive.h" #include "playerliveradio.h" #include "channel.h" #include "boxstack.h" @@ -89,7 +89,7 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V if ((*chanList)[currentChannelIndex]->type == VDR::VIDEO) { streamType = VDR::VIDEO; - player = new PlayerLiveTV(Command::getInstance(), this, this, chanList); + player = new PlayerVideoLive(Command::getInstance(), this, this, chanList); } else { @@ -436,7 +436,7 @@ int VVideoLiveTV::handleCommand(int command) } case Input::RECORD: if (streamType == VDR::VIDEO) - (static_cast(player))->toggleSubtitles(); + (static_cast(player))->toggleSubtitles(); return 2; } @@ -602,7 +602,7 @@ void VVideoLiveTV::doKey(int command) void VVideoLiveTV::doTeletext(bool subtitlemode) { if (streamType !=VDR::VIDEO) return; - (static_cast(player))->tellSubtitlesOSDVisible(true); + (static_cast(player))->tellSubtitlesOSDVisible(true); bool exists = true; // Cancel keying @@ -615,14 +615,14 @@ void VVideoLiveTV::doTeletext(bool subtitlemode) osdChanNum.setText(formatChanNum); osdChanName.setText((*chanList)[osdChannelIndex]->name); } - (static_cast(player))->tellSubtitlesOSDVisible(true); + (static_cast(player))->tellSubtitlesOSDVisible(true); if (osd.getVisible()) clearScreen(); // Draw the teletxt - VTeletextView *vtxv=((PlayerLiveTV*)player)->getTeletextDecoder()->getTeletxtView(); + VTeletextView *vtxv=((PlayerVideoLive*)player)->getTeletextDecoder()->getTeletxtView(); if (vtxv==NULL) { - vtxv= new VTeletextView(((PlayerLiveTV*)player)->getTeletextDecoder(),this, (PlayerLiveTV*)player); - ((PlayerLiveTV*)player)->getTeletextDecoder()->registerTeletextView(vtxv); + vtxv= new VTeletextView(((PlayerVideoLive*)player)->getTeletextDecoder(),this, (PlayerVideoLive*)player); + ((PlayerVideoLive*)player)->getTeletextDecoder()->registerTeletextView(vtxv); exists=false; } @@ -655,13 +655,13 @@ void VVideoLiveTV::doAudioSelector() osdChanNum.setText(formatChanNum); osdChanName.setText((*chanList)[osdChannelIndex]->name); } - int subtitleChannel=((PlayerLiveTV*)player)->getCurrentSubtitleChannel(); + int subtitleChannel=((PlayerVideoLive*)player)->getCurrentSubtitleChannel(); int subtitleType=0x10; - if (!(static_cast(player))->isSubtitlesOn()) { - if (((PlayerLiveTV*)player)->getTeletextDecoder()->getTeletxtView() && - ((PlayerLiveTV*)player)->getTeletextDecoder()->getTeletxtView()->isInSubtitleMode() + if (!(static_cast(player))->isSubtitlesOn()) { + if (((PlayerVideoLive*)player)->getTeletextDecoder()->getTeletxtView() && + ((PlayerVideoLive*)player)->getTeletextDecoder()->getTeletxtView()->isInSubtitleMode() ) { - subtitleChannel=((PlayerLiveTV*)player)->getTeletextDecoder()->getPage(); + subtitleChannel=((PlayerVideoLive*)player)->getTeletextDecoder()->getPage(); subtitleType=0x11; } else { @@ -671,7 +671,7 @@ void VVideoLiveTV::doAudioSelector() } // Draw the selector - vas = new VAudioSelector(this, (*chanList)[currentChannelIndex], ((PlayerLiveTV*)player)->getCurrentAudioChannel(), + vas = new VAudioSelector(this, (*chanList)[currentChannelIndex], ((PlayerVideoLive*)player)->getCurrentAudioChannel(), subtitleType,subtitleChannel,NULL); vas->setBackgroundColour(DrawStyle::OSDBACKGROUND); @@ -758,7 +758,7 @@ void VVideoLiveTV::setNowNextData() void VVideoLiveTV::displayOSD(bool newNowNextData) { - PlayerLiveTV* playerlivetv = dynamic_cast(player); + PlayerVideoLive* playerlivetv = dynamic_cast(player); if (playerlivetv) playerlivetv->tellSubtitlesOSDVisible(true); osd.setVisible(true); if (newNowNextData) @@ -805,7 +805,7 @@ void VVideoLiveTV::clearScreen() draw(); boxstack->update(this); - PlayerLiveTV* playerlivetv = dynamic_cast(player); + PlayerVideoLive* playerlivetv = dynamic_cast(player); if (playerlivetv) playerlivetv->tellSubtitlesOSDVisible(false); } @@ -878,7 +878,7 @@ void VVideoLiveTV::timercall(int ref) else boxstack->update(this, osd.getRegion()); Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Timer Call 1 notkey 3."); - PlayerLiveTV* playerlivetv = dynamic_cast(player); + PlayerVideoLive* playerlivetv = dynamic_cast(player); if (playerlivetv) playerlivetv->tellSubtitlesOSDVisible(false); Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Timer Call 1 notkey end."); } @@ -901,7 +901,7 @@ bool VVideoLiveTV::channelChange(UCHAR changeType, UINT newData) UINT newChannel = 0; if (streamType == VDR::VIDEO) { - VTeletextView *vtxt=((PlayerLiveTV*)player)->getTeletextDecoder()->getTeletxtView(); + VTeletextView *vtxt=((PlayerVideoLive*)player)->getTeletextDecoder()->getTeletxtView(); if (vtxt) { BoxStack::getInstance()->remove(vtxt); @@ -1069,8 +1069,8 @@ void VVideoLiveTV::processMessage(Message* m) if (streamType == VDR::VIDEO) { player->setSubtitleChannel((m->parameter & 0xFFFF)); - (static_cast(player))->turnSubtitlesOn(true); - VTeletextView *vtxt=((PlayerLiveTV*)player)->getTeletextDecoder()->getTeletxtView(); + (static_cast(player))->turnSubtitlesOn(true); + VTeletextView *vtxt=((PlayerVideoLive*)player)->getTeletextDecoder()->getTeletxtView(); if (vtxt && vtxt->isInSubtitleMode()) { BoxStack::getInstance()->remove(vtxt); @@ -1080,8 +1080,8 @@ void VVideoLiveTV::processMessage(Message* m) case 0xFF: { //nosubtitles if (streamType == VDR::VIDEO){ - (static_cast(player))->turnSubtitlesOn(false); - VTeletextView *vtxt=((PlayerLiveTV*)player)->getTeletextDecoder()->getTeletxtView(); + (static_cast(player))->turnSubtitlesOn(false); + VTeletextView *vtxt=((PlayerVideoLive*)player)->getTeletextDecoder()->getTeletxtView(); if (vtxt && vtxt->isInSubtitleMode()) { BoxStack::getInstance()->remove(vtxt); } @@ -1090,9 +1090,9 @@ void VVideoLiveTV::processMessage(Message* m) break; case 0x11: { //videotext - (static_cast(player))->turnSubtitlesOn(false); + (static_cast(player))->turnSubtitlesOn(false); doTeletext(true); - ((PlayerLiveTV*)player)->getTeletextDecoder()->setPage((m->parameter & 0xFFFF)); + ((PlayerVideoLive*)player)->getTeletextDecoder()->setPage((m->parameter & 0xFFFF)); } break; }; @@ -1107,21 +1107,21 @@ void VVideoLiveTV::processMessage(Message* m) { switch (m->parameter) { - case PlayerLiveTV::CONNECTION_LOST: // connection lost detected + case PlayerVideoLive::CONNECTION_LOST: // connection lost detected { Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Received connection lost from player"); Command::getInstance()->connectionLost(); break; } - case PlayerLiveTV::STREAM_END: + case PlayerVideoLive::STREAM_END: { // Message comes from playerlivetv through master mutex, so can do anything here showUnavailable(); break; } - case PlayerLiveTV::ASPECT43: + case PlayerVideoLive::ASPECT43: { OsdVector* osdv=dynamic_cast(Osd::getInstance()); if (osdv) @@ -1140,7 +1140,7 @@ void VVideoLiveTV::processMessage(Message* m) break; } - case PlayerLiveTV::ASPECT169: + case PlayerVideoLive::ASPECT169: { sAspectRatio.nextSymbol = WSymbol::VIDEOASPECT169; sAspectRatio.setVisible(true); @@ -1160,7 +1160,7 @@ void VVideoLiveTV::processMessage(Message* m) break; } - case PlayerLiveTV::PREBUFFERING: + case PlayerVideoLive::PREBUFFERING: { preBuffering = m->tag; Log::getInstance()->log("VVideoRec", Log::DEBUG, "Prebuffering - %u", preBuffering); -- 2.39.5