From 4712b9cbfa019fe8092541bddc2c36e2afaf192a Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Wed, 18 Mar 2020 18:37:07 +0000 Subject: [PATCH] 7 CWFs --- dvbsubtitles.cc | 6 ++++-- option.cc | 2 +- option.h | 2 +- playerradiolive.cc | 5 +++-- seriesinfo.h | 2 +- vdrrequestpacket.cc | 2 +- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/dvbsubtitles.cc b/dvbsubtitles.cc index 3d2ff97..e7dd28a 100644 --- a/dvbsubtitles.cc +++ b/dvbsubtitles.cc @@ -694,7 +694,9 @@ bool DVBSubtitles::decodePacket(const PESPacket& packet) object.decodeSubBlock(segmentData + 7, topFieldLen, false); } else if (codingMethod == 0x01) // Coded as a string of characters + { ; // TODO + } break; } case 0x14: {// Display definition @@ -998,9 +1000,9 @@ void DVBSubtitles::threadMethod() waitExpireWL = false; worklistTimeoutPointActive = false; - +#ifndef DVBSDEBUG ULLONG nowPTS = Video::getInstance()->getCurrentTimestamp(); - +#endif // Guaranteed to be at least one packet in the worklist PESPacket packet = worklist.front(); ULLONG pktPTS = worklist.front().getPTS(); diff --git a/option.cc b/option.cc index c00b86a..a44a361 100644 --- a/option.cc +++ b/option.cc @@ -21,7 +21,7 @@ #include "option.h" #include "vdr.h" -Option::Option(UINT ID, const char* DISPLAYTEXT, const char* CONFIGSECTION, const char* CONFIGKEY, UINT OPTIONTYPE, +Option::Option(UINT ID, const char* DISPLAYTEXT, const char* CONFIGSECTION, const char* CONFIGKEY, UCHAR OPTIONTYPE, UINT NUMCHOICES, UINT DEFAULTCHOICE, UINT STARTINT, const char * const * OPTIONS, const char * const * OPTIONKEYS, bool DELETESTRINGS, AbstractOption* handler) : id(ID), displayText(DISPLAYTEXT), configSection(CONFIGSECTION), configKey(CONFIGKEY), optionType(OPTIONTYPE), diff --git a/option.h b/option.h index 130f3be..fa420bb 100644 --- a/option.h +++ b/option.h @@ -33,7 +33,7 @@ typedef std::vector Options; class Option { public: - Option(UINT id, const char* displayText, const char* configSection, const char* configKey, UINT optionType, + Option(UINT id, const char* displayText, const char* configSection, const char* configKey, UCHAR optionType, UINT numChoices, UINT defaultChoice, UINT startInt, const char * const * options, const char * const * optionkeys = NULL, bool deletestrings = false, AbstractOption* handler = NULL); ~Option(); diff --git a/playerradiolive.cc b/playerradiolive.cc index 8caaa2e..8add617 100644 --- a/playerradiolive.cc +++ b/playerradiolive.cc @@ -209,7 +209,7 @@ void PlayerRadioLive::chunkToDemuxer() StreamChunk s = streamChunks.front(); streamChunks.pop(); //logger->log("PlayerRadioLive", Log::DEBUG, "About to call demuxer with %p %lu", s.data, s.len); - /*int a =*/ demuxer->put((UCHAR*)s.data, s.len); + /*int a =*/ demuxer->put(static_cast(s.data), s.len); //logger->log("PlayerRadioLive", Log::DEBUG, "put %i to demuxer", a); free(s.data); } @@ -474,7 +474,8 @@ void PlayerRadioLive::threadMethod() if (state == S_PREBUFFERING) { ++preBufferCount; - ULONG percentDone = (ULONG)(preBufferCount / (float)preBufferAmount * 100); + ULONG percentDone = (preBufferCount * 100) / preBufferAmount; + logger->log("PlayerRadioLive", Log::DEBUG, "Prebuffering %lu%%", percentDone); Message* m = new Message(); diff --git a/seriesinfo.h b/seriesinfo.h index adea749..ab68a1b 100644 --- a/seriesinfo.h +++ b/seriesinfo.h @@ -36,7 +36,7 @@ public: std::string firstAired; std::string guestStars; std::string overview; - float rating ; + double rating; TVMedia image; diff --git a/vdrrequestpacket.cc b/vdrrequestpacket.cc index 5b98ada..b7e7ed7 100644 --- a/vdrrequestpacket.cc +++ b/vdrrequestpacket.cc @@ -63,7 +63,7 @@ bool VDR_RequestPacket::init(ULONG topcode, bool setUserDataLength, ULONG userDa userDataLength = 0; // so the below will write a zero } - buffer = (UCHAR*)malloc(bufSize); + buffer = static_cast(malloc(bufSize)); if (!buffer) return false; channel = VDR::CHANNEL_REQUEST_RESPONSE; -- 2.39.5