From 2394ac3f104ae0c02edcb48c919839a823c7d8fb Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Mon, 15 Aug 2022 13:16:28 +0000 Subject: [PATCH] CWFs --- src/afeed.h | 1 - src/dvbsubtitles.cc | 6 +++--- src/dvbsubtitles.h | 2 +- src/event.h | 2 +- src/image.h | 2 +- src/imageloader.cc | 2 ++ src/inputudp.h | 1 - src/omx/omxeglrender.h | 4 ++-- src/omx/omximagedecode.h | 4 ++-- src/osdopenvg.cc | 4 ++-- src/osdvector.cc | 10 +++++----- src/recinfo.cc | 2 +- src/surfacevector.cc | 6 +++--- src/udp6.h | 2 ++ src/vaudioselector.cc | 8 ++++---- src/vaudioselector.h | 1 - src/vconnect.h | 2 +- src/vdpc.cc | 6 ++---- src/vdpc.h | 2 +- src/vdr.cc | 2 +- src/vdr.h | 2 +- src/vepg.cc | 2 +- src/vepgsettimer.cc | 2 +- src/videoomx.cc | 4 ++-- src/vradiorec.cc | 2 +- src/vradiorec.h | 1 - src/vtimeredit.cc | 6 +++--- src/vvideolivetv.cc | 6 +++--- src/wpictureview.cc | 2 +- 29 files changed, 47 insertions(+), 49 deletions(-) diff --git a/src/afeed.h b/src/afeed.h index d2ea550..f710c37 100644 --- a/src/afeed.h +++ b/src/afeed.h @@ -42,7 +42,6 @@ class AFeed bool stopThread{}; int audioEnabled; - bool callbacksend; Callback& cb; }; diff --git a/src/dvbsubtitles.cc b/src/dvbsubtitles.cc index 2887c49..61fe197 100644 --- a/src/dvbsubtitles.cc +++ b/src/dvbsubtitles.cc @@ -1015,9 +1015,9 @@ void DVBSubtitles::threadMethod() waitExpireWL = false; worklistTimeoutPointActive = false; -#ifndef DVBSDEBUG - u8 nowPTS = Video::getInstance()->getCurrentTimestamp(); -#endif +//#ifndef DVBSDEBUG +// u8 nowPTS = Video::getInstance()->getCurrentTimestamp(); +//#endif // Guaranteed to be at least one packet in the worklist PESPacket packet = worklist.front(); u8 pktPTS = worklist.front().getPTS(); diff --git a/src/dvbsubtitles.h b/src/dvbsubtitles.h index 717c1f2..96c3fcf 100644 --- a/src/dvbsubtitles.h +++ b/src/dvbsubtitles.h @@ -151,7 +151,7 @@ class DVBSubtitles bool signalStop{}; bool signalPause{}; - FILE* DBG; +// FILE* DBG; }; #endif diff --git a/src/event.h b/src/event.h index cbfd26c..f7867f0 100644 --- a/src/event.h +++ b/src/event.h @@ -24,7 +24,7 @@ #include "defines.h" -class MovieInfo; +struct MovieInfo; class SeriesInfo; class Event diff --git a/src/image.h b/src/image.h index ec9a834..b870d97 100644 --- a/src/image.h +++ b/src/image.h @@ -165,7 +165,7 @@ class CImageStatic : public CImage }; class SeriesInfo; -class MovieInfo; +struct MovieInfo; class CImageGeneric : public CImage { friend class ImageLoader; diff --git a/src/imageloader.cc b/src/imageloader.cc index 4389c1a..f0d29b3 100644 --- a/src/imageloader.cc +++ b/src/imageloader.cc @@ -325,6 +325,8 @@ void ImageLoader::ensureLoaded(Image& image) VDR::getInstance()->loadImageChannelLogo(icl); break; } + case CImage::INVALID: + {} } image->loading = true; diff --git a/src/inputudp.h b/src/inputudp.h index f115080..911f3c7 100644 --- a/src/inputudp.h +++ b/src/inputudp.h @@ -60,7 +60,6 @@ class InputUDP : public Input std::thread listenThread; std::mutex threadStartProtect; void listenLoop(); - bool listenLoopStop{}; #ifdef WIN32 // FIXME move these into UDP4? SOCKET quitPipe; diff --git a/src/omx/omxeglrender.h b/src/omx/omxeglrender.h index 9e106f9..963e08b 100644 --- a/src/omx/omxeglrender.h +++ b/src/omx/omxeglrender.h @@ -34,8 +34,8 @@ class OMX_EGL_Render : public OMX OMX_EGL_Render(); virtual ~OMX_EGL_Render(); - bool init(); - void shutdown(); + bool init() override; + void shutdown() override; void prepareInputPort(OMX_U32 frameWidth, OMX_U32 frameHeight, OMX_U32 stride); // throws void prepareOutputPort(EGLDisplay egldisplay); // throws diff --git a/src/omx/omximagedecode.h b/src/omx/omximagedecode.h index 34e5c7d..820ee32 100644 --- a/src/omx/omximagedecode.h +++ b/src/omx/omximagedecode.h @@ -30,8 +30,8 @@ class OMX_Image_Decode : public OMX OMX_Image_Decode(); virtual ~OMX_Image_Decode(); - bool init(); - void shutdown(); + bool init() override; + void shutdown() override; void prepareInputBuffers(int dataSize); // throws void setFormat(); // throws diff --git a/src/osdopenvg.cc b/src/osdopenvg.cc index 7edafce..f9902fa 100644 --- a/src/osdopenvg.cc +++ b/src/osdopenvg.cc @@ -436,7 +436,7 @@ void OsdOpenVG::processMessage(Message* m) // It will be deleted properly on the next garbage collection run // OSDOVG-ROD-EXPERIMENT - logger->trace(TAG, "EXPERIMENT - call doRender"); + logger->debug(TAG, "EXPERIMENT - call doRender"); doRender(); } } @@ -528,7 +528,7 @@ void OsdOpenVG::renderLoop() #if DEV dumpStyles(); #endif - LogNT::getInstance()->trace(TAG, "EXPERIMENT - render"); + LogNT::getInstance()->debug(TAG, "EXPERIMENT - render"); InternalRendering(); lastrendertime = getTimeMS(); diff --git a/src/osdvector.cc b/src/osdvector.cc index ab8a138..c3e26b5 100644 --- a/src/osdvector.cc +++ b/src/osdvector.cc @@ -280,8 +280,8 @@ void OsdVector::updateOrAddSurface(const SurfaceVector* surf, float x, float y, SurfacesIterator si; #if DEV - logger->trace(TAG, "updateOrAddSurface, surfaces.length {}", surfaces.size()); - dumpStyles(); + //logger->trace(TAG, "updateOrAddSurface, surfaces.length {}", surfaces.size()); + //dumpStyles(); #endif // First determine it is already in our system @@ -326,12 +326,12 @@ void OsdVector::updateOrAddSurface(const SurfaceVector* surf, float x, float y, cleanupOrphanedRefs(); #if DEV - logger->trace(TAG, "After UOAS:"); - dumpStyles(); +// logger->trace(TAG, "After UOAS:"); +// dumpStyles(); #endif // OSDOVG-ROD-EXPERIMENT - logger->trace(TAG, "EXPERIMENT - call doRender"); + logger->debug(TAG, "EXPERIMENT - call doRender"); doRender(); } diff --git a/src/recinfo.cc b/src/recinfo.cc index 6e39568..99dc93c 100644 --- a/src/recinfo.cc +++ b/src/recinfo.cc @@ -192,7 +192,7 @@ char* RecInfo::buildSummaryWithDetails(bool forceRefresh) } summaryWithDetails = new char[swdLength]; - SNPRINTF(summaryWithDetails, swdLength, "%s\n\n%s%s\n%s%01i:%02i\n%s%s\n%s%lu MB", summary, + SNPRINTF(summaryWithDetails, swdLength, "%s\n\n%s%s\n%s%01i:%02i\n%s%s\n%s%u MB", summary, tr("Channel: "), channelName, tr("Duration: "), hours, mins, tr("Resume at: "), resumePointText, diff --git a/src/surfacevector.cc b/src/surfacevector.cc index dfdd1c6..a02dd18 100644 --- a/src/surfacevector.cc +++ b/src/surfacevector.cc @@ -268,12 +268,12 @@ void SurfaceVector::drawImage(Image& image, float x, float y, float width, floa if (image->isReady()) { - logger->trace(TAG, "drawImage: READY, Add instr PaintImage for {}", static_cast(image.get())); + logger->debug(TAG, "drawImage: READY, Add instr PaintImage for {}", static_cast(image.get())); commands.push_back(SVGCommand::PaintImage(x, y, width, height, image, corner)); } else { - logger->trace(TAG, "drawImage: NOT_READY, Add instr PaintImageLoading {} LI {}", static_cast(image.get()), reinterpret_cast(image.get())); + logger->debug(TAG, "drawImage: NOT_READY, Add instr PaintImageLoading {} LI {}", static_cast(image.get()), reinterpret_cast(image.get())); commands.push_back(SVGCommand::PaintImageLoading(image, x, y, width, height, corner)); } @@ -448,7 +448,7 @@ int SurfaceVector::removeCommands(float x, float y, float width, float height) } -int SurfaceVector::updateToScreen(int sx, int sy, int w, int h, int dx, int dy) +int SurfaceVector::updateToScreen(int sx, int sy, int /*w*/, int /*h*/, int dx, int dy) { // ok this method really works in a pixel oriented way command_mutex.lock(); diff --git a/src/udp6.h b/src/udp6.h index 5cb8e19..dfe35d6 100644 --- a/src/udp6.h +++ b/src/udp6.h @@ -50,7 +50,9 @@ class UDP6 private: bool initted{}; u4 getIPNumber(u4 num); +#ifdef WIN32 u4 iterate_ip{}; +#endif int socketnum; // Socket descriptor u2 myPort{}; // My port number struct sockaddr_in6 myAddr; // My address diff --git a/src/vaudioselector.cc b/src/vaudioselector.cc index f87342d..6c1edfe 100644 --- a/src/vaudioselector.cc +++ b/src/vaudioselector.cc @@ -38,7 +38,7 @@ VAudioSelector::VAudioSelector(MessageReceiver* tparent, bool* availableMpegAudioChannels, bool* availableAc3AudioChannels, int currentAudioChannel, bool* availableSubtitleChannels, int* ttxtpages, int currentSubtitleChannel, int currentSubtitleType, RecInfo* recInfo) -: parent(tparent), liveMode(false) +: parent(tparent) { LogNT::getInstance()->debug("VAudioSelector", "{}", currentAudioChannel); @@ -66,7 +66,7 @@ VAudioSelector::VAudioSelector(MessageReceiver* tparent, bool* availableMpegAudi sc.pestype = ttxtpages[i]; std::ostringstream oss; oss << tr("TTxt:") << " " << std::hex << std::setw(3) << ttxtpages[i]; - sc.name = std::move(oss.str()); + sc.name = oss.str(); scl.push_back(std::move(sc)); } } @@ -270,7 +270,7 @@ VAudioSelector::VAudioSelector(MessageReceiver* tparent, bool* availableMpegAudi } VAudioSelector::VAudioSelector(MessageReceiver* tparent, Channel* channel, int currentAudioChannel, int currentSubtitletype, int currentSubtitleChannel, int* ttxtpages) -: parent(tparent), liveMode(true) +: parent(tparent) { u4 i; @@ -294,7 +294,7 @@ VAudioSelector::VAudioSelector(MessageReceiver* tparent, Channel* channel, int c sc.pestype = ttxtpages[i]; std::ostringstream oss; oss << tr("TTxt:") << " " << std::hex << std::setw(3) << ttxtpages[i]; - sc.name = std::move(oss.str()); + sc.name = oss.str(); scl.push_back(std::move(sc)); } } diff --git a/src/vaudioselector.h b/src/vaudioselector.h index 4c9e8c1..e29b37d 100644 --- a/src/vaudioselector.h +++ b/src/vaudioselector.h @@ -72,7 +72,6 @@ class VAudioSelector : public TBBoxx, public MessageReceiver WSelectList ssl; MessageReceiver* parent; - bool liveMode; bool subtitles{}; bool editsubtitles{}; diff --git a/src/vconnect.h b/src/vconnect.h index 39cc41e..1aff863 100644 --- a/src/vconnect.h +++ b/src/vconnect.h @@ -30,7 +30,7 @@ class LogNT; class BoxStack; -class VDRServer; +struct VDRServer; class VConnect : public VInfo { diff --git a/src/vdpc.cc b/src/vdpc.cc index 725da43..2ecfb45 100644 --- a/src/vdpc.cc +++ b/src/vdpc.cc @@ -34,6 +34,8 @@ static const char* TAG = "VDPC"; +LogNT* VDPC::logger{}; + bool VDPC::init() { logger = LogNT::getInstance(); @@ -233,8 +235,6 @@ void VDPC::VDPC4::stop() void VDPC::VDPC4::threadMethod() { - LogNT* logger = LogNT::getInstance(); - #ifdef WIN32 quitPipe = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); if (quitPipe == INVALID_SOCKET) @@ -348,8 +348,6 @@ void VDPC::VDPC6::stop() void VDPC::VDPC6::threadMethod() { - LogNT* logger = LogNT::getInstance(); - if (pipe2(pfdsUDP6, O_NONBLOCK) == -1) { logger->error("VDPC6", "pipe2 error B"); diff --git a/src/vdpc.h b/src/vdpc.h index ca243ab..5ae25d9 100644 --- a/src/vdpc.h +++ b/src/vdpc.h @@ -90,7 +90,7 @@ class LogNT; class VDPC { private: - LogNT* logger{}; + static LogNT* logger; // has to be static for inner classes to use it typedef std::function AddServerCallback; // Nested classes diff --git a/src/vdr.cc b/src/vdr.cc index 12eae8d..05a651b 100644 --- a/src/vdr.cc +++ b/src/vdr.cc @@ -244,7 +244,7 @@ void VDR::disconnect() logger->debug(TAG, "Disconnect"); } -void VDR::setReceiveWindow(size_t size) +void VDR::setReceiveWindow(size_t /*size*/) { //if (connected && size) tcpold->setReceiveWindow(size); } diff --git a/src/vdr.h b/src/vdr.h index 7b6469c..7f9b104 100644 --- a/src/vdr.h +++ b/src/vdr.h @@ -54,7 +54,7 @@ class VDR_ResponsePacket; #ifdef VOMP_MEDIAPLAYER class SerializeBuffer; #endif -class MovieInfo; +struct MovieInfo; class SeriesInfo; typedef std::vector EventList; diff --git a/src/vepg.cc b/src/vepg.cc index 11f3900..a5646c9 100644 --- a/src/vepg.cc +++ b/src/vepg.cc @@ -748,7 +748,7 @@ void VEpg::paintCell(Event* event, int yOffset, const DrawStyle& bg, const DrawS tT[textPos ] = '\0'; surface->drawText(tT, x+2, y, fg); } - delete tT; + delete[] tT; } diff --git a/src/vepgsettimer.cc b/src/vepgsettimer.cc index 0d2e6d9..c3a3d47 100644 --- a/src/vepgsettimer.cc +++ b/src/vepgsettimer.cc @@ -151,7 +151,7 @@ char* VEpgSetTimer::genTimerString() strcpy(eventTitle, event->title.c_str()); for(u4 i=0; i < strlen(eventTitle); i++) if (eventTitle[i] == ':') eventTitle[i] = '|'; - SNPRINTF(timerString, 1023, "%i:%lu:%s:%s:%s:%s:%s:%s:", + SNPRINTF(timerString, 1023, "%i:%u:%s:%s:%s:%s:%s:%s:", flags, channel->number, dateString, startString, endString, priority, lifetime, eventTitle); diff --git a/src/videoomx.cc b/src/videoomx.cc index 8e1b417..437fc24 100644 --- a/src/videoomx.cc +++ b/src/videoomx.cc @@ -209,7 +209,7 @@ void VideoOMX::AddOmxEvent(VPE_OMX_EVENT new_event) signalOmx(); } -OMX_ERRORTYPE VideoOMX::EmptyBufferDone_OMX(OMX_IN OMX_HANDLETYPE hcomp,OMX_IN OMX_PTR appdata,OMX_IN OMX_BUFFERHEADERTYPE* buffer){ +OMX_ERRORTYPE VideoOMX::EmptyBufferDone_OMX(OMX_IN OMX_HANDLETYPE /*hcomp*/, OMX_IN OMX_PTR /*appdata*/, OMX_IN OMX_BUFFERHEADERTYPE* buffer){ // LogNT::getInstance()->info(TAG, "EmptyBufferDone"); VideoOMX* video = static_cast(Video::getInstance()); @@ -231,7 +231,7 @@ void VideoOMX::ReturnEmptyOMXBuffer(OMX_BUFFERHEADERTYPE* buffer){ signalOmx(); } - OMX_ERRORTYPE VideoOMX::FillBufferDone_OMX(OMX_IN OMX_HANDLETYPE hcomp, OMX_IN OMX_PTR appdata,OMX_IN OMX_BUFFERHEADERTYPE* buffer) { + OMX_ERRORTYPE VideoOMX::FillBufferDone_OMX(OMX_IN OMX_HANDLETYPE /*hcomp*/, OMX_IN OMX_PTR /*appdata*/, OMX_IN OMX_BUFFERHEADERTYPE* /*buffer*/) { //LogNT::getInstance()->info(TAG, "FillBufferDone"); return OMX_ErrorNone; } diff --git a/src/vradiorec.cc b/src/vradiorec.cc index 33762e9..37bcb62 100644 --- a/src/vradiorec.cc +++ b/src/vradiorec.cc @@ -468,7 +468,7 @@ void VRadioRec::drawBarClocks() u4 lengthMinutes = dlengthSeconds / 60; dlengthSeconds %= 60; - SNPRINTF(buffer, 99, "%01lu:%02lu:%02lu / %01lu:%02lu:%02lu", currentHours, currentMinutes, dcurrentSeconds, lengthHours, lengthMinutes, dlengthSeconds); + SNPRINTF(buffer, 99, "%01u:%02u:%02u / %01u:%02u:%02u", currentHours, currentMinutes, dcurrentSeconds, lengthHours, lengthMinutes, dlengthSeconds); LogNT::getInstance()->debug(TAG, buffer); } else diff --git a/src/vradiorec.h b/src/vradiorec.h index be97686..11e0073 100644 --- a/src/vradiorec.h +++ b/src/vradiorec.h @@ -58,7 +58,6 @@ class VRadioRec : public Boxx, public MessageReceiver, public TimerReceiver bool playing; bool barShowing; - bool stickyBar; void doBar(int action); void drawBarClocks(); diff --git a/src/vtimeredit.cc b/src/vtimeredit.cc index c075133..7918458 100644 --- a/src/vtimeredit.cc +++ b/src/vtimeredit.cc @@ -105,7 +105,7 @@ void VTimerEdit::draw() drawText(buffer, xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight; // Channel - SNPRINTF(buffer, 999, "%lu", recTimer->channelNumber); + SNPRINTF(buffer, 999, "%u", recTimer->channelNumber); drawText(buffer, xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight; // Name @@ -131,11 +131,11 @@ void VTimerEdit::draw() drawText(buffer, xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight; // Priority - SNPRINTF(buffer, 999, "%lu", recTimer->priority); + SNPRINTF(buffer, 999, "%u", recTimer->priority); drawText(buffer, xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight; // Lifetime - SNPRINTF(buffer, 999, "%lu", recTimer->lifeTime); + SNPRINTF(buffer, 999, "%u", recTimer->lifeTime); drawText(buffer, xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight; ypos += fontheight; diff --git a/src/vvideolivetv.cc b/src/vvideolivetv.cc index d96c74e..1ee6aa3 100644 --- a/src/vvideolivetv.cc +++ b/src/vvideolivetv.cc @@ -618,7 +618,7 @@ void VVideoLiveTV::doTeletext(bool subtitlemode) keying = 0; // and reset the display - this is a copy from setNowNextData char formatChanNum[20]; - SNPRINTF(formatChanNum, 19, "%0*lu", numberWidth, (*chanList)[osdChannelIndex]->number); + SNPRINTF(formatChanNum, 19, "%0*u", numberWidth, (*chanList)[osdChannelIndex]->number); osdChanNum.setText(formatChanNum); osdChanName.setText((*chanList)[osdChannelIndex]->name); } @@ -661,7 +661,7 @@ void VVideoLiveTV::doAudioSelector() keying = 0; // and reset the display - this is a copy from setNowNextData char formatChanNum[20]; - SNPRINTF(formatChanNum, 19, "%0*lu", numberWidth, (*chanList)[osdChannelIndex]->number); + SNPRINTF(formatChanNum, 19, "%0*u", numberWidth, (*chanList)[osdChannelIndex]->number); osdChanNum.setText(formatChanNum); osdChanName.setText((*chanList)[osdChannelIndex]->name); } @@ -728,7 +728,7 @@ void VVideoLiveTV::setNowNextData() Channel* currentChannel = (*chanList)[osdChannelIndex]; char formatChanNum[20]; - SNPRINTF(formatChanNum, 19, "%0*lu", numberWidth, currentChannel->number); + SNPRINTF(formatChanNum, 19, "%0*u", numberWidth, currentChannel->number); osdChanNum.setText(formatChanNum); osdChanName.setText(currentChannel->name); diff --git a/src/wpictureview.cc b/src/wpictureview.cc index 93625c7..423c587 100644 --- a/src/wpictureview.cc +++ b/src/wpictureview.cc @@ -186,7 +186,7 @@ int WPictureView::handleCommand(int command) } -bool WPictureView::mouseAndroidScroll(int x, int y, int sx, int sy) +bool WPictureView::mouseAndroidScroll(int x, int y, int /* sx */, int sy) { if ((x - getRootBoxOffsetX()) >= 0 && (y - getRootBoxOffsetY()) >= 0 && (x - getRootBoxOffsetX()) <= (int)area.w && (y - getRootBoxOffsetY()) <= (int)area.h) -- 2.39.5