From baeacad6d54e285aa6f4678e2dbf3da32f25d359 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sat, 25 Nov 2006 00:56:17 +0000 Subject: [PATCH] Radio navigation --- playerradio.cc | 2 +- playerradio.h | 10 +++++----- vrecordinglist.cc | 22 +++++++++++----------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/playerradio.cc b/playerradio.cc index f3e4b83..dcf18ea 100644 --- a/playerradio.cc +++ b/playerradio.cc @@ -65,7 +65,7 @@ int PlayerRadio::init(ULLONG tlengthBytes, ULONG tlengthPackets) demuxer = new DemuxerVDR(); if (!demuxer) return 0; - if (!demuxer->init(this, audio, NULL, 10, 40000)) + if (!demuxer->init(this, audio, NULL, 0, 40000)) { logger->log("PlayerRadio", Log::ERR, "Demuxer failed to init"); shutdown(); diff --git a/playerradio.h b/playerradio.h index 26f204d..67e5e4c 100644 --- a/playerradio.h +++ b/playerradio.h @@ -49,7 +49,7 @@ class PlayerRadio : public Thread_TYPE, public Callback PlayerRadio(MessageQueue* messageQueue, void* messageReceiver, bool isRecording); virtual ~PlayerRadio(); - int init(ULLONG lengthBytes, ULONG lengthFrames); + int init(ULLONG lengthBytes, ULONG lengthPackets); int shutdown(); void setStartBytes(ULLONG startBytes); @@ -82,14 +82,14 @@ class PlayerRadio : public Thread_TYPE, public Callback void threadPostStopCleanup(); private: - void switchState(UCHAR newState, ULONG jumpFrame=0); + void switchState(UCHAR newState, ULONG jumpPacket=0); void threadFeedLive(); void threadFeedPlay(); void threadFeedScan(); void doConnectionLost(); - void restartAtFrame(ULONG newFrame); + void restartAtPacket(ULONG newPacket); MessageQueue* messageQueue; void* messageReceiver; @@ -117,8 +117,8 @@ class PlayerRadio : public Thread_TYPE, public Callback ULLONG lengthBytes; ULLONG streamPos; - ULONG lengthFrames; - ULONG currentFrameNumber; + ULONG lengthPackets; + ULONG currentPacketNumber; UINT blockSize; UINT startupBlockSize; UINT preBufferSize; diff --git a/vrecordinglist.cc b/vrecordinglist.cc index 5be3e47..8aa39f7 100644 --- a/vrecordinglist.cc +++ b/vrecordinglist.cc @@ -297,22 +297,22 @@ int VRecordingList::doPlay(bool resume) if (toPlay) { toPlay->loadRecInfo(); -// if (toPlay->recInfo->hasVideo()) -// { + if (toPlay->recInfo->hasNoVideo()) + { + VRadioRec* radrec = new VRadioRec(toPlay); + radrec->draw(); + viewman->add(radrec); + viewman->updateView(radrec); + radrec->go(); + } + else + { VVideoRec* vidrec = new VVideoRec(toPlay); vidrec->draw(); viewman->add(vidrec); viewman->updateView(vidrec); vidrec->go(resume); -// } -// else -// { -// VRadioRec* radrec = new VRadioRec(toPlay); -// radrec->draw(); -// viewman->add(radrec); -// viewman->updateView(radrec); -// radrec->go(); -// } + } return 1; } // should not get to here -- 2.39.5