From f5f9c91f4c5b9fcabdb70eafe059aff834ac734c Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sun, 14 Aug 2022 17:03:13 +0000 Subject: [PATCH] Type change: UINT -> u4 --- src/audioomx.cc | 16 ++-- src/audioomx.h | 8 +- src/audioplayer.cc | 10 +-- src/audiowin.cc | 18 ++-- src/audiowin.h | 6 +- src/bitmap.cc | 10 +-- src/bitmap.h | 26 +++--- src/boxx.cc | 22 ++--- src/boxx.h | 20 ++--- src/control.cc | 2 +- src/defines.h | 12 ++- src/demuxer.cc | 156 +++++++++++++++++----------------- src/demuxer.h | 26 +++--- src/demuxeraudio.cc | 8 +- src/demuxeraudio.h | 12 +-- src/demuxermedia.cc | 2 +- src/demuxerts.cc | 20 ++--- src/demuxerts.h | 6 +- src/demuxervdr.cc | 22 ++--- src/demuxervdr.h | 2 +- src/directory.cc | 12 +-- src/draintarget.h | 4 +- src/dsallocator.cc | 6 +- src/dssourcefilter.h | 4 +- src/dvbsubtitles.cc | 86 +++++++++---------- src/dvbsubtitles.h | 18 ++-- src/event.cc | 2 +- src/event.h | 2 +- src/imageomx.cc | 2 +- src/imagereader.cc | 2 +- src/imagereader.h | 4 +- src/inputlirc.cc | 2 +- src/inputudp.cc | 4 +- src/inputudp.h | 2 +- src/inputwin.cc | 8 +- src/inputwin.h | 8 +- src/media.cc | 2 +- src/mediaoptions.cc | 6 +- src/mediaoptions.h | 2 +- src/option.cc | 8 +- src/option.h | 14 +-- src/osdopenvg.cc | 6 +- src/osdopenvg.h | 2 +- src/osdreceiver.h | 4 +- src/osdwinvector.cc | 26 +++--- src/playermedia.cc | 4 +- src/playerradiorec.cc | 14 +-- src/playerradiorec.h | 8 +- src/playervideorec.cc | 20 ++--- src/playervideorec.h | 4 +- src/recinfo.h | 8 +- src/recording.cc | 4 +- src/region.cc | 4 +- src/region.h | 14 +-- src/sleeptimer.h | 2 +- src/stream.cc | 4 +- src/stream.h | 4 +- src/surface.h | 2 +- src/surfacedirectfb.cc | 18 ++-- src/surfacedirectfb.h | 2 +- src/surfaceopengl.cc | 6 +- src/surfaceopengl.h | 4 +- src/surfacevector.cc | 6 +- src/surfacevector.h | 2 +- src/surfacewin.cc | 6 +- src/surfacewin.h | 4 +- src/tcp.cc | 2 +- src/teletextdecodervbiebu.cc | 4 +- src/teletextdecodervbiebu.h | 4 +- src/udp4.cc | 4 +- src/udp4.h | 2 +- src/udp6.cc | 6 +- src/udp6.h | 2 +- src/util.cc | 2 +- src/util.h | 2 +- src/vaudioselector.cc | 8 +- src/vchannellist.cc | 4 +- src/vdr.cc | 4 +- src/vdr.h | 6 +- src/vepg.cc | 42 ++++----- src/vepg.h | 12 +-- src/vepglistadvanced.cc | 22 ++--- src/vepgsettimer.cc | 2 +- src/vepgsummary.cc | 2 +- src/video.cc | 2 +- src/video.h | 18 ++-- src/videoomx.cc | 22 ++--- src/videoomx.h | 14 +-- src/videowin.cc | 22 ++--- src/videowin.h | 10 +-- src/vmedialist.cc | 4 +- src/vmediaview.cc | 12 +-- src/vmediaview.h | 4 +- src/vopts.cc | 16 ++-- src/vradiorec.cc | 6 +- src/vradiorec.h | 4 +- src/vrecordinglistadvanced.cc | 2 +- src/vserverselect.cc | 2 +- src/vtimeredit.h | 2 +- src/vtimerlist.cc | 6 +- src/vvideolivetv.cc | 30 +++---- src/vvideolivetv.h | 16 ++-- src/vvideomedia.cc | 18 ++-- src/vvideomedia.h | 2 +- src/vvideorec.cc | 16 ++-- src/vvideorec.h | 8 +- src/windowsosd.cc | 2 +- src/windowsosd.h | 2 +- src/winmain.cc | 8 +- src/wjpegcomplex.cc | 32 +++---- src/wjpegcomplex.h | 26 +++--- src/woptionbox.cc | 8 +- src/woptionbox.h | 6 +- src/woptionpane.cc | 2 +- src/wpictureview.cc | 2 +- src/wprogressbar.cc | 2 +- src/wprogressbar.h | 4 +- src/wremoteconfig.cc | 4 +- src/wremoteconfig.h | 2 +- src/wselectlist.cc | 12 +-- src/wselectlist.h | 2 +- src/wtabbar.cc | 24 +++--- src/wtabbar.h | 4 +- src/wwinaudiofilter.cc | 2 +- src/wwinaudiofilter.h | 2 +- src/wwinmp3audiofilter.cc | 2 +- src/wwinmp3audiofilter.h | 2 +- src/wwinvideofilter.cc | 2 +- src/wwinvideofilter.h | 2 +- src/wwinvideoh264filter.cc | 2 +- src/wwinvideoh264filter.h | 2 +- 131 files changed, 651 insertions(+), 653 deletions(-) diff --git a/src/audioomx.cc b/src/audioomx.cc index 1b415dc..6ea9803 100644 --- a/src/audioomx.cc +++ b/src/audioomx.cc @@ -393,8 +393,8 @@ bool AudioOMX::saveOptionstoServer() return true; } -/*Option(UINT id, const char* displayText, const char* configSection, const char* configKey, UINT optionType, - UINT numChoices, UINT defaultChoice, UINT startInt, +/*Option(u4 id, const char* displayText, const char* configSection, const char* configKey, u4 optionType, + u4 numChoices, u4 defaultChoice, u4 startInt, const char * const * options, const char * const * optionkeys = NULL, AbstractOption* handler=NULL);*/ bool AudioOMX::addOptionsToPanes(int panenumber,Options *options,WOptionPane* pane) @@ -1248,7 +1248,7 @@ int AudioOMX::DestroyInputBufsOMX() //call with clock mutex locked cur_input_buf_omx=NULL; input_bufs_omx_mutex.lock(); - for (UINT i=0; i< input_bufs_omx_all.size();i++) { + for (u4 i=0; i< input_bufs_omx_all.size();i++) { error=OMX_FreeBuffer(omx_aud_rend/*dec*/,omx_rend_input_port/*codec*/,input_bufs_omx_all[i]); if (error!=OMX_ErrorNone){ LogNT::getInstance()->debug(TAG, "Use OMX_FreeBuffer failed {:#x}", error); @@ -1732,12 +1732,12 @@ unsigned int AudioOMX::AdvanceAacLatmAudioSync(const UCHAR *data,unsigned int si } -void AudioOMX::PrepareMediaSample(const MediaPacketList& mplist, UINT /* samplepos */) +void AudioOMX::PrepareMediaSample(const MediaPacketList& mplist, u4 /* samplepos */) { packet = mplist.front(); } -UINT AudioOMX::DeliverMediaSample(UCHAR* buffer, UINT* samplepos) { +u4 AudioOMX::DeliverMediaSample(UCHAR* buffer, u4* samplepos) { DeliverMediaPacket(packet, buffer, samplepos); if (*samplepos == packet.length) { *samplepos = 0; @@ -1792,8 +1792,8 @@ bool AudioOMX::DrainTargetBufferFull() } -UINT AudioOMX::DeliverMediaPacket(MediaPacket mpacket, const UCHAR* buffer, - UINT *samplepos) { +u4 AudioOMX::DeliverMediaPacket(MediaPacket mpacket, const UCHAR* buffer, + u4 *samplepos) { /*First Check, if we have an audio sample*/ VideoOMX* vw = static_cast(Video::getInstance()); bool achange=false; @@ -1822,7 +1822,7 @@ UINT AudioOMX::DeliverMediaPacket(MediaPacket mpacket, const UCHAR* buffer, //LogNT::getInstance()->debug(TAG, "DMP mark 2"); - UINT headerstrip = 0; + u4 headerstrip = 0; if (mpacket.disconti) { firstsynched = false; decompress_buffer_filled=0; diff --git a/src/audioomx.h b/src/audioomx.h index edc4df5..27e9650 100644 --- a/src/audioomx.h +++ b/src/audioomx.h @@ -75,9 +75,9 @@ class AudioOMX : public Audio //Writing Data to Audiodevice - virtual void PrepareMediaSample(const MediaPacketList&, UINT samplepos); - virtual UINT DeliverMediaSample(UCHAR* buffer, UINT *samplepos); - UINT DeliverMediaPacket(MediaPacket packet, const UCHAR* buffer,UINT *samplepos); + virtual void PrepareMediaSample(const MediaPacketList&, u4 samplepos); + virtual u4 DeliverMediaSample(UCHAR* buffer, u4 *samplepos); + u4 DeliverMediaPacket(MediaPacket packet, const UCHAR* buffer,u4 *samplepos); virtual long long SetStartOffset(long long curreftime, bool *rsync); virtual void ResetTimeOffsets(); @@ -105,7 +105,7 @@ class AudioOMX : public Audio bool firstsynched; MediaPacket packet; - UINT packetpos; + u4 packetpos; bool hdmi; // use hdmi as audio output diff --git a/src/audioplayer.cc b/src/audioplayer.cc index dab329d..4c42116 100644 --- a/src/audioplayer.cc +++ b/src/audioplayer.cc @@ -253,7 +253,7 @@ int AudioPlayer::skipForward(int seconds) { if (! canPosition) return 1; threadLock(); u4 curr=demuxer->getSecondsFromLen(streampos); - u4 dest=demuxer->positionFromSeconds(curr+(UINT)seconds); + u4 dest=demuxer->positionFromSeconds(curr+(u4)seconds); if (dest != 0) { logger->log("AudioPlayer",Log::DEBUG,"new pos %ld skip %ds",dest,seconds); requestedStreampos=dest; @@ -267,8 +267,8 @@ int AudioPlayer::skipBackward(int seconds) { if (! canPosition) return 1; threadLock(); u4 curr=demuxer->getSecondsFromLen(streampos); - if (curr > (UINT)seconds) { - u4 dest=demuxer->positionFromSeconds(curr-(UINT)seconds); + if (curr > (u4)seconds) { + u4 dest=demuxer->positionFromSeconds(curr-(u4)seconds); if (dest != 0) { logger->log("AudioPlayer",Log::DEBUG,"new pos %ld skip %ds",dest,seconds); requestedStreampos=dest; @@ -595,8 +595,8 @@ void AudioPlayer::threadMethod() MediaPacketList pl; pl.push_back(p); audio->PrepareMediaSample(pl,0); - UINT bytesWritten=0; - UINT rt=audio->DeliverMediaSample(threadBuffer,&bytesWritten); + u4 bytesWritten=0; + u4 rt=audio->DeliverMediaSample(threadBuffer,&bytesWritten); u4 written=thisRead; if (rt == 0) written=bytesWritten; diff --git a/src/audiowin.cc b/src/audiowin.cc index 7a074aa..247a7e8 100644 --- a/src/audiowin.cc +++ b/src/audiowin.cc @@ -169,7 +169,7 @@ int AudioWin::unMute() return 1; } -void AudioWin::PrepareMediaSample(const MediaPacketList& mplist,UINT samplepos) +void AudioWin::PrepareMediaSample(const MediaPacketList& mplist,u4 samplepos) { mediapacket = mplist.front(); } @@ -353,7 +353,7 @@ bool AudioWin::saveOptionstoServer() return true; } -UINT AudioWin::DeliverMediaSample(UCHAR* buffer, UINT *samplepos) +u4 AudioWin::DeliverMediaSample(UCHAR* buffer, u4 *samplepos) { DeliverMediaPacket(mediapacket, buffer, samplepos); if (*samplepos == mediapacket.length) { @@ -363,9 +363,9 @@ UINT AudioWin::DeliverMediaSample(UCHAR* buffer, UINT *samplepos) else return 0; } -UINT AudioWin::DeliverMediaPacket(const MediaPacket packet, +u4 AudioWin::DeliverMediaPacket(const MediaPacket packet, UCHAR* buffer, - UINT *samplepos) + u4 *samplepos) { /*First Check, if we have an audio sample*/ @@ -380,7 +380,7 @@ UINT AudioWin::DeliverMediaPacket(const MediaPacket packet, REFERENCE_TIME reftime1=0; REFERENCE_TIME reftime2=0; - UINT headerstrip=0; + u4 headerstrip=0; if (packet.disconti) { firstsynched=false; vw->DeliverAudioMediaSample(); @@ -394,7 +394,7 @@ UINT AudioWin::DeliverMediaPacket(const MediaPacket packet, /*Inspect PES-Header */ -/* UINT header_length=buffer[(packet.pos_buffer+8)%bufferlength]+8/*is this right*; +/* u4 header_length=buffer[(packet.pos_buffer+8)%bufferlength]+8/*is this right*; */ if (*samplepos==0 && packet.type!=MPTYPE_MPEG_AUDIO_LAYER3) {//stripheader headerstrip=buffer[packet.pos_buffer+8]+9; @@ -413,9 +413,9 @@ UINT AudioWin::DeliverMediaPacket(const MediaPacket packet, } } BYTE *ms_buf; - UINT ms_length; - UINT ms_pos; - UINT haveToCopy; + u4 ms_length; + u4 ms_pos; + u4 haveToCopy; if (!vw->getCurrentAudioMediaSample(&ms) || ms==NULL) {// get the current sample //samplepos=0; //MILLISLEEP(10); diff --git a/src/audiowin.h b/src/audiowin.h index 44a179e..c48376d 100644 --- a/src/audiowin.h +++ b/src/audiowin.h @@ -63,9 +63,9 @@ class AudioWin : public Audio bool addOptionPagesToWTB(WTabBar *wtb); // Writing Data to Audiodevice - virtual void PrepareMediaSample(const MediaPacketList&, UINT samplepos); - virtual UINT DeliverMediaSample(UCHAR* buffer, UINT *samplepos); - UINT DeliverMediaPacket(MediaPacket packet, UCHAR* buffer, UINT *samplepos); + virtual void PrepareMediaSample(const MediaPacketList&, u4 samplepos); + virtual u4 DeliverMediaSample(UCHAR* buffer, u4 *samplepos); + u4 DeliverMediaPacket(MediaPacket packet, UCHAR* buffer, u4 *samplepos); int dsInitAudioFilter(IGraphBuilder* dsgraphbuilder); const AudioFilterDescList *getAudioFilterList(int &selected); diff --git a/src/bitmap.cc b/src/bitmap.cc index ade61be..28d9fab 100644 --- a/src/bitmap.cc +++ b/src/bitmap.cc @@ -91,13 +91,13 @@ void Palette::setYCrCbA(UCHAR index, UCHAR tY, UCHAR tCr, UCHAR tCb, UCHAR tA) colour[index] = yrba2argb(tY, tCr, tCb, tA); } -Bitmap::Bitmap(UINT tWidth, UINT tHeight, UCHAR tBpp) +Bitmap::Bitmap(u4 tWidth, u4 tHeight, UCHAR tBpp) { setSize(tWidth, tHeight); palette.setBpp(tBpp); } -void Bitmap::setSize(UINT tWidth, UINT tHeight) +void Bitmap::setSize(u4 tWidth, u4 tHeight) { if (width == tWidth && height == tHeight) return; width = tWidth; height = tHeight; @@ -107,7 +107,7 @@ void Bitmap::setSize(UINT tWidth, UINT tHeight) bitmap.assign(width * height, 0); } -bool Bitmap::setIndex(UINT x, UINT y, UCHAR index) +bool Bitmap::setIndex(u4 x, u4 y, UCHAR index) { if (x <= width && y <= height) { @@ -117,7 +117,7 @@ bool Bitmap::setIndex(UINT x, UINT y, UCHAR index) else return false; } -UCHAR Bitmap::getIndex(UINT x, UINT y) const +UCHAR Bitmap::getIndex(u4 x, u4 y) const { if (x > width || y > height) return 0; @@ -125,7 +125,7 @@ UCHAR Bitmap::getIndex(UINT x, UINT y) const return bitmap[x + y*width]; } -u4 Bitmap::getColour(UINT x, UINT y) const +u4 Bitmap::getColour(u4 x, u4 y) const { if (x > width || y > height) return 0; diff --git a/src/bitmap.h b/src/bitmap.h index a0fe441..5a9246c 100644 --- a/src/bitmap.h +++ b/src/bitmap.h @@ -28,8 +28,8 @@ class DisplayRegion { public: DisplayRegion(); - UINT windowx, windowy, windoww, windowh; - UINT framewidth,frameheight; + u4 windowx, windowy, windoww, windowh; + u4 framewidth,frameheight; }; class Palette @@ -47,16 +47,16 @@ class Palette const std::vector& getCrVector() const { return Cr; } const std::vector& getCbVector() const { return Cb; } const std::vector& getAVector() const { return A; } - UINT getNumColours() const { return numColours; } + u4 getNumColours() const { return numColours; } private: - const static UINT MAX_DEPTH = 8; + const static u4 MAX_DEPTH = 8; std::vector colour; std::vector Y; std::vector Cr; std::vector Cb; std::vector A; UCHAR bpp; - UINT maxColours, numColours; + u4 maxColours, numColours; void argb2yrba(u4 argb, UCHAR& y, UCHAR& cr, UCHAR& cb, UCHAR& a); u4 yrba2argb(UCHAR y, UCHAR cr, UCHAR cb, UCHAR a); }; @@ -65,17 +65,17 @@ class Bitmap { private: std::vector bitmap; - UINT width, height; + u4 width, height; public: - Bitmap(UINT tWidth = 0, UINT tHeight = 0, UCHAR tBpp = 8); + Bitmap(u4 tWidth = 0, u4 tHeight = 0, UCHAR tBpp = 8); Palette palette; - UINT getWidth() const { return width; } - UINT getHeight() const { return height; } - UCHAR getIndex(UINT x, UINT y) const; - u4 getColour(UINT x, UINT y) const; + u4 getWidth() const { return width; } + u4 getHeight() const { return height; } + UCHAR getIndex(u4 x, u4 y) const; + u4 getColour(u4 x, u4 y) const; const std::vector & rawData() const { return bitmap; } - void setSize(UINT tWidth, UINT tHeight); - bool setIndex(UINT x, UINT y, UCHAR index); + void setSize(u4 tWidth, u4 tHeight); + bool setIndex(u4 x, u4 y, UCHAR index); void setAllIndices(UCHAR index); }; diff --git a/src/boxx.cc b/src/boxx.cc index c0bc05b..7120a0e 100644 --- a/src/boxx.cc +++ b/src/boxx.cc @@ -60,13 +60,13 @@ void Boxx::draw() } } -void Boxx::setSize(UINT w, UINT h) +void Boxx::setSize(u4 w, u4 h) { area.w = w; area.h = h; } -void Boxx::setPosition(UINT x, UINT y) +void Boxx::setPosition(u4 x, u4 y) { area.x = x; area.y = y; @@ -140,7 +140,7 @@ bool Boxx::getVisible() const return visible; } -void Boxx::setGap(UINT gap) +void Boxx::setGap(u4 gap) { paraVSpace = gap; } @@ -209,12 +209,12 @@ int Boxx::getY2() const return area.y + area.h; } -UINT Boxx::getWidth() const +u4 Boxx::getWidth() const { return area.w; } -UINT Boxx::getHeight() const +u4 Boxx::getHeight() const { return area.h; } @@ -264,13 +264,13 @@ void Boxx::fillColour(const DrawStyle& colour) int Boxx::drawPara(const char* text, int x, int y, const DrawStyle& colour, unsigned int skiplines) { char line[256]; - UINT lineHeight = getFontHeight() + paraVSpace; + u4 lineHeight = getFontHeight() + paraVSpace; float lineWidth; float thisCharWidth; int textPos = 0; int textLength = strlen(text); int linePos; - UINT ypos = y; + u4 ypos = y; int printLine; int leftlines = 0; int drawLinePos = -skiplines; @@ -420,7 +420,7 @@ void Boxx::rectangle(Region& region, const DrawStyle& colour) // Level 0 drawing functions -void Boxx::rectangle(UINT x, UINT y, UINT w, UINT h, const DrawStyle& colour) +void Boxx::rectangle(u4 x, u4 y, u4 w, u4 h, const DrawStyle& colour) { if (parent) parent->rectangle(area.x + x, area.y + y, w, h, colour); else surface->fillblt(x, y, w, h, colour); @@ -479,7 +479,7 @@ void Boxx::drawTextCentre(const std::string& text, int x, int y, const DrawStyle // Now deprecated /* -void Boxx::drawPixelAlpha(UINT x, UINT y, const Colour& colour,bool fastdraw) +void Boxx::drawPixelAlpha(u4 x, u4 y, const Colour& colour,bool fastdraw) { if (parent) parent->drawPixelAlpha(area.x + x, area.y + y, colour,fastdraw); else @@ -493,7 +493,7 @@ void Boxx::drawPixelAlpha(UINT x, UINT y, const Colour& colour,bool fastdraw) } } -void Boxx::drawPixel(UINT x, UINT y, const Colour& colour, bool fastdraw) +void Boxx::drawPixel(u4 x, u4 y, const Colour& colour, bool fastdraw) { if (parent) parent->drawPixel(area.x + x, area.y + y, colour,fastdraw); else @@ -514,7 +514,7 @@ void Boxx::drawTTChar(int ox, int oy, int x, int y, cTeletextChar c) else if (surface) surface->drawTTChar(ox, oy,x,y,c); } -void Boxx::drawBitmap(UINT x, UINT y, const Bitmap& bm, const DisplayRegion & region) +void Boxx::drawBitmap(u4 x, u4 y, const Bitmap& bm, const DisplayRegion & region) { if (parent) parent->drawBitmap(area.x + x, area.y + y, bm, region); else if (surface) surface->drawBitmap(x, y, bm, region); diff --git a/src/boxx.h b/src/boxx.h index 6f8f521..57f5013 100644 --- a/src/boxx.h +++ b/src/boxx.h @@ -41,12 +41,12 @@ class Boxx Boxx(); virtual ~Boxx(); - virtual void setSize(UINT w, UINT h); // virtual? really? - void setPosition(UINT x, UINT y); // Set position on parent. Even numbers only!!! + virtual void setSize(u4 w, u4 h); // virtual? really? + void setPosition(u4 x, u4 y); // Set position on parent. Even numbers only!!! void createBuffer(); // Make this a root view that goes in the BoxStack virtual void draw(); - void setGap(UINT gap); + void setGap(u4 gap); void setBackgroundColour(const DrawStyle& colour); void setVisible(bool isVisible); void setVideoBackground(); @@ -80,8 +80,8 @@ class Boxx int getX2() const; // .. and the right edge int getY() const; int getY2() const; - UINT getWidth() const; - UINT getHeight() const; + u4 getWidth() const; + u4 getHeight() const; bool getVisible() const; const Region* getRegion() const; Region getRegionR() const; // Same but as an object @@ -96,7 +96,7 @@ class Boxx int drawPara(const char* text, int x, int y, const DrawStyle& colour, unsigned int skiplines=0); // Drawing functions level 0 - void rectangle(UINT x, UINT y, UINT w, UINT h, const DrawStyle& colour); + void rectangle(u4 x, u4 y, u4 w, u4 h, const DrawStyle& colour); void rectangle(Region& region, const DrawStyle& colour); void drawText(const char* text, int x, int y, const DrawStyle& colour); @@ -109,10 +109,10 @@ class Boxx void drawTextRJ(const std::string& text, int x, int y, const DrawStyle& colour); void drawTextCentre(const std::string& text, int x, int y, const DrawStyle& colour); //Now deprecated - //void drawPixel(UINT x, UINT y, const Colour& colour, bool fastdraw=false); - void drawBitmap(UINT x, UINT y, const Bitmap& bm, const DisplayRegion& region); + //void drawPixel(u4 x, u4 y, const Colour& colour, bool fastdraw=false); + void drawBitmap(u4 x, u4 y, const Bitmap& bm, const DisplayRegion& region); //Now deprecated - // void drawPixelAlpha(UINT x, UINT y, const Colour& colour,bool fastdraw=false); + // void drawPixelAlpha(u4 x, u4 y, const Colour& colour,bool fastdraw=false); void drawImage(Image& image, float x, float y, float width, float height, Corner corner=TopLeft); void drawClippingRectangle(float x, float y, float w, float h); int getFontHeight(); @@ -159,7 +159,7 @@ class Boxx void removeVisibleChilds(Region & r); static const int paraMargin = 10; - UINT paraVSpace{6}; // default gap for drawPara + u4 paraVSpace{6}; // default gap for drawPara DrawStyle backgroundColour; bool backgroundColourSet{}; diff --git a/src/control.cc b/src/control.cc index 7c46668..589174d 100644 --- a/src/control.cc +++ b/src/control.cc @@ -1255,7 +1255,7 @@ void Control::doJustConnected(VConnect* vconnect) if (chanList && chanList->size()) { Channel* chan = NULL; - for (UINT i = 0; i < chanList->size(); i++) + for (u4 i = 0; i < chanList->size(); i++) { if ((*chanList)[i]->number == static_cast(startToLiveTV)) { diff --git a/src/defines.h b/src/defines.h index dfdc771..210c57a 100644 --- a/src/defines.h +++ b/src/defines.h @@ -22,8 +22,6 @@ typedef unsigned char UCHAR; typedef unsigned short USHORT; -typedef unsigned int UINT; - #include @@ -97,7 +95,7 @@ int getClockRealTime(struct timespec *tp); #else - int min(UINT, int); + int min(u4, int); /*#ifdef _MIPS_ARCH #define Surface_TYPE SurfaceDirectFB #else @@ -216,13 +214,13 @@ int getClockRealTime(struct timespec *tp); /* typedef struct { - UINT id; // Used for working out what has changed at the end + u4 id; // Used for working out what has changed at the end char *title; // Name of the option char *configSection; // Which section of the config file char *configParam; // Parameter name in the config file - UINT optionType; // 1 for text, 2 for int - UINT optionCount; // How many choices? - UINT defaultOption; // Serial of the default choice (base 0), or actual option in int mode + u4 optionType; // 1 for text, 2 for int + u4 optionCount; // How many choices? + u4 defaultOption; // Serial of the default choice (base 0), or actual option in int mode int startInt; // Starting int for int mode const char * const * options; // Text for the options (null for int mode) } OPTIONDATA; diff --git a/src/demuxer.cc b/src/demuxer.cc index 24a4564..0d2400d 100644 --- a/src/demuxer.cc +++ b/src/demuxer.cc @@ -50,26 +50,26 @@ Demuxer* Demuxer::instance = NULL; class NALUUnit { public: - NALUUnit(const UCHAR* buf,UINT length_buf); + NALUUnit(const UCHAR* buf,u4 length_buf); ~NALUUnit(); -inline UINT getBits(UINT num_bits); - UINT getUe(); +inline u4 getBits(u4 num_bits); + u4 getUe(); int getSe(); bool isEonalu() {return eonalu;}; int getPos(){return pos;}; protected: UCHAR* nalu_buf; - UINT nalu_length; - UINT pos; + u4 nalu_length; + u4 pos; UCHAR bit_pos; UCHAR working_byte; - UINT last_bytes; + u4 last_bytes; bool eonalu; }; -NALUUnit::NALUUnit(const UCHAR *buf, UINT length_buf) +NALUUnit::NALUUnit(const UCHAR *buf, u4 length_buf) { nalu_length=0; nalu_buf=NULL; @@ -79,11 +79,11 @@ NALUUnit::NALUUnit(const UCHAR *buf, UINT length_buf) last_bytes=0; eonalu=false; - UINT nalu_start=0; - UINT nalu_end=0; - UINT pattern =(((UINT)buf[ 0] << 16) | - ((UINT)buf[1] << 8) | - (UINT)buf[2] ); + u4 nalu_start=0; + u4 nalu_end=0; + u4 pattern =(((u4)buf[ 0] << 16) | + ((u4)buf[1] << 8) | + (u4)buf[2] ); nalu_start=3; while (pattern != 0x000001) { @@ -113,11 +113,11 @@ NALUUnit::~NALUUnit() if (nalu_buf) free(nalu_buf); } -inline UINT NALUUnit::getBits(UINT num_bits) +inline u4 NALUUnit::getBits(u4 num_bits) { if (num_bits==0) return 0; //??? - UINT remain_bits=num_bits; - UINT work=0; + u4 remain_bits=num_bits; + u4 work=0; //May be slow, but should work! while (remain_bits>0) { if (bit_pos==0) { @@ -143,7 +143,7 @@ inline UINT NALUUnit::getBits(UINT num_bits) } } - UINT fetch_bits=std::min(remain_bits, static_cast(8-bit_pos)); + u4 fetch_bits=std::min(remain_bits, static_cast(8-bit_pos)); work=work <>bit_pos) & (0xFF>>(8-fetch_bits))); work|=(working_byte &(0xFF>>(bit_pos)))>>(8-fetch_bits-bit_pos); @@ -153,7 +153,7 @@ inline UINT NALUUnit::getBits(UINT num_bits) return work; } -UINT NALUUnit::getUe() +u4 NALUUnit::getUe() { int leadbits=-1; bool bit; @@ -165,7 +165,7 @@ UINT NALUUnit::getUe() int NALUUnit::getSe() { - UINT input=getUe(); + u4 input=getUe(); if (input==0) return 0; int output=((input+1)>>1); if (input & 0x1) output*=-1; @@ -245,7 +245,7 @@ int PESPacket::write(const UCHAR *buf, int len) if (size + len > 0x10000) return 0; if (size + len > data_size) { // Reallocate - UINT new_data_size = std::max(data_size + data_size / 2, data_size + len); + u4 new_data_size = std::max(data_size + data_size / 2, data_size + len); if (new_data_size > 0x10000) new_data_size = 0x10000; data_size = new_data_size; data = (UCHAR*)realloc(data, data_size); @@ -281,7 +281,7 @@ u8 PESPacket::getPTS() const else return PTS_INVALID; } -UCHAR PESPacket::operator[] (UINT index) const +UCHAR PESPacket::operator[] (u4 index) const { if (index >= size) return 0; @@ -289,14 +289,14 @@ UCHAR PESPacket::operator[] (UINT index) const return data[index]; } -UINT PESPacket::findPictureHeader(bool h264) const +u4 PESPacket::findPictureHeader(bool h264) const { if (size < 12) return 0; - UINT pattern = ( ((UINT)data[ 8] << 24) | - ((UINT)data[ 9] << 16) | - ((UINT)data[10] << 8) | - (UINT)data[11] ); - UINT pos = 11; + u4 pattern = ( ((u4)data[ 8] << 24) | + ((u4)data[ 9] << 16) | + ((u4)data[10] << 8) | + (u4)data[11] ); + u4 pos = 11; if (h264) { while (pattern != DEMUXER_H264_ACCESS_UNIT) @@ -315,15 +315,15 @@ UINT PESPacket::findPictureHeader(bool h264) const } } -UINT PESPacket::countPictureHeaders(bool h264, struct PictCountInfo& pinfo) const +u4 PESPacket::countPictureHeaders(bool h264, struct PictCountInfo& pinfo) const { if (size < 12) return 0; - UINT pattern = ( ((UINT)data[ 8] << 24) | - ((UINT)data[ 9] << 16) | - ((UINT)data[10] << 8) | - (UINT)data[11] ); - UINT pos = 11; - UINT count=0; + u4 pattern = ( ((u4)data[ 8] << 24) | + ((u4)data[ 9] << 16) | + ((u4)data[10] << 8) | + (u4)data[11] ); + u4 pos = 11; + u4 count=0; if (h264) { //inspired by vdr algorithm for frame couting by Klaus Schmidinger while (pos= PESTYPE_VID0 && packet_type <= PESTYPE_VIDMAX) @@ -896,7 +896,7 @@ void Demuxer::parsePacketDetails(PESPacket& packet) if (packet.hasPTS()) video_pts = packet.getPTS(); // If there is a sequence header, extract information - UINT pos = packet.findSeqHeader(h264); + u4 pos = packet.findSeqHeader(h264); if (pos > 1) { if (!h264) { @@ -968,11 +968,11 @@ void Demuxer::parsePacketDetails(PESPacket& packet) { if (i<6) { - UINT lastscale=8; - UINT nextscale=8; + u4 lastscale=8; + u4 nextscale=8; for (int j=0;j<16;j++) { if (nextscale!=0) { - UINT delta=nalu.getSe(); + u4 delta=nalu.getSe(); nextscale=(lastscale+delta+256)%256; } lastscale=(nextscale==0)?lastscale:nextscale; @@ -980,11 +980,11 @@ void Demuxer::parsePacketDetails(PESPacket& packet) } else { - UINT lastscale=8; - UINT nextscale=8; + u4 lastscale=8; + u4 nextscale=8; for (int j=0;j<64;j++) { if (nextscale!=0) { - UINT delta=nalu.getSe(); + u4 delta=nalu.getSe(); nextscale=(lastscale+delta+256)%256; } lastscale=(nextscale==0)?lastscale:nextscale; @@ -1008,15 +1008,15 @@ void Demuxer::parsePacketDetails(PESPacket& packet) }; nalu.getUe(); //log2framenum - UINT temp=nalu.getUe(); + u4 temp=nalu.getUe(); if (temp==0) //pict order nalu.getUe(); else if (temp==1) { nalu.getBits(1); nalu.getSe(); nalu.getSe(); - UINT temp2=nalu.getUe(); - for (UINT i=0;i1) { if (!h264) { interlaced=!(packet[pos+1] & 0x08); //really simple @@ -1134,10 +1134,10 @@ void Demuxer::parsePacketDetails(PESPacket& packet) } } -UINT Demuxer::stripAudio(UCHAR* buf, UINT len) +u4 Demuxer::stripAudio(UCHAR* buf, u4 len) { - UINT read_pos = 0, write_pos = 0; - UINT pattern, packet_length; + u4 read_pos = 0, write_pos = 0; + u4 pattern, packet_length; if (len < 4) return 0; pattern = (buf[0] << 16) | (buf[1] << 8) | (buf[2]); while (read_pos + 7 <= len) @@ -1164,10 +1164,10 @@ UINT Demuxer::stripAudio(UCHAR* buf, UINT len) return write_pos; } -void Demuxer::changeTimes(UCHAR* buf, UINT len,UINT playtime) +void Demuxer::changeTimes(UCHAR* buf, u4 len,u4 playtime) { - UINT pattern, packet_length; - UINT read_pos = 0; + u4 pattern, packet_length; + u4 read_pos = 0; if (len < 4) return; pattern = (buf[0] << 16) | (buf[1] << 8) | (buf[2]); while (read_pos + 7 <= len) @@ -1204,10 +1204,10 @@ void Demuxer::changeTimes(UCHAR* buf, UINT len,UINT playtime) } -bool Demuxer::scanForVideo(UCHAR* buf, UINT len, bool &ish264) +bool Demuxer::scanForVideo(UCHAR* buf, u4 len, bool &ish264) { - UINT pos = 3; - UINT pattern; + u4 pos = 3; + u4 pattern; ish264=false; if (len < 4) return false; pattern = (buf[0] << 16) | (buf[1] << 8) | (buf[2]); diff --git a/src/demuxer.h b/src/demuxer.h index 36b9b7e..a68071c 100644 --- a/src/demuxer.h +++ b/src/demuxer.h @@ -56,22 +56,22 @@ class PESPacket void truncate(); int write(const UCHAR* buf, int len); - UCHAR operator[] (UINT index) const; + UCHAR operator[] (u4 index) const; // return data[index] if in bounds, else 0 // so no proper error condition but never mind for now const UCHAR* getData() const { return data; } - UINT getLength() const { return length; } - UINT getSize() const { return size; } + u4 getLength() const { return length; } + u4 getSize() const { return size; } UCHAR getPacketType() const { return packetType; } void setSubstream(UCHAR s) { substream = s; } UCHAR getSubstream() const { return substream; } u8 getPTS() const; bool hasPTS() const { return (getPTS() != PTS_INVALID); } - UINT findPictureHeader(bool h264) const; - UINT findSeqHeader(bool h264) const; - UINT findSeqExtHeader(bool h264) const; - UINT countPictureHeaders(bool h264, struct PictCountInfo& pinfo) const; + u4 findPictureHeader(bool h264) const; + u4 findSeqHeader(bool h264) const; + u4 findSeqExtHeader(bool h264) const; + u4 countPictureHeaders(bool h264, struct PictCountInfo& pinfo) const; static const u8 PTS_INVALID = (1LL << 33); @@ -79,11 +79,11 @@ class PESPacket protected: void copyFrom(const PESPacket& packet); UCHAR * data; - UINT length, size; - UINT data_size; + u4 length, size; + u4 data_size; UCHAR packetType; UCHAR substream; - UINT mutable seq_header; // 0 = no, 1 = unknown, else = header offset + u4 mutable seq_header; // 0 = no, 1 = unknown, else = header offset }; class Demuxer @@ -147,13 +147,13 @@ class Demuxer // Remove all data from a buffer apart from video PES packets. // Returns the length of the reduced data. // removed *static function*, due to DemuxerTS - virtual UINT stripAudio(UCHAR* buf, UINT len); - void changeTimes(UCHAR* buf, UINT len,UINT playtime); + virtual u4 stripAudio(UCHAR* buf, u4 len); + void changeTimes(UCHAR* buf, u4 len,u4 playtime); // Scan a buffer to see if video packets are present. // Returns true if video exists; false if not. // removed *static function* for h264 detection - static bool scanForVideo(UCHAR* buf, UINT len, bool &ish264); + static bool scanForVideo(UCHAR* buf, u4 len, bool &ish264); enum PESTYPE { diff --git a/src/demuxeraudio.cc b/src/demuxeraudio.cc index 56bd51e..57bc65e 100644 --- a/src/demuxeraudio.cc +++ b/src/demuxeraudio.cc @@ -385,13 +385,13 @@ static struct tagid { framelen is the len without header (10 Bytes for V23, 6 Bytes for v2x) */ -#define MAXLEN(tagtype) ((UINT)frameLentagtype)-1?(UINT)frameLen:sizeof(tag->tagtype)-1) +#define MAXLEN(tagtype) ((u4)frameLentagtype)-1?(u4)frameLen:sizeof(tag->tagtype)-1) bool DemuxerAudio::fillId3Tag(id3_tag * tag,UCHAR * frameData, int frameLen, int dataOffset, bool v23) { int tl=v23?4:3; int tagIndex=-1; if (tag == NULL) return false; if (frameLen < 2) return false; - for (UINT i=0;i< NUMKNOWN;i++) { + for (u4 i=0;i< NUMKNOWN;i++) { if(strncmp((char *)frameData,knownFrames[i].bytes,tl) == 0) { tagIndex=knownFrames[i].index; break; @@ -921,7 +921,7 @@ int DemuxerAudio::put(UCHAR* wbuf, int len) int oldBytes=0; if (tmpFill != 0 || (buffer->bufferEmpty() && len < HDRLEN)) { //OK we have to copy everything to the tmp buffer - int cp=(UINT)len<(PACKET_SIZE-tmpFill)?(UINT)len:(PACKET_SIZE-tmpFill); + int cp=(u4)len<(PACKET_SIZE-tmpFill)?(u4)len:(PACKET_SIZE-tmpFill); memcpy(&tmpBuffer[tmpFill],wbuf,cp); oldBytes=tmpFill; tmpFill+=cp; @@ -1105,7 +1105,7 @@ bool DemuxerAudio::isSync() { return inSync; } -UINT DemuxerAudio::getSyncErrors() { +u4 DemuxerAudio::getSyncErrors() { return outOfSync; } diff --git a/src/demuxeraudio.h b/src/demuxeraudio.h index 6be7b29..bd9a3d1 100644 --- a/src/demuxeraudio.h +++ b/src/demuxeraudio.h @@ -58,18 +58,18 @@ class DemuxerAudio : public Demuxer //special functions for the audioplayer bool isSync() ; - UINT getSyncErrors(); + u4 getSyncErrors(); //set the skip factor void setSkipFactor(int faktor); //how many bytes do we need at the file start //ID3V2, VBR + some spare to detect a first header - static UINT headerBytes() { + static u4 headerBytes() { return 4096; } //how many bytes do we need at the end - static UINT footerBytes() { + static u4 footerBytes() { return 128; } //return a reference to an ID3 tag @@ -100,7 +100,7 @@ class DemuxerAudio : public Demuxer //fill it into the ID3 store bool fillId3Tag(id3_tag * tag,UCHAR * frameData, int frameLen, int dataOffset, bool v23); - const static UINT PACKET_SIZE=4096; + const static u4 PACKET_SIZE=4096; private: /*max size of a packet see http://mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm @@ -116,7 +116,7 @@ class DemuxerAudio : public Demuxer //info flags for the player bool inSync; //set if we read a valid header - UINT outOfSync; //counts each invalid read headers + u4 outOfSync; //counts each invalid read headers bool hasHdrInfo; //if we have been able to successfully //parse the first header bool hasVBRInfo; //we have VBR and the necessary info @@ -139,7 +139,7 @@ class DemuxerAudio : public Demuxer //we need a buffer to be able to read at least a complete header const static int HDRLEN=4; UCHAR tmpBuffer[PACKET_SIZE+HDRLEN]; - UINT tmpFill; + u4 tmpFill; //compute the bytes/second from the BR info //return 0 if not there; diff --git a/src/demuxermedia.cc b/src/demuxermedia.cc index 365846b..285df3a 100644 --- a/src/demuxermedia.cc +++ b/src/demuxermedia.cc @@ -200,7 +200,7 @@ int DemuxerMedia::put(UCHAR* buf, int len) buf++; len--; ret++; break; case -4: - packetLength = ((UINT)*buf) << 8; + packetLength = ((u4)*buf) << 8; state--; buf++; len--; ret++; break; diff --git a/src/demuxerts.cc b/src/demuxerts.cc index c61d4c2..0df18d0 100644 --- a/src/demuxerts.cc +++ b/src/demuxerts.cc @@ -210,7 +210,7 @@ int DemuxerTS::findPTS(UCHAR* buf, int len, u8* dest) p += eslength; //skip es descriptor } } else if (pid == scanaid) { - // UINT framelength = ((UINT)curbuf[4] << 8) | curbuf[5]; UNUSED? + // u4 framelength = ((u4)curbuf[4] << 8) | curbuf[5]; UNUSED? if ( curbuf[7] & 0x80 ) // PTS_DTS_flags indicate that PTS is present { @@ -796,9 +796,9 @@ void DemuxerTS::parseTSPacketDetails(PESPacket &packet) // Only important stuff { packetNumber++; } - UINT pictsinpacket=packet.countPictureHeaders(h264,pinfo); + u4 pictsinpacket=packet.countPictureHeaders(h264,pinfo); - UINT numpicts=0; + u4 numpicts=0; /* if (!doubledframerate) {*/ numpicts=pictsinpacket; @@ -831,7 +831,7 @@ void DemuxerTS::parseTSPacketDetails(PESPacket &packet) // Only important stuff me = pts_map.front(); pts_map_mutex.unlock(); - //UINT fps = Video::getInstance()->getFPS(); + //u4 fps = Video::getInstance()->getFPS(); double tfps=fps; // if (doubledframerate) tfps*=2.; long long pts_expected = me.pts + 90000LL*((long long)(((double)(frame_num - me.frame)) / tfps)); @@ -861,7 +861,7 @@ void DemuxerTS::parseTSPacketDetails(PESPacket &packet) // Only important stuff } -bool DemuxerTS::scanForVideo(UCHAR* buf, UINT len, bool &ish264) +bool DemuxerTS::scanForVideo(UCHAR* buf, u4 len, bool &ish264) { int pmtpidy=0; @@ -939,16 +939,16 @@ bool DemuxerTS::scanForVideo(UCHAR* buf, UINT len, bool &ish264) return false; } -UINT DemuxerTS::stripAudio(UCHAR* buf, UINT len) //it has to be adapted +u4 DemuxerTS::stripAudio(UCHAR* buf, u4 len) //it has to be adapted { //This function strips all TS Headers and non video payload - UINT readpos=0; - UINT writepos=0; + u4 readpos=0; + u4 writepos=0; PESPacket destpaket; bool started=true; while (readpos < len ) { if (buf[readpos] != TS_SIG) {readpos++; continue;} - UINT oldreadpos=readpos; + u4 oldreadpos=readpos; int datalen = TS_SIZE - 4; int pid = ( (buf[readpos+1] & 0x1F) << 8 ) | buf[readpos+2]; @@ -964,7 +964,7 @@ UINT DemuxerTS::stripAudio(UCHAR* buf, UINT len) //it has to be adapted continue; } readpos += (TS_SIZE - datalen); - UINT towrite=min(datalen,len-readpos); + u4 towrite=min(datalen,len-readpos); if (pid == vID) { if (payload) { if (started) { diff --git a/src/demuxerts.h b/src/demuxerts.h index 1624330..ad6cc54 100644 --- a/src/demuxerts.h +++ b/src/demuxerts.h @@ -51,8 +51,8 @@ class DemuxerTS : public Demuxer void setPacketNum(u4 npacket); u4 getFrameNumFromPTS(u8 pts); u4 getPacketNum(); - UINT stripAudio(UCHAR* buf, UINT len); - static bool scanForVideo(UCHAR* buf, UINT len, bool &ish264); + u4 stripAudio(UCHAR* buf, u4 len); + static bool scanForVideo(UCHAR* buf, u4 len, bool &ish264); Channel *getChannelInfo() {return &channelinfo;}; @@ -71,7 +71,7 @@ class DemuxerTS : public Demuxer int atype; bool subActive; // Same for subtitles - UINT subLength; // Expected length of subtitle packet + u4 subLength; // Expected length of subtitle packet bool vActive, aActive, tActive; // Whether video/audio is actively being captured bool havechannelinfo; diff --git a/src/demuxervdr.cc b/src/demuxervdr.cc index 51b6c4e..7297f8e 100644 --- a/src/demuxervdr.cc +++ b/src/demuxervdr.cc @@ -82,11 +82,11 @@ int DemuxerVDR::scan(UCHAR *buf, int len) { int ret = 0; while (len >= 4) { - UINT pattern = buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3]; + u4 pattern = buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3]; buf++; len--; - if (pattern < (UINT)(0x100 | PESTYPE_AUD0) || pattern > (UINT)( + if (pattern < (u4)(0x100 | PESTYPE_AUD0) || pattern > (u4)( 0x100 | HiByte)) continue; HiByte = pattern & 0xFF; @@ -100,7 +100,7 @@ int DemuxerVDR::scan(UCHAR *buf, int len) { int DemuxerVDR::findPTS(UCHAR* buf, int len, u8* dest) { while (len >= 14) { - UINT pattern = buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3]; + u4 pattern = buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3]; buf++; len--; if (pattern < (0x100 | PESTYPE_AUD0) || pattern > (0x100 @@ -110,7 +110,7 @@ int DemuxerVDR::findPTS(UCHAR* buf, int len, u8* dest) { if ((buf[5] & 0xC0) != 0x80) continue; - UINT packetlength = ((UINT) buf[3] << 8) | buf[4]; + u4 packetlength = ((u4) buf[3] << 8) | buf[4]; if (buf[6] & 0x80) // PTS_DTS_flags indicate that PTS is present { @@ -208,7 +208,7 @@ int DemuxerVDR::put(UCHAR* buf, int len) buf++; len--; ret++; break; case -4: - packetLength = ((UINT)*buf) << 8; + packetLength = ((u4)*buf) << 8; state--; buf++; len--; ret++; break; @@ -292,9 +292,9 @@ u4 DemuxerVDR::getFrameNumFromPTS(u8 pts) void DemuxerVDR::dealWithSubtitlePacket() { const UCHAR* data = packet.getData(); - UINT packetSize = packet.getSize(); + u4 packetSize = packet.getSize(); if (packetSize < 9) return; - UINT payloadOffset = data[8] + 9; + u4 payloadOffset = data[8] + 9; if (packetSize < payloadOffset + 5) return; if (data[payloadOffset + 3] == 0x00) { // Not a continuation packet @@ -311,7 +311,7 @@ void DemuxerVDR::dealWithSubtitlePacket() } const UCHAR* sub_data = subtitlePacket.getData(); - UINT subSize = subtitlePacket.getSize(); + u4 subSize = subtitlePacket.getSize(); while (subtitlePacketPosition < subSize) { if (sub_data[subtitlePacketPosition] == 0xFF) @@ -327,7 +327,7 @@ void DemuxerVDR::dealWithSubtitlePacket() break; } if (subSize < subtitlePacketPosition + 6) break; - UINT segmentLength = (sub_data[subtitlePacketPosition + 4] << 8) + u4 segmentLength = (sub_data[subtitlePacketPosition + 4] << 8) + sub_data[subtitlePacketPosition + 5]; subtitlePacketPosition += segmentLength + 6; } @@ -337,7 +337,7 @@ void DemuxerVDR::parseVDRPacketDetails() { if (packet.getPacketType() == PESTYPE_PRIVATE_1 && packet.getSize() > 8) { - UINT payload_begin = packet[8] + 9; + u4 payload_begin = packet[8] + 9; if (packet.getSize() > payload_begin) { UCHAR substream_type = packet[payload_begin] & 0xF0; @@ -379,7 +379,7 @@ LogNT::getInstance()->debug(TAG, "+* PTS INIT *+ {} {}", me.pts, me.frame); me = pts_map.front(); pts_map_mutex.unlock(); -// UINT fps = Video::getInstance()->getFPS(); +// u4 fps = Video::getInstance()->getFPS(); u8 pts_expected = me.pts + 90000*((u4)((double)(frame_num - me.frame)) / fps); while (pts_expected > (1LL<<33)) pts_expected -= (1LL<<33); diff --git a/src/demuxervdr.h b/src/demuxervdr.h index 99ef035..4692238 100644 --- a/src/demuxervdr.h +++ b/src/demuxervdr.h @@ -45,7 +45,7 @@ class DemuxerVDR : public Demuxer int packetLength; PESPacket packet; PESPacket subtitlePacket; - UINT subtitlePacketPosition; + u4 subtitlePacketPosition; u4 frameNumber, packetNumber; bool frameCounting, packetCounting; diff --git a/src/directory.cc b/src/directory.cc index d769d8e..f5f4992 100644 --- a/src/directory.cc +++ b/src/directory.cc @@ -30,7 +30,7 @@ Directory::~Directory() if (name) delete[] name; name = NULL; index = -1; // just in case // FIXME remove this - UINT i; + u4 i; for (i = 0; i < dirList.size(); i++) { @@ -47,7 +47,7 @@ Directory::~Directory() Directory* Directory::getDirByName(char* dirName) { - for(UINT i = 0; i < dirList.size(); i++) + for(u4 i = 0; i < dirList.size(); i++) { if (!strcmp(dirName, dirList[i]->name)) return dirList[i]; } @@ -57,7 +57,7 @@ Directory* Directory::getDirByName(char* dirName) u4 Directory::getNumRecordings() { u4 total = recList.size(); - for(UINT i = 0; i < dirList.size(); i++) + for(u4 i = 0; i < dirList.size(); i++) { total += dirList[i]->getNumRecordings(); } @@ -67,12 +67,12 @@ u4 Directory::getNumRecordings() u4 Directory::getNumNewRecordings() { u4 total = 0; - for (UINT i = 0; i < recList.size(); i++) + for (u4 i = 0; i < recList.size(); i++) { if (recList[i]->getNew()) ++total; } - for(UINT i = 0; i < dirList.size(); i++) + for(u4 i = 0; i < dirList.size(); i++) { total += dirList[i]->getNumNewRecordings(); } @@ -91,5 +91,5 @@ void Directory::sort(bool chronoSortOrder) std::sort(recList.begin(), recList.end(), RecordingSorterAlpha()); // Now get the dirs to sort themselves! oh I love recursion. - for(UINT i = 0; i < dirList.size(); i++) dirList[i]->sort(chronoSortOrder); + for(u4 i = 0; i < dirList.size(); i++) dirList[i]->sort(chronoSortOrder); } diff --git a/src/draintarget.h b/src/draintarget.h index 747ce61..b1d2074 100644 --- a/src/draintarget.h +++ b/src/draintarget.h @@ -94,7 +94,7 @@ class DrainTarget // samplepos is equal to the number of bytes from the first MediaPacket // in the list that have already been consumed in a previous call. - virtual void PrepareMediaSample(const MediaPacketList&, UINT samplepos)=0; + virtual void PrepareMediaSample(const MediaPacketList&, u4 samplepos)=0; // The Stream guarantees that the value of *samplepos passed to // DeliverMediaSample will be equal to the value of samplepos passed to @@ -108,7 +108,7 @@ class DrainTarget // processed from packet X (usually zero). // It is allowed, that the draintarget modifies the part of the buffer, which belongs // to the mediapackets it is processing. - virtual UINT DeliverMediaSample(UCHAR* buffer, UINT *samplepos)=0; + virtual u4 DeliverMediaSample(UCHAR* buffer, u4 *samplepos)=0; // The drain target might advice the feeder about free buffers with threadSignal diff --git a/src/dsallocator.cc b/src/dsallocator.cc index 23dde11..f5d14b1 100644 --- a/src/dsallocator.cc +++ b/src/dsallocator.cc @@ -540,8 +540,8 @@ void DsAllocator::RenegotiateEVRMediaType() mixtype->Release(); continue; } - UINT32 helper; - mixtype->GetUINT32(MF_MT_INTERLACE_MODE,&helper); + u432 helper; + mixtype->Getu432(MF_MT_INTERLACE_MODE,&helper); if (helper!=MFVideoInterlace_Progressive) { Log::getInstance()->log("DsAllocator", Log::DEBUG , "Skip media type interlaced!"); mixtype->Release(); @@ -599,7 +599,7 @@ void DsAllocator::AllocateEVRSurfaces() { LARGE_INTEGER temp64; - mfmediatype->GetUINT64(MF_MT_FRAME_SIZE, (UINT64*)&temp64); + mfmediatype->Getu464(MF_MT_FRAME_SIZE, (u464*)&temp64); vwidth=temp64.HighPart; vheight=temp64.LowPart; GUID subtype; diff --git a/src/dssourcefilter.h b/src/dssourcefilter.h index ec83b2d..032679b 100644 --- a/src/dssourcefilter.h +++ b/src/dssourcefilter.h @@ -25,8 +25,8 @@ #include "dssourcepin.h" struct mptype_video_detail{ //here should be all information added the Video Draintarget needs for rendering, to be extended in the future - UINT width; - UINT height; + u4 width; + u4 height; }; [uuid("EB87AB22-7A95-49c3-8CCE-2F6D61A87009")] diff --git a/src/dvbsubtitles.cc b/src/dvbsubtitles.cc index 4ed60ab..c5f74b5 100644 --- a/src/dvbsubtitles.cc +++ b/src/dvbsubtitles.cc @@ -132,7 +132,7 @@ const u4 DVBSubtitleCLUT::defaultPalette8[256] = { 0xFF55557F, 0xFF7F557F, 0xFF557F7F, 0xFF7F7F7F, // 1111 1100 }; -void DVBSubtitleCLUT::setEntry(int bpp, UINT index, UCHAR Y, UCHAR Cr, UCHAR Cb, UCHAR T) +void DVBSubtitleCLUT::setEntry(int bpp, u4 index, UCHAR Y, UCHAR Cr, UCHAR Cb, UCHAR T) { UCHAR Y2 = Y; UCHAR A; @@ -161,7 +161,7 @@ DVBSubtitleRegion::DVBSubtitleRegion() CLUTid(0) {} -void DVBSubtitleRegion::setDepth(UINT d) +void DVBSubtitleRegion::setDepth(u4 d) { if (d < 4) palette.setBpp(1 << d); } @@ -209,13 +209,13 @@ DVBSubtitleDisplayDefinition::DVBSubtitleDisplayDefinition() class DVBSubtitleObject { private: - UINT objectID; + u4 objectID; UCHAR nonModColourFlag; struct RegionRef { DVBSubtitleRegion* region; - UINT horizontalPosition; - UINT verticalPosition; + u4 horizontalPosition; + u4 verticalPosition; }; typedef std::vector UseList; UseList useList; @@ -224,21 +224,21 @@ class DVBSubtitleObject UCHAR map4to8[16]; void initMapTables(); UCHAR* currentMapTable; - UINT bitPos; - void drawLine(const RegionRef& use, UINT x, UINT y, UCHAR colour, UINT len); - UCHAR get2Bits(const UCHAR* data, UINT& index); - UCHAR get4Bits(const UCHAR* data, UINT& index); - bool decode2BppCodeString(const UCHAR* data, UINT& index, const struct RegionRef& use, UINT& x, UINT y); - bool decode4BppCodeString(const UCHAR* data, UINT& index, const struct RegionRef& use, UINT& x, UINT y); - bool decode8BppCodeString(const UCHAR* data, UINT& index, const struct RegionRef& use, UINT& x, UINT y); + u4 bitPos; + void drawLine(const RegionRef& use, u4 x, u4 y, UCHAR colour, u4 len); + UCHAR get2Bits(const UCHAR* data, u4& index); + UCHAR get4Bits(const UCHAR* data, u4& index); + bool decode2BppCodeString(const UCHAR* data, u4& index, const struct RegionRef& use, u4& x, u4 y); + bool decode4BppCodeString(const UCHAR* data, u4& index, const struct RegionRef& use, u4& x, u4 y); + bool decode8BppCodeString(const UCHAR* data, u4& index, const struct RegionRef& use, u4& x, u4 y); public: - DVBSubtitleObject(UINT id = 0); + DVBSubtitleObject(u4 id = 0); void setNonModColourFlag(UCHAR flag) { nonModColourFlag = flag; } void findWhereUsed(DVBSubtitlePage&); - void decodeSubBlock(const UCHAR* data, UINT length, bool even); + void decodeSubBlock(const UCHAR* data, u4 length, bool even); }; -DVBSubtitleObject::DVBSubtitleObject(UINT id) +DVBSubtitleObject::DVBSubtitleObject(u4 id) : objectID(id), nonModColourFlag(0), currentMapTable(NULL), @@ -278,17 +278,17 @@ void DVBSubtitleObject::findWhereUsed(DVBSubtitlePage& page) } } -void DVBSubtitleObject::drawLine(const RegionRef& use, UINT x, UINT y, - UCHAR colour, UINT len) +void DVBSubtitleObject::drawLine(const RegionRef& use, u4 x, u4 y, + UCHAR colour, u4 len) { if (nonModColourFlag && colour == 1) return; x += use.horizontalPosition; y += use.verticalPosition; - for (UINT pos = x; pos < x + len; ++pos) + for (u4 pos = x; pos < x + len; ++pos) use.region->setIndex(pos, y, colour); } -UCHAR DVBSubtitleObject::get2Bits(const UCHAR* data, UINT& index) +UCHAR DVBSubtitleObject::get2Bits(const UCHAR* data, u4& index) { UCHAR result = data[index]; if (!bitPos) @@ -300,7 +300,7 @@ UCHAR DVBSubtitleObject::get2Bits(const UCHAR* data, UINT& index) return (result >> bitPos) & 0x03; } -UCHAR DVBSubtitleObject::get4Bits(const UCHAR* data, UINT& index) +UCHAR DVBSubtitleObject::get4Bits(const UCHAR* data, u4& index) { UCHAR result = data[index]; if (!bitPos) @@ -316,9 +316,9 @@ UCHAR DVBSubtitleObject::get4Bits(const UCHAR* data, UINT& index) return result & 0x0F; } -bool DVBSubtitleObject::decode2BppCodeString(const UCHAR* data, UINT& index, const struct RegionRef& use, UINT& x, UINT y) +bool DVBSubtitleObject::decode2BppCodeString(const UCHAR* data, u4& index, const struct RegionRef& use, u4& x, u4 y) { - UINT rl = 0, colour = 0; + u4 rl = 0, colour = 0; UCHAR code = get2Bits(data, index); if (code) { @@ -361,9 +361,9 @@ bool DVBSubtitleObject::decode2BppCodeString(const UCHAR* data, UINT& index, con return true; } -bool DVBSubtitleObject::decode4BppCodeString(const UCHAR* data, UINT& index, const struct RegionRef& use, UINT& x, UINT y) +bool DVBSubtitleObject::decode4BppCodeString(const UCHAR* data, u4& index, const struct RegionRef& use, u4& x, u4 y) { - UINT rl = 0, colour = 0; + u4 rl = 0, colour = 0; UCHAR code = get4Bits(data, index); if (code) { @@ -412,9 +412,9 @@ bool DVBSubtitleObject::decode4BppCodeString(const UCHAR* data, UINT& index, con return true; } -bool DVBSubtitleObject::decode8BppCodeString(const UCHAR* data, UINT& index, const struct RegionRef& use, UINT& x, UINT y) +bool DVBSubtitleObject::decode8BppCodeString(const UCHAR* data, u4& index, const struct RegionRef& use, u4& x, u4 y) { - UINT rl = 0, colour = 0; + u4 rl = 0, colour = 0; UCHAR code = data[index++]; if (code) { @@ -435,12 +435,12 @@ bool DVBSubtitleObject::decode8BppCodeString(const UCHAR* data, UINT& index, con return true; } -void DVBSubtitleObject::decodeSubBlock(const UCHAR* data, UINT length, bool even) +void DVBSubtitleObject::decodeSubBlock(const UCHAR* data, u4 length, bool even) { UseList::const_iterator use; for (use = useList.begin(); use != useList.end(); ++use) { - UINT x = 0; UINT y = even ? 0 : 1; UINT index = 0; + u4 x = 0; u4 y = even ? 0 : 1; u4 index = 0; while (index < length) { switch (data[index++]) @@ -534,18 +534,18 @@ void DVBSubtitles::put(const PESPacket& packet) bool DVBSubtitles::decodePacket(const PESPacket& packet) { const UCHAR* data = packet.getData(); - UINT packetSize = packet.getSize(); + u4 packetSize = packet.getSize(); if (packetSize < 9) return false; - UINT segmentOffset = data[8] + 11; + u4 segmentOffset = data[8] + 11; while (packetSize > segmentOffset) { if (data[segmentOffset] == 0xFF) return true; // 'End of PES' marker if (data[segmentOffset] != 0x0F) return false; // Out of sync if (packetSize <= segmentOffset + 5) return false; // Packet truncated UCHAR segmentType = data[segmentOffset + 1]; - UINT pageID = (data[segmentOffset + 2] << 8) + u4 pageID = (data[segmentOffset + 2] << 8) + data[segmentOffset + 3]; - UINT segmentLength = (data[segmentOffset + 4] << 8) + u4 segmentLength = (data[segmentOffset + 4] << 8) + data[segmentOffset + 5]; if (pageOnDisplay == 65536) pageOnDisplay = pageID; if (pageOnDisplay != pageID) return false; @@ -568,7 +568,7 @@ bool DVBSubtitles::decodePacket(const PESPacket& packet) page.version = pageVersion; page.timeout = segmentData[0]; page.pendingDisplay.clear(); - UINT parsePos = 2; + u4 parsePos = 2; while (segmentLength > parsePos + 5) { UCHAR regionID = segmentData[parsePos]; @@ -596,8 +596,8 @@ bool DVBSubtitles::decodePacket(const PESPacket& packet) if (regionVersion == region.version) break; // No update region.version = regionVersion; bool regionFillFlag = (segmentData[1] & 0x08) >> 3; - UINT regionWidth = (segmentData[2] << 8) + segmentData[3]; - UINT regionHeight = (segmentData[4] << 8) + segmentData[5]; + u4 regionWidth = (segmentData[2] << 8) + segmentData[3]; + u4 regionHeight = (segmentData[4] << 8) + segmentData[5]; region.setSize(regionWidth, regionHeight); region.level = (segmentData[6] & 0xE0) >> 5; region.setDepth((segmentData[6] & 0x1C) >> 2); @@ -614,14 +614,14 @@ bool DVBSubtitles::decodePacket(const PESPacket& packet) case 8: region.setAllIndices(segmentData[8]); break; } region.objects.clear(); - UINT parsePos = 10; + u4 parsePos = 10; while (segmentLength > parsePos + 5) { - UINT objectID = (segmentData[parsePos] << 8) + + u4 objectID = (segmentData[parsePos] << 8) + segmentData[parsePos + 1]; DVBSubtitleRegion::ObjectRef objref; objref.objectID = objectID; - UINT objectType = (segmentData[parsePos + 2] & 0xC0) >> 6; + u4 objectType = (segmentData[parsePos + 2] & 0xC0) >> 6; objref.horizontalPosition = ((segmentData[parsePos + 2] & 0x0F) << 8) + segmentData[parsePos + 3]; objref.verticalPosition = ((segmentData[parsePos + 4] & 0x0F) << 8) + @@ -643,7 +643,7 @@ bool DVBSubtitles::decodePacket(const PESPacket& packet) UCHAR clutVersion = (segmentData[1] & 0xF0) >> 4; if (clutVersion == clut.version) break; // No update clut.version = clutVersion; - UINT parsePos = 2; + u4 parsePos = 2; while (segmentLength > parsePos + 3) { UCHAR clutEntryID = segmentData[parsePos]; @@ -677,7 +677,7 @@ bool DVBSubtitles::decodePacket(const PESPacket& packet) case 0x13: // Object data { if (segmentLength < 3) break; - UINT objectID = (segmentData[0] << 8) + segmentData[1]; + u4 objectID = (segmentData[0] << 8) + segmentData[1]; DVBSubtitleObject object(objectID); object.findWhereUsed(page); UCHAR codingMethod = (segmentData[2] & 0x0C) >> 2; @@ -685,8 +685,8 @@ bool DVBSubtitles::decodePacket(const PESPacket& packet) if (codingMethod == 0x00) // Coding of pixels { if (segmentLength < 7) break; - UINT topFieldLen = (segmentData[3] << 8) + segmentData[4]; - UINT bottomFieldLen = (segmentData[5] << 8) + segmentData[6]; + u4 topFieldLen = (segmentData[3] << 8) + segmentData[4]; + u4 bottomFieldLen = (segmentData[5] << 8) + segmentData[6]; if (segmentLength < 7 + topFieldLen + bottomFieldLen) break; object.decodeSubBlock(segmentData + 7, topFieldLen, true); if (bottomFieldLen) @@ -703,7 +703,7 @@ bool DVBSubtitles::decodePacket(const PESPacket& packet) } case 0x14: {// Display definition if (segmentLength<5) break; - UINT ddsversion=(segmentData[0]&0xf0)>>4; + u4 ddsversion=(segmentData[0]&0xf0)>>4; if (ddsversion==dds.version) break; // no update ncessary dds.version=ddsversion; dds.displaywindow=!(!(segmentData[0]&0x08)); diff --git a/src/dvbsubtitles.h b/src/dvbsubtitles.h index 242396a..1edad83 100644 --- a/src/dvbsubtitles.h +++ b/src/dvbsubtitles.h @@ -45,7 +45,7 @@ class DVBSubtitleCLUT DVBSubtitleCLUT(); UCHAR CLUTid; UCHAR version; - void setEntry(int bpp, UINT index, UCHAR Y, UCHAR Cr, UCHAR Cb, UCHAR T); + void setEntry(int bpp, u4 index, UCHAR Y, UCHAR Cr, UCHAR Cb, UCHAR T); const Palette& getPalette(int bpp) const; private: Palette palette2; @@ -63,12 +63,12 @@ class DVBSubtitleRegion : public Bitmap UCHAR version; UCHAR level; UCHAR CLUTid; - void setDepth(UINT); + void setDepth(u4); struct ObjectRef { - UINT objectID; - UINT horizontalPosition; - UINT verticalPosition; + u4 objectID; + u4 horizontalPosition; + u4 verticalPosition; }; typedef std::vector ObjectList; ObjectList objects; @@ -81,14 +81,14 @@ class DVBSubtitlePage u8 pts; bool dirty; UCHAR version; - UINT timeout; + u4 timeout; UCHAR state; bool serviceAcquired; typedef std::map CLUTMap; CLUTMap CLUTs; typedef std::map RegionMap; RegionMap regions; - struct Coords { UINT x; UINT y; }; + struct Coords { u4 x; u4 y; }; typedef std::map DisplayMap; DisplayMap currentDisplay; DisplayMap pendingDisplay; @@ -125,9 +125,9 @@ class DVBSubtitles private: OSDReceiver* osd; std::deque worklist; - typedef std::map PageMap; + typedef std::map PageMap; PageMap pages; - UINT pageOnDisplay; + u4 pageOnDisplay; bool decodePacket(const PESPacket&); void finishPage(const DVBSubtitlePage&); void clearDisplayedPages(); diff --git a/src/event.cc b/src/event.cc index 47f2ba1..5ba1af5 100644 --- a/src/event.cc +++ b/src/event.cc @@ -30,7 +30,7 @@ static const char* TAG = "Event"; MovieInfo* Event::movieInfo = NULL; SeriesInfo* Event::seriesInfo = NULL; -void Event::loadinfos(UINT channelid) +void Event::loadinfos(u4 channelid) { VDR* vdr = VDR::getInstance(); if (movieInfo) delete movieInfo; diff --git a/src/event.h b/src/event.h index 87fbab3..cbfd26c 100644 --- a/src/event.h +++ b/src/event.h @@ -30,7 +30,7 @@ class SeriesInfo; class Event { public: - void loadinfos(UINT channelid); + void loadinfos(u4 channelid); u4 id{}; u4 time{}; diff --git a/src/imageomx.cc b/src/imageomx.cc index 27d13fc..7076a9d 100644 --- a/src/imageomx.cc +++ b/src/imageomx.cc @@ -722,7 +722,7 @@ int ImageOMX::DestroyInputBufsOMX() //call with clock mutex locked OMX_ERRORTYPE error; input_bufs_omx_mutex.lock(); - for (UINT i=0; i< input_bufs_omx_all.size();i++) { + for (u4 i=0; i< input_bufs_omx_all.size();i++) { LogNT::getInstance()->debug(TAG, "OMX_FreeBuffer mark"); //if (input_bufs_omx_all[i]->pBuffer) free(input_bufs_omx_all[i]->pBuffer); input_bufs_omx_all[i]->pBuffer=NULL; diff --git a/src/imagereader.cc b/src/imagereader.cc index 6347b23..3f0727f 100644 --- a/src/imagereader.cc +++ b/src/imagereader.cc @@ -220,7 +220,7 @@ void ImageReader::call(void *) { } // the real entry for receiving data -int ImageReader::getImageChunk(u8 offset,UINT len, UINT * rsize, UCHAR **buffer){ +int ImageReader::getImageChunk(u8 offset,u4 len, u4 * rsize, UCHAR **buffer){ logger->log("ImageReader", Log::DEBUG, "request chunk offset=%llu, len=%u",offset,len); threadLock(); *buffer=NULL; diff --git a/src/imagereader.h b/src/imagereader.h index 92edca9..3581992 100644 --- a/src/imagereader.h +++ b/src/imagereader.h @@ -53,7 +53,7 @@ class ImageReader : public Thread_TYPE, public Callback //rsize will return the received len: 0 on EOF, -1 on error //the returned buffer has to be freed outside (really use free!) //if the buffer is not filled it will wait until the chunk is received! - int getImageChunk(u8 offset,UINT len, UINT * rsize,UCHAR **buffer); + int getImageChunk(u8 offset,u4 len, u4 * rsize,UCHAR **buffer); //is the reader still running? bool isReaderRunning(); @@ -94,7 +94,7 @@ class ImageReader : public Thread_TYPE, public Callback public: UCHAR * buffer; //receive buffer (to be deallocated with free) u8 offset; //offset within stream/file - UINT reqlen; //requested len + u4 reqlen; //requested len u4 len; //received len rstate state; //current state Chunk() { diff --git a/src/inputlirc.cc b/src/inputlirc.cc index 0e786e6..ec13e70 100644 --- a/src/inputlirc.cc +++ b/src/inputlirc.cc @@ -211,7 +211,7 @@ void InputLIRC::listenLoop() bool InputLIRC::parse(const std::string& input, std::string& remoteName, std::string& remoteButton, int& repeatCount) { - UINT pos{}, found{}; + u4 pos{}, found{}; found = input.find(" ", pos); if (found == std::string::npos) return false; pos = found + 1; // pos at 00 diff --git a/src/inputudp.cc b/src/inputudp.cc index b8750dc..0ab47b0 100644 --- a/src/inputudp.cc +++ b/src/inputudp.cc @@ -145,14 +145,14 @@ void InputUDP::listenLoop() } } -void InputUDP::processRequest(const void* data, UINT length) +void InputUDP::processRequest(const void* data, u4 length) { log->debug(TAG, "Got request"); char* temp = new char[length + 1]; memcpy(temp, data, length); temp[length] = '\0'; - UINT command = static_cast(atoi(temp)); + u4 command = static_cast(atoi(temp)); delete[] temp; log->debug(TAG, "Command {} recieved", command); diff --git a/src/inputudp.h b/src/inputudp.h index 3d866b3..2b3fa12 100644 --- a/src/inputudp.h +++ b/src/inputudp.h @@ -68,7 +68,7 @@ class InputUDP : public Input int pfds[2]; #endif - void processRequest(const void* data, UINT length); + void processRequest(const void* data, u4 length); }; #endif diff --git a/src/inputwin.cc b/src/inputwin.cc index 60ad702..a0c4b1f 100644 --- a/src/inputwin.cc +++ b/src/inputwin.cc @@ -291,7 +291,7 @@ std::string InputWin::getHardwareKeyName(HWC_TYPE hardwareKey) return retval; } -int InputWin::ReceiveButtonVK(UINT button) +int InputWin::ReceiveButtonVK(u4 button) { /* UCHAR pb=NA_NONE; //should we use a translation table ? No APPCOMMAND iS DWORD! @@ -373,7 +373,7 @@ int InputWin::ReceiveButtonVK(UINT button) return 1; */ } -int InputWin::ReceiveButtonCH(UINT button) +int InputWin::ReceiveButtonCH(u4 button) { UCHAR pb = TranslateHWC(W_G_HCW(W_HCW_CH,button)); if (pb==NA_UNKNOWN || pb==NA_NONE) return 0; @@ -389,7 +389,7 @@ int InputWin::ReceiveButtonCH(UINT button) return 1; */ } -int InputWin::ReceiveButtonAP(UINT button) +int InputWin::ReceiveButtonAP(u4 button) { /* UCHAR pb=NA_NONE; //should we use a translation table ? No APPCOMMAND iS DWORD! @@ -460,7 +460,7 @@ int InputWin::ReceiveButtonAP(UINT button) return 1; */ } -int InputWin::ReceiveButtonRI(UINT button) +int InputWin::ReceiveButtonRI(u4 button) { //UCHAR pb=NA_NONE; //Raw Input diff --git a/src/inputwin.h b/src/inputwin.h index f664230..587c984 100644 --- a/src/inputwin.h +++ b/src/inputwin.h @@ -38,10 +38,10 @@ class InputWin : public Input //int getDevice(); //UCHAR getButtonPress(int how); // void Signal(); - int ReceiveButtonVK(UINT button); //Windows Message from WND_PROC (Virtual Key) - int ReceiveButtonCH(UINT button); //Windows Message from WND_PROC (char) - int ReceiveButtonAP(UINT button); // (App command) - int ReceiveButtonRI(UINT button); // (Remote control) + int ReceiveButtonVK(u4 button); //Windows Message from WND_PROC (Virtual Key) + int ReceiveButtonCH(u4 button); //Windows Message from WND_PROC (char) + int ReceiveButtonAP(u4 button); // (App command) + int ReceiveButtonRI(u4 button); // (Remote control) void InitHWCListwithDefaults(); const char* getHardCodedHardwareKeyNameForVompKey(UCHAR vompKey); std::string getHardwareKeyName(HWC_TYPE hardwareKey); diff --git a/src/media.cc b/src/media.cc index 903cd34..04b757d 100644 --- a/src/media.cc +++ b/src/media.cc @@ -386,7 +386,7 @@ MediaList::~MediaList() { } void MediaList::emptyList(){ if (_owning) { - for (UINT i = 0; i < size(); i++) + for (u4 i = 0; i < size(); i++) { delete (*this)[i]; } diff --git a/src/mediaoptions.cc b/src/mediaoptions.cc index 8bbde18..902455f 100644 --- a/src/mediaoptions.cc +++ b/src/mediaoptions.cc @@ -73,7 +73,7 @@ bool MediaOptions::externSaveOptionstoServer() { bool rt=true; Log::getInstance()->log("MediaOptions", Log::DEBUG, "save for %i options", myOptions.size()); - for (UINT i = 0; i < myOptions.size(); i++) + for (u4 i = 0; i < myOptions.size(); i++) { if (! saveOption(myOptions[i])) rt=false; @@ -151,7 +151,7 @@ int MediaOptions::getIntOption(const char * name) { Log::getInstance()->log("MediaOptions",Log::DEBUG,"option value for %s is %d",name,rt); return rt; } -bool MediaOptions::setIntOption(const char * name, UINT value) { +bool MediaOptions::setIntOption(const char * name, u4 value) { Option *o=findOption(name); if (!o) return false; if (! o->optionType == Option::TYPE_INT) return false; @@ -164,7 +164,7 @@ bool MediaOptions::setStringOption(const char * name, const char * value) { if (!o) return false; if (! o->optionType == Option::TYPE_TEXT) return false; bool rt=false; - for (UINT i = 0; i < o->numChoices; i++) { + for (u4 i = 0; i < o->numChoices; i++) { if (!STRCASECMP(value, o->options[i])) { o->configChoice = i; diff --git a/src/mediaoptions.h b/src/mediaoptions.h index a64c764..1f13295 100644 --- a/src/mediaoptions.h +++ b/src/mediaoptions.h @@ -47,7 +47,7 @@ class MediaOptions: AbstractOption const char * getStringOption(const char * name); int getIntOption(const char * name); bool setStringOption(const char * name, const char * value) ; - bool setIntOption(const char * name, UINT value) ; + bool setIntOption(const char * name, u4 value) ; private: bool saveOption(Option *option); std::vector myOptions; diff --git a/src/option.cc b/src/option.cc index a44a361..2870713 100644 --- a/src/option.cc +++ b/src/option.cc @@ -21,8 +21,8 @@ #include "option.h" #include "vdr.h" -Option::Option(UINT ID, const char* DISPLAYTEXT, const char* CONFIGSECTION, const char* CONFIGKEY, UCHAR OPTIONTYPE, - UINT NUMCHOICES, UINT DEFAULTCHOICE, UINT STARTINT, +Option::Option(u4 ID, const char* DISPLAYTEXT, const char* CONFIGSECTION, const char* CONFIGKEY, UCHAR OPTIONTYPE, + u4 NUMCHOICES, u4 DEFAULTCHOICE, u4 STARTINT, const char * const * OPTIONS, const char * const * OPTIONKEYS, bool DELETESTRINGS, AbstractOption* handler) : id(ID), displayText(DISPLAYTEXT), configSection(CONFIGSECTION), configKey(CONFIGKEY), optionType(OPTIONTYPE), numChoices(NUMCHOICES), defaultChoice(DEFAULTCHOICE), startInt(STARTINT), @@ -40,7 +40,7 @@ Option::Option(UINT ID, const char* DISPLAYTEXT, const char* CONFIGSECTION, cons { const char * const * list; list = (optionType == TYPE_TEXT) ? options : optionkeys; - for (UINT i = 0; i < numChoices; i++) + for (u4 i = 0; i < numChoices; i++) { if (!STRCASECMP(config, list[i])) { @@ -60,7 +60,7 @@ Option::~Option() { if (deletestrings && (optionType == TYPE_TEXT)) { - for (UINT i = 0; i < numChoices; i++) + for (u4 i = 0; i < numChoices; i++) { delete[] options[i]; } diff --git a/src/option.h b/src/option.h index fa420bb..f848afe 100644 --- a/src/option.h +++ b/src/option.h @@ -33,26 +33,26 @@ typedef std::vector Options; class Option { public: - Option(UINT id, const char* displayText, const char* configSection, const char* configKey, UCHAR optionType, - UINT numChoices, UINT defaultChoice, UINT startInt, + Option(u4 id, const char* displayText, const char* configSection, const char* configKey, UCHAR optionType, + u4 numChoices, u4 defaultChoice, u4 startInt, const char * const * options, const char * const * optionkeys = NULL, bool deletestrings = false, AbstractOption* handler = NULL); ~Option(); - UINT id; + u4 id; const char* displayText; const char* configSection; const char* configKey; UCHAR optionType; - UINT numChoices; - UINT defaultChoice; + u4 numChoices; + u4 defaultChoice; int startInt; const char * const * options; const char * const * optionkeys; bool deletestrings; AbstractOption* opthandler; - UINT configChoice; - UINT userSetChoice; + u4 configChoice; + u4 userSetChoice; const static UCHAR TYPE_TEXT = 1; const static UCHAR TYPE_INT = 2; diff --git a/src/osdopenvg.cc b/src/osdopenvg.cc index 541a76e..5f5d023 100644 --- a/src/osdopenvg.cc +++ b/src/osdopenvg.cc @@ -578,7 +578,7 @@ void OsdOpenVG::renderLoop() } } -UINT OsdOpenVG::putOpenVGCommand(OpenVGCommand& comm, bool wait) +u4 OsdOpenVG::putOpenVGCommand(OpenVGCommand& comm, bool wait) { if (wait) comm.response = new OpenVGResponse; @@ -601,7 +601,7 @@ UINT OsdOpenVG::putOpenVGCommand(OpenVGCommand& comm, bool wait) // Now response->done = true, mutex is locked, we have been signalled ul.unlock(); - UINT toReturn = comm.response->result; + u4 toReturn = comm.response->result; delete comm.response; return toReturn; } @@ -620,7 +620,7 @@ bool OsdOpenVG::processOpenVGCommands() taskmutex.unlock(); vgmutex.lock(); - UINT vgResult = handleOpenVGCommand(comm); + u4 vgResult = handleOpenVGCommand(comm); vgmutex.unlock(); taskmutex.lock(); diff --git a/src/osdopenvg.h b/src/osdopenvg.h index faeef60..58aa051 100644 --- a/src/osdopenvg.h +++ b/src/osdopenvg.h @@ -62,7 +62,7 @@ enum OpenVGTask struct OpenVGResponse { bool done{}; - UINT result; + u4 result; std::condition_variable doneCond; }; diff --git a/src/osdreceiver.h b/src/osdreceiver.h index 37f41dc..9277a1d 100644 --- a/src/osdreceiver.h +++ b/src/osdreceiver.h @@ -26,9 +26,9 @@ class DisplayRegion; class OSDReceiver { public: - virtual void drawOSDBitmap(UINT posX, UINT posY, const Bitmap&, const DisplayRegion& region)=0; + virtual void drawOSDBitmap(u4 posX, u4 posY, const Bitmap&, const DisplayRegion& region)=0; virtual void clearOSD()=0; - virtual void clearOSDArea(UINT posX, UINT posY, UINT width, UINT height, const DisplayRegion& region)=0; + virtual void clearOSDArea(u4 posX, u4 posY, u4 width, u4 height, const DisplayRegion& region)=0; }; #endif diff --git a/src/osdwinvector.cc b/src/osdwinvector.cc index bf661f7..74be676 100644 --- a/src/osdwinvector.cc +++ b/src/osdwinvector.cc @@ -613,8 +613,8 @@ int OsdWinVector::loadFont(bool newfont) Log::getInstance()->log("OSD", Log::WARN, "Could not get System Font Collection!"); return 0; } - UINT num_font = fontcol->GetFontFamilyCount(); - for (UINT i = 0; i < num_font; i++) { + u4 num_font = fontcol->GetFontFamilyCount(); + for (u4 i = 0; i < num_font; i++) { IDWriteFontFamily * family=NULL; if (fontcol->GetFontFamily(i, &family)!=S_OK) continue; IDWriteLocalizedStrings* fam_name=NULL; @@ -622,11 +622,11 @@ int OsdWinVector::loadFont(bool newfont) family->Release(); continue; } - UINT32 id = 0; + u432 id = 0; BOOL exist = false; if (fam_name->FindLocaleName(L"en-us", &id, &exist) == S_OK) { if (!exist) id = 0; - UINT32 strlen=0; + u432 strlen=0; fam_name->GetStringLength(id, &strlen); wchar_t * stringbuf = new wchar_t[strlen + 1]; @@ -675,9 +675,9 @@ int OsdWinVector::loadFont(bool newfont) fontaspect_corr = ((float)OSD_BUFFER_HEIGHT) / ((float)OSD_BUFFER_WIDTH) * 720.f / 576.f; - for (UINT32 i = 0; i<256; i++) { + for (u432 i = 0; i<256; i++) { DWRITE_GLYPH_METRICS glyph_metrics; - UINT16 glyph_index; + u416 glyph_index; fontface->GetGlyphIndices(&i, 1, &glyph_index); HRESULT hres=fontface->GetDesignGlyphMetrics(&glyph_index, 1, &glyph_metrics, FALSE); @@ -937,8 +937,8 @@ void OsdWinVector::executeDrawCommand(SVGCommand & command) matrix = D2D1::Matrix3x2F::Scale(fontaspect_corr, 1.f)* D2D1::Matrix3x2F::Translation(command.x, command.y + fontzero)*save_matrix; currentosd_backbuffer.rendtarget2D->SetTransform(matrix); - UINT32 tchar = command.target.textchar; - UINT16 glyphindex; + u432 tchar = command.target.textchar; + u416 glyphindex; DWRITE_GLYPH_RUN glyph_run; glyph_run.fontEmSize = 13.f / (74.f / 96.f); glyph_run.fontFace=fontface; @@ -1058,8 +1058,8 @@ float OsdWinVector::getCharWidth(wchar_t c) DWRITE_GLYPH_METRICS glyph_metrics; - UINT16 glyph_index; - UINT32 tchar = c; + u416 glyph_index; + u432 tchar = c; fontface->GetGlyphIndices(&tchar, 1, &glyph_index); fontface->GetDesignGlyphMetrics(&glyph_index, 1, &glyph_metrics, FALSE); @@ -1314,8 +1314,8 @@ VectorHandleImage OsdWinVector::createImagePalette(int width, int height, const LockOsdDrawing(); int x, y; - UINT32 *mem = (UINT32*)malloc(width*height*sizeof(UINT32)); - UINT32 *memrun = mem; + u432 *mem = (u432*)malloc(width*height*sizeof(u432)); + u432 *memrun = mem; const unsigned char* image_run = image_data; for (y = 0; y < height; y++) { @@ -1337,7 +1337,7 @@ VectorHandleImage OsdWinVector::createImagePalette(int width, int height, const ID2D1Bitmap *bitmap = NULL; - HRESULT hres = currentosd_backbuffer.rendtarget2D->CreateBitmap(size, mem, width*sizeof(UINT32), bitmap_prop, &bitmap); + HRESULT hres = currentosd_backbuffer.rendtarget2D->CreateBitmap(size, mem, width*sizeof(u432), bitmap_prop, &bitmap); if (hres != S_OK) { Log::getInstance()->log("OsdWinVector", Log::DEBUG, "CreateBitmap failed %d", hres); diff --git a/src/playermedia.cc b/src/playermedia.cc index 85cc508..f5ce5cf 100644 --- a/src/playermedia.cc +++ b/src/playermedia.cc @@ -561,8 +561,8 @@ void PlayerMedia::threadMethod() MediaPacketList pl; pl.push_back(p); audio->PrepareMediaSample(pl,0); - UINT bytesWritten=0; - UINT rt=audio->DeliverMediaSample(threadBuffer,&bytesWritten); + u4 bytesWritten=0; + u4 rt=audio->DeliverMediaSample(threadBuffer,&bytesWritten); u4 written=thisRead; if (rt == 0) written=bytesWritten; diff --git a/src/playerradiorec.cc b/src/playerradiorec.cc index a414bef..d51d722 100644 --- a/src/playerradiorec.cc +++ b/src/playerradiorec.cc @@ -78,7 +78,7 @@ bool PlayerRadioRec::init(u8 tlengthBytes, u4 tlengthFrames, bool isPesRecording logger->debug(TAG, "PlayerRadioRec has received length bytes of {}", lengthBytes); - UINT thisRead = 0; + u4 thisRead = 0; int success; UCHAR* buffer = vdr->getBlock(0, 10000, &thisRead); @@ -116,7 +116,7 @@ bool PlayerRadioRec::setLengthSeconds() { int success; u8 endPTS = 0; - UINT thisRead = 0; + u4 thisRead = 0; UCHAR* buffer = vdr->getBlock(lengthBytes - 10000, 10000, &thisRead); if (!buffer) { @@ -237,7 +237,7 @@ void PlayerRadioRec::jumpToPercent(double percent) stateLock.unlock(); } -void PlayerRadioRec::skipForward(UINT seconds) +void PlayerRadioRec::skipForward(u4 seconds) { std::lock_guard lg(stateLock); logger->debug(TAG, "SKIP FORWARD {} SECONDS", seconds); @@ -252,7 +252,7 @@ void PlayerRadioRec::skipForward(UINT seconds) else switchState(S_JUMP, newFrame); } -void PlayerRadioRec::skipBackward(UINT seconds) +void PlayerRadioRec::skipBackward(u4 seconds) { std::lock_guard lg(stateLock); logger->debug(TAG, "SKIP BACKWARD {} SECONDS", seconds); @@ -436,7 +436,7 @@ void PlayerRadioRec::threadMethod() if (state != S_PLAY) return; u8 feedPosition; - UINT thisRead, writeLength, thisWrite, askFor; + u4 thisRead, writeLength, thisWrite, askFor; time_t lastRescan = time(NULL); feedPosition = vdr->positionFromFrameNumber(currentFrameNumber); @@ -476,14 +476,14 @@ void PlayerRadioRec::threadMethod() if (startup) { if (startupBlockSize > lengthBytes) - askFor = static_cast(lengthBytes); // is a very small recording! + askFor = static_cast(lengthBytes); // is a very small recording! else askFor = startupBlockSize; // normal, but a startup sized block to detect all the audio streams } else { if ((feedPosition + blockSize) > lengthBytes) // last block of recording - askFor = static_cast(lengthBytes - feedPosition); + askFor = static_cast(lengthBytes - feedPosition); else // normal askFor = blockSize; } diff --git a/src/playerradiorec.h b/src/playerradiorec.h index 524b686..0ac8b60 100644 --- a/src/playerradiorec.h +++ b/src/playerradiorec.h @@ -58,8 +58,8 @@ class PlayerRadioRec : public Callback void pause(); void playpause(); void jumpToPercent(double percent); - void skipForward(UINT seconds); - void skipBackward(UINT seconds); + void skipForward(u4 seconds); + void skipBackward(u4 seconds); UCHAR getState() { return state; } u4 getCurrentSeconds(); @@ -112,8 +112,8 @@ class PlayerRadioRec : public Callback u8 lengthBytes{}; u4 lengthFrames{}; u4 currentFrameNumber{}; - static const UINT blockSize{10000}; - static const UINT startupBlockSize{20000}; + static const u4 blockSize{10000}; + static const u4 startupBlockSize{20000}; UCHAR state{S_STOP}; }; diff --git a/src/playervideorec.cc b/src/playervideorec.cc index c0272c7..36188d6 100644 --- a/src/playervideorec.cc +++ b/src/playervideorec.cc @@ -949,8 +949,8 @@ void PlayerVideoRec::restartAtFramePI(u4 newFrame) u4 iframeNumber; UCHAR* buffer; - UINT amountReceived; - UINT videoLength; + u4 amountReceived; + u4 videoLength; // newFrame could be anywhere, go forwards to next I-Frame if (!vdr->getNextIFrame(newFrame, 1, &filePos, &nextiframeNumber, &iframeLength)) return; @@ -1100,7 +1100,7 @@ void PlayerVideoRec::threadMethod() void PlayerVideoRec::threadFeedPlay() { u8 feedPosition; - UINT thisRead, writeLength, thisWrite, askFor; + u4 thisRead, writeLength, thisWrite, askFor; time_t lastRescan = time(NULL); feedPosition = vdr->positionFromFrameNumber(currentFrameNumber); @@ -1133,14 +1133,14 @@ void PlayerVideoRec::threadFeedPlay() if (startup) { if (startupBlockSize > lengthBytes) - askFor = static_cast(lengthBytes); // is a very small recording! + askFor = static_cast(lengthBytes); // is a very small recording! else askFor = startupBlockSize; // normal, but a startup sized block to detect all the audio streams } else { if ((feedPosition + blockSize) > lengthBytes) // last block of recording - askFor = static_cast(lengthBytes - feedPosition); + askFor = static_cast(lengthBytes - feedPosition); else // normal askFor = blockSize; } @@ -1225,10 +1225,10 @@ bool PlayerVideoRec::threadPTSFeedScan() u4 currentfeedFrameNumber=currentFrameNumber; u4 firstFrameNumber=currentFrameNumber; u8 filePos; - UINT amountReceived; - UINT videoLength; + u4 amountReceived; + u4 videoLength; - UINT playtime=0; + u4 playtime=0; int frameTimeOffset = 0; // Time in msec between frames @@ -1315,8 +1315,8 @@ bool PlayerVideoRec::threadFeedScan() u4 iframeNumber = 0; u4 iframeLength = 0; u8 filePos; - UINT amountReceived; - UINT videoLength; + u4 amountReceived; + u4 videoLength; #ifndef WIN32 struct timeval clock0 = {0,0}; // Time stamp after fetching I-frame info diff --git a/src/playervideorec.h b/src/playervideorec.h index d713cfd..a800135 100644 --- a/src/playervideorec.h +++ b/src/playervideorec.h @@ -168,8 +168,8 @@ class PlayerVideoRec : public Callback u8 lengthBytes{}; u4 lengthFrames{}; u4 currentFrameNumber{}; - UINT blockSize{100000}; - UINT startupBlockSize{250000}; + u4 blockSize{100000}; + u4 startupBlockSize{250000}; UCHAR state{S_STOP}; UCHAR ifactor{4}; // 4, 8, 16, 32 }; diff --git a/src/recinfo.h b/src/recinfo.h index 5a597e1..3b294a3 100644 --- a/src/recinfo.h +++ b/src/recinfo.h @@ -28,10 +28,10 @@ typedef struct _hmsf { - UINT hours; - UINT minutes; - UINT seconds; - UINT frames; + u4 hours; + u4 minutes; + u4 seconds; + u4 frames; } hmsf; class RecInfo diff --git a/src/recording.cc b/src/recording.cc index 3a4c294..db71095 100644 --- a/src/recording.cc +++ b/src/recording.cc @@ -50,7 +50,7 @@ Recording::~Recording() if (markList && markList->size()) { - for(UINT i = 0; i < markList->size(); i++) + for(u4 i = 0; i < markList->size(); i++) { delete (*markList)[i]; } @@ -166,7 +166,7 @@ bool Recording::isRadio(bool &h264) u8 lengthBytes = vdr->streamRecording(getFileName(), &lengthFrames, &IsPesRecording); if (!lengthBytes || !lengthFrames) return false; - UINT thisRead; + u4 thisRead; UCHAR* buffer = vdr->getBlock(0ULL, 10000U, &thisRead); if (!buffer) return false; diff --git a/src/region.cc b/src/region.cc index dde0f54..edd378d 100644 --- a/src/region.cc +++ b/src/region.cc @@ -28,12 +28,12 @@ bool Region::overlappedBy(Region& d) (d.y2() >= y) ); } -UINT Region::x2() +u4 Region::x2() { return x + w - 1; } -UINT Region::y2() +u4 Region::y2() { return y + h - 1; } diff --git a/src/region.h b/src/region.h index 94b93f7..bf2984f 100644 --- a/src/region.h +++ b/src/region.h @@ -27,7 +27,7 @@ class Region { public: Region() = default; - Region(UINT ix, UINT iy, UINT iw, UINT ih) : x(ix), y(iy), w(iw), h(ih) {} + Region(u4 ix, u4 iy, u4 iw, u4 ih) : x(ix), y(iy), w(iw), h(ih) {} bool overlappedBy(Region& doesthisOverlap); Region subtract(Region& other); @@ -37,13 +37,13 @@ class Region || (test.y+test.h) < y || (y+h) < test.y); } - UINT x2(); - UINT y2(); + u4 x2(); + u4 y2(); - UINT x{}; - UINT y{}; - UINT w{}; - UINT h{}; + u4 x{}; + u4 y{}; + u4 w{}; + u4 h{}; int z{}; }; diff --git a/src/sleeptimer.h b/src/sleeptimer.h index db3a197..0eecb89 100644 --- a/src/sleeptimer.h +++ b/src/sleeptimer.h @@ -54,7 +54,7 @@ class SleepTimer : public TimerReceiver std::chrono::system_clock::time_point endTime; std::mutex stateLock; - UINT state{0}; + u4 state{0}; /* 0 = inactive * 1 = counting - no displays * 2 = counting - modify display showing diff --git a/src/stream.cc b/src/stream.cc index 1e58116..b147b79 100644 --- a/src/stream.cc +++ b/src/stream.cc @@ -167,7 +167,7 @@ bool Stream::drain(bool* dataavail) if (draintarget->DrainTargetBufferFull()) return false; //We are full, no need to do something else mutex.lock(); - UINT listlength = mediapackets.size(); + u4 listlength = mediapackets.size(); if (listlength != 0) { @@ -176,7 +176,7 @@ bool Stream::drain(bool* dataavail) if (dataavail && draintarget->DrainTargetReady()) *dataavail = true; - UINT consumed = draintarget->DeliverMediaSample(outbuf, &cur_packet_pos); + u4 consumed = draintarget->DeliverMediaSample(outbuf, &cur_packet_pos); mutex.lock(); if (consumed != 0) ret = true; diff --git a/src/stream.h b/src/stream.h index b9ab4cf..6715a67 100644 --- a/src/stream.h +++ b/src/stream.h @@ -32,12 +32,12 @@ class Stream int init(DrainTarget* tdt, int bufsize); void shutdown(); void flush(); - int put(const UCHAR* inbuf, int len, UCHAR type, UINT index); + int put(const UCHAR* inbuf, int len, UCHAR type, u4 index); bool drain(bool* dataavail = NULL); private: MediaPacketList mediapackets; - UINT cur_packet_pos{}; + u4 cur_packet_pos{}; std::mutex mutex; DrainTarget* draintarget{}; int initted{}; diff --git a/src/surface.h b/src/surface.h index ab79e4f..d992d74 100644 --- a/src/surface.h +++ b/src/surface.h @@ -78,7 +78,7 @@ class Surface virtual void drawJpeg(const char* /* fileName */, int /* x */, int /* y */, int* /* width */, int* /* height */) {} - virtual int create(UINT width, UINT height) = 0; + virtual int create(u4 width, u4 height) = 0; virtual void display() = 0; virtual int fillblt(int x, int y, int width, int height, const DrawStyle& c) = 0; diff --git a/src/surfacedirectfb.cc b/src/surfacedirectfb.cc index 95b3401..d895299 100644 --- a/src/surfacedirectfb.cc +++ b/src/surfacedirectfb.cc @@ -41,7 +41,7 @@ SurfaceDirectFB::~SurfaceDirectFB() } -int SurfaceDirectFB::create(UINT width, UINT height) +int SurfaceDirectFB::create(u4 width, u4 height) { int counter=0; while (!Osd::getInstance()->isInitted() && counter<2000) { @@ -189,11 +189,11 @@ void SurfaceDirectFB::drawVertLine(int x, int y1, int y2, unsigned int c) void SurfaceDirectFB::drawBitmap(int x, int y, const Bitmap& bm) {/* - UINT bmw = bm.getWidth(); UINT bmh = bm.getHeight(); + u4 bmw = bm.getWidth(); u4 bmh = bm.getHeight(); if (bmw == 0 || bmh == 0) return; if ((x >= (int)surface.sfc.width) || (y >= (int)surface.sfc.height)) return; int remainder = (surface.sfc.width % 4); - UINT line; + u4 line; if (remainder == 0) line = surface.sfc.width; else @@ -203,17 +203,17 @@ void SurfaceDirectFB::drawBitmap(int x, int y, const Bitmap& bm) const std::vector& Cr = bm.palette.getCrVector(); const std::vector& Cb = bm.palette.getCbVector(); const std::vector& A = bm.palette.getAVector(); - UINT b_offset = 0; - UINT s_offset = x + y*line; - UINT plotWidth = bmw; - UINT plotHeight = bmh; + u4 b_offset = 0; + u4 s_offset = x + y*line; + u4 plotWidth = bmw; + u4 plotHeight = bmh; if (x + plotWidth - 1 > surface.sfc.width) plotWidth = surface.sfc.width - x + 1; if (y + plotHeight - 1 > surface.sfc.height) plotHeight = surface.sfc.height - y + 1; - for (UINT j = 0; j < plotHeight; ++j) + for (u4 j = 0; j < plotHeight; ++j) { - UINT i = 0; + u4 i = 0; if (x & 1) // odd x - need to plot first column separately { UCHAR index = bmdata[b_offset]; diff --git a/src/surfacedirectfb.h b/src/surfacedirectfb.h index 373db83..4784d1a 100644 --- a/src/surfacedirectfb.h +++ b/src/surfacedirectfb.h @@ -46,7 +46,7 @@ class SurfaceDirectFB : public Surface SurfaceDirectFB(int id = 0); virtual ~SurfaceDirectFB(); - int create(UINT width, UINT height); + int create(u4 width, u4 height); void display(); int fillblt(int x, int y, int width, int height, unsigned int rgba); diff --git a/src/surfaceopengl.cc b/src/surfaceopengl.cc index bec16cf..7b0d20d 100644 --- a/src/surfaceopengl.cc +++ b/src/surfaceopengl.cc @@ -54,7 +54,7 @@ SurfaceOpenGL::~SurfaceOpenGL() srf_mutex.unlock(); } -int SurfaceOpenGL::create(UINT width, UINT height) +int SurfaceOpenGL::create(u4 width, u4 height) { OsdOpenGL* osd=((OsdOpenGL*)(Osd::getInstance())); //osd->BeginPainting(); @@ -201,8 +201,8 @@ void SurfaceOpenGL::drawBitmap(int x, int y, const Bitmap& bm,const DisplayRegio { // Temporary code? Draw one pixel at a time using drawPixel() startFastDraw(); - for (UINT j = 0; j < bm.getHeight(); ++j) - for (UINT i = 0; i < bm.getWidth(); ++i) + for (u4 j = 0; j < bm.getHeight(); ++j) + for (u4 i = 0; i < bm.getWidth(); ++i) drawPixel(x+i, y+j, bm.getColour(i,j),true); endFastDraw(); } diff --git a/src/surfaceopengl.h b/src/surfaceopengl.h index 666b511..f9e7751 100644 --- a/src/surfaceopengl.h +++ b/src/surfaceopengl.h @@ -32,7 +32,7 @@ class SurfaceOpenGL : public Surface SurfaceOpenGL(int id = 0); virtual ~SurfaceOpenGL(); - int create(UINT width, UINT height); + int create(u4 width, u4 height); void display(); void startFastDraw(); @@ -57,7 +57,7 @@ class SurfaceOpenGL : public Surface private: GLuint gltexture; - UINT sheight,swidth; + u4 sheight,swidth; char * data; diff --git a/src/surfacevector.cc b/src/surfacevector.cc index ca199e5..d275d1b 100644 --- a/src/surfacevector.cc +++ b/src/surfacevector.cc @@ -287,7 +287,7 @@ void SurfaceVector::drawClippingRectangle(float x, float y, float w, float h) command_mutex.unlock(); } -int SurfaceVector::create(UINT width, UINT height) +int SurfaceVector::create(u4 width, u4 height) { sheight = height; swidth = width; @@ -330,8 +330,8 @@ void SurfaceVector::drawBitmap(int x, int y, const Bitmap& bm, const DisplayRegi command_mutex.lock(); /* unsigned int * data=(unsigned int*)malloc(sizeof(unsigned int)*bm.getWidth()*bm.getHeight()); - for (UINT j = 0; j < bm.getHeight(); ++j){ - for (UINT i = 0; i < bm.getWidth(); ++i) + for (u4 j = 0; j < bm.getHeight(); ++j){ + for (u4 i = 0; i < bm.getWidth(); ++i) { data[i+j*bm.getHeight()]=bm.getColour(i,j); } diff --git a/src/surfacevector.h b/src/surfacevector.h index 17b4ade..c0fe24c 100644 --- a/src/surfacevector.h +++ b/src/surfacevector.h @@ -49,7 +49,7 @@ class SurfaceVector : public Surface // set w and h to 0, for unsetting clipping, use correct x and y parameter so that cleanup of commands works void drawClippingRectangle(float x, float y, float w, float h); - int create(UINT width, UINT height); + int create(u4 width, u4 height); void display(); int fillblt(int x, int y, int width, int height, const DrawStyle& c); diff --git a/src/surfacewin.cc b/src/surfacewin.cc index 66eb4ab..3bc4dbe 100644 --- a/src/surfacewin.cc +++ b/src/surfacewin.cc @@ -41,7 +41,7 @@ SurfaceWin::~SurfaceWin() CloseHandle(event); } -int SurfaceWin::create(UINT width, UINT height) +int SurfaceWin::create(u4 width, u4 height) { OsdWinPixel* osd=((OsdWinPixel*)(Osd::getInstance())); @@ -246,8 +246,8 @@ void SurfaceWin::drawBitmap(int x, int y, const Bitmap& bm,const DisplayRegion & { // Temporary code? Draw one pixel at a time using drawPixel() startFastDraw(); - for (UINT j = 0; j < bm.getHeight(); ++j) - for (UINT i = 0; i < bm.getWidth(); ++i) + for (u4 j = 0; j < bm.getHeight(); ++j) + for (u4 i = 0; i < bm.getWidth(); ++i) drawPixel(x+i, y+j, bm.getColour(i,j),true); endFastDraw(); } diff --git a/src/surfacewin.h b/src/surfacewin.h index 7509c9b..8a5a482 100644 --- a/src/surfacewin.h +++ b/src/surfacewin.h @@ -32,7 +32,7 @@ class SurfaceWin : public Surface SurfaceWin(int id = 0); ~SurfaceWin(); - int create(UINT width, UINT height); + int create(u4 width, u4 height); void display(); void startFastDraw(); @@ -56,7 +56,7 @@ class SurfaceWin : public Surface LPDIRECT3DSURFACE9 d3dsurface; LPDIRECT3DTEXTURE9 d3dtexture; D3DLOCKED_RECT lockrect; - UINT sheight,swidth; + u4 sheight,swidth; HANDLE event; protected: void drawPixel(int x, int y, Colour& c, bool fastdraw=false); diff --git a/src/tcp.cc b/src/tcp.cc index aa47f78..c8d453b 100644 --- a/src/tcp.cc +++ b/src/tcp.cc @@ -453,7 +453,7 @@ MACAddress TCP::getMAC() */ // Measured sizeof(struct sockaddr_in) = 16, and in6 = 28 - UINT buflen = 50; + u4 buflen = 50; unsigned char gsnBuffer[buflen]; struct sockaddr* sap = reinterpret_cast(gsnBuffer); if (getsockname(sockfd, sap, &buflen) == -1) return macerror; diff --git a/src/teletextdecodervbiebu.cc b/src/teletextdecodervbiebu.cc index fa6a0f4..6629349 100644 --- a/src/teletextdecodervbiebu.cc +++ b/src/teletextdecodervbiebu.cc @@ -146,7 +146,7 @@ void TeletextDecoderVBIEBU::setKeyinDigits(char digits[3],bool inKeying) } } -void TeletextDecoderVBIEBU::PrepareMediaSample(const MediaPacketList& mplist, UINT /* samplepos */) +void TeletextDecoderVBIEBU::PrepareMediaSample(const MediaPacketList& mplist, u4 /* samplepos */) { mediapacket = mplist.front(); } @@ -165,7 +165,7 @@ static u8 TxtPTSDifference(u8 pts1, u8 pts2) return -pts1 + pts2; } -UINT TeletextDecoderVBIEBU::DeliverMediaSample(UCHAR* buffer, UINT *samplepos) +u4 TeletextDecoderVBIEBU::DeliverMediaSample(UCHAR* buffer, u4 *samplepos) { if (mediapacket.type != MPTYPE_TELETEXT) { diff --git a/src/teletextdecodervbiebu.h b/src/teletextdecodervbiebu.h index 8dbfe9f..5e0dd27 100644 --- a/src/teletextdecodervbiebu.h +++ b/src/teletextdecodervbiebu.h @@ -264,8 +264,8 @@ public: int *getSubtitlePages() {return record_pages;}; - virtual void PrepareMediaSample(const MediaPacketList& mplist, UINT samplepos); - virtual UINT DeliverMediaSample(UCHAR* buffer, UINT *samplepos); + virtual void PrepareMediaSample(const MediaPacketList& mplist, u4 samplepos); + virtual u4 DeliverMediaSample(UCHAR* buffer, u4 *samplepos); void registerTeletextView(VTeletextView* view) {txtview=view;}; void unRegisterTeletextView(VTeletextView* view) {if (txtview==view) txtview=NULL;}; diff --git a/src/udp4.cc b/src/udp4.cc index 4ae7e40..49c08d1 100644 --- a/src/udp4.cc +++ b/src/udp4.cc @@ -156,9 +156,9 @@ unsigned char UDP4::waitforMessage(unsigned char how, int quitPipe) */ } -UINT UDP4::getDataLength(void) const +u4 UDP4::getDataLength(void) const { - return static_cast(mlength); + return static_cast(mlength); } const void* UDP4::getData() const { return buf; } diff --git a/src/udp4.h b/src/udp4.h index 108c51b..856f3ea 100644 --- a/src/udp4.h +++ b/src/udp4.h @@ -44,7 +44,7 @@ class UDP4 #else unsigned char waitforMessage(unsigned char, int quitPipe = 0); // uchar =0-block =1-new wait =2-continue wait #endif - UINT getDataLength() const; + u4 getDataLength() const; const void* getData() const; // returns a pointer to the data const char* getFromIPA() const; // returns a pointer to from IP address short getFromPort() const; diff --git a/src/udp6.cc b/src/udp6.cc index c0b149b..166015d 100644 --- a/src/udp6.cc +++ b/src/udp6.cc @@ -155,9 +155,9 @@ unsigned char UDP6::waitforMessage(unsigned char how, int quitPipe) */ } -UINT UDP6::getDataLength(void) const +u4 UDP6::getDataLength(void) const { - return static_cast(mlength); + return static_cast(mlength); } const void* UDP6::getData() const { return buf; } @@ -180,7 +180,7 @@ bool UDP6::send(const char *ipa, USHORT port, char *message, int length, bool mc if (mcast) { struct if_nameindex* ifs = if_nameindex(); - UINT ifIndex; + u4 ifIndex; for(int i = 0; ifs[i].if_index > 0; i++) { diff --git a/src/udp6.h b/src/udp6.h index 591e82d..0bb992e 100644 --- a/src/udp6.h +++ b/src/udp6.h @@ -40,7 +40,7 @@ class UDP6 #else unsigned char waitforMessage(unsigned char, int quitPipe = 0); // uchar =0-block =1-new wait =2-continue wait #endif - UINT getDataLength() const; + u4 getDataLength() const; const void* getData() const; // returns a pointer to the data const char* getFromIPA() const; // returns a pointer to from IP address short getFromPort() const; diff --git a/src/util.cc b/src/util.cc index 9de8590..5d6eebc 100644 --- a/src/util.cc +++ b/src/util.cc @@ -122,7 +122,7 @@ u8 ntohll(u8 a) */ -int min(UINT a, int b) +int min(u4 a, int b) { if (a > b) return b; else return a; diff --git a/src/util.h b/src/util.h index 5db86d4..bc75c4d 100644 --- a/src/util.h +++ b/src/util.h @@ -34,6 +34,6 @@ i8 getTimeMS(); //u8 ntohll(u8 a); [[deprecated]] -int min(UINT a, int b); +int min(u4 a, int b); #endif diff --git a/src/vaudioselector.cc b/src/vaudioselector.cc index c49be36..f87342d 100644 --- a/src/vaudioselector.cc +++ b/src/vaudioselector.cc @@ -128,10 +128,10 @@ VAudioSelector::VAudioSelector(MessageReceiver* tparent, bool* availableMpegAudi } int numchan_recinfo = recInfo->numComponents; - UINT mp_audcounter = 0; - UINT ac3_counter = 0; + u4 mp_audcounter = 0; + u4 ac3_counter = 0; int ac3_offset = 0; - UINT dvb_subcounter = 1; + u4 dvb_subcounter = 1; for (auto& ac : acl) { @@ -272,7 +272,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) { - UINT i; + u4 i; for (i = 0; i < channel->numSPids; i++) { diff --git a/src/vchannellist.cc b/src/vchannellist.cc index 523690f..4b70118 100644 --- a/src/vchannellist.cc +++ b/src/vchannellist.cc @@ -96,7 +96,7 @@ void VChannelList::setList(std::shared_ptr tlist) if (chanList) { - for (UINT i = 0; i < chanList->size(); i++) + for (u4 i = 0; i < chanList->size(); i++) { chan = (*chanList)[i]; std::ostringstream os; @@ -299,7 +299,7 @@ void VChannelList::processMessage(Message* m) { LogNT::getInstance()->debug(TAG, "Channel change {}", m->parameter); Channel* chan = NULL; - for (UINT i = 0; i < chanList->size(); i++) + for (u4 i = 0; i < chanList->size(); i++) { if ((*chanList)[i]->number == m->parameter) { diff --git a/src/vdr.cc b/src/vdr.cc index cdad8aa..1cecf54 100644 --- a/src/vdr.cc +++ b/src/vdr.cc @@ -960,7 +960,7 @@ int VDR::stopStreaming() return toReturn; } -UCHAR* VDR::getBlock(u8 position, UINT maxAmount, UINT* amountReceived) +UCHAR* VDR::getBlock(u8 position, u4 maxAmount, u4* amountReceived) { VDR_RequestPacket vrp; if (!vrp.init(VDR_GETBLOCK, true, sizeof(u8) + sizeof(u4))) return NULL; @@ -1660,7 +1660,7 @@ void VDR::getScraperEventType(char * fileName, int & movieID, } -void VDR::getScraperEventType(UINT channelid, UINT eventid, int & movieID, +void VDR::getScraperEventType(u4 channelid, u4 eventid, int & movieID, int & seriesID, int & episodeID, int & epgImage ) { movieID = 0; diff --git a/src/vdr.h b/src/vdr.h index 8a1db60..e0e1e5d 100644 --- a/src/vdr.h +++ b/src/vdr.h @@ -172,7 +172,7 @@ public ExternLogger int streamChannel(u4 number, StreamReceiver*); int streamChannel(u4 number); void getChannelPids(Channel* channel); - UCHAR* getBlock(u8 position, UINT maxAmount, UINT* amountReceived); + UCHAR* getBlock(u8 position, u4 maxAmount, u4* amountReceived); //get image blocks separate - we can do this in parallel int stopStreaming(); EventList* getChannelSchedule(u4 number); @@ -200,7 +200,7 @@ public ExternLogger //TV Scraper support void getScraperEventType(char * fileName, int & movieID, int & seriesID, int & episodeID); - void getScraperEventType(UINT eventid, UINT channelid, int & movieID, int & seriesID, int & episodeID, int & epgImage); + void getScraperEventType(u4 eventid, u4 channelid, int & movieID, int & seriesID, int & episodeID, int & epgImage); MovieInfo* getScraperMovieInfo(int movieID); SeriesInfo* getScraperSeriesInfo(int seriesID, int episodeID); @@ -224,7 +224,7 @@ public ExternLogger static VDR* instance; VDR_ResponsePacket* RequestResponse(VDR_RequestPacket* request); - UCHAR* getBlock(u8 position, UINT maxAmount, UINT* amountReceived, u4 cmd); + UCHAR* getBlock(u8 position, u4 maxAmount, u4* amountReceived, u4 cmd); void connectionDied(); bool sendKA(u4 timeStamp); diff --git a/src/vepg.cc b/src/vepg.cc index 150faa2..11f3900 100644 --- a/src/vepg.cc +++ b/src/vepg.cc @@ -51,7 +51,7 @@ static const char* TAG = "VEpg"; VEpg* VEpg::instance = NULL; -VEpg::VEpg(MessageReceiver* tparent, UINT tcurrentChannelIndex, std::shared_ptr tchanList) +VEpg::VEpg(MessageReceiver* tparent, u4 tcurrentChannelIndex, std::shared_ptr tchanList) { instance = this; currentChannelIndex = tcurrentChannelIndex; @@ -62,7 +62,7 @@ VEpg::VEpg(MessageReceiver* tparent, UINT tcurrentChannelIndex, std::shared_ptr< //int summaryLines, summaryLowerPadding; //int chanNameYpos; int fontHeight=getFontHeight() + 4; - //UINT gridRows; // is a class member + //u4 gridRows; // is a class member if (Video::getInstance()->getFormat() == Video::PAL) @@ -101,7 +101,7 @@ VEpg::VEpg(MessageReceiver* tparent, UINT tcurrentChannelIndex, std::shared_ptr< e = 0; eventLista.resize(gridRows); - for(UINT listIndex = 0; listIndex < gridRows; listIndex++) + for(u4 listIndex = 0; listIndex < gridRows; listIndex++) { // initialise array of pointers to eventlist structures eventLista[listIndex] = NULL; @@ -155,7 +155,7 @@ VEpg::VEpg(MessageReceiver* tparent, UINT tcurrentChannelIndex, std::shared_ptr< { Channel* chan; int first = 1; - for (UINT i = 0; i < chanList->size(); i++) + for (u4 i = 0; i < chanList->size(); i++) { chan = (*chanList)[i]; if (i == currentChannelIndex) @@ -197,7 +197,7 @@ VEpg::~VEpg() instance = NULL; - for(UINT listIndex = 0; listIndex < gridRows; listIndex++) + for(u4 listIndex = 0; listIndex < gridRows; listIndex++) { if (eventLista[listIndex]) { @@ -261,8 +261,8 @@ void VEpg::draw() // Display the status and key stuff at the bottom - UINT keyx = chanListbox.getRootBoxOffsetX() + chanListbox.getColumn(0); - UINT keyy = chanListbox.getRootBoxOffsetY() + chanListbox.getHeight() + 2; + u4 keyx = chanListbox.getRootBoxOffsetX() + chanListbox.getColumn(0); + u4 keyy = chanListbox.getRootBoxOffsetY() + chanListbox.getHeight() + 2; rectangle (0, keyy, Video::getInstance()->getScreenWidth() , Video::getInstance()->getScreenHeight()-keyy, DrawStyle::DARKGREY); @@ -578,7 +578,7 @@ void VEpg::drawgrid() // redraws grid and select programme int y = chanListbox.getRootBoxOffsetY() + 5; // vertical position of cell DrawStyle bg, fg; // background colour of cells in grid // for each displayed channel, find programmes that fall in 2.5 hour time window - for(UINT listIndex = 0; listIndex < gridRows; listIndex++) + for(u4 listIndex = 0; listIndex < gridRows; listIndex++) { if (listTop + (int)listIndex >= chanListbox.getBottomOption()) continue; // ensure nothing populates grid below last channel @@ -605,15 +605,15 @@ void VEpg::drawgrid() // redraws grid and select programme event = (*eventLista[listIndex])[e]; if (event) { - UINT end = event->time + event->duration; // programme end time - if(event->time >= UINT(ltime) + (window_width * 60)) // programme starts after RHS of window + u4 end = event->time + event->duration; // programme end time + if(event->time >= u4(ltime) + (window_width * 60)) // programme starts after RHS of window continue; // that's enough of this channel's events - if(end <= UINT(ltime)) // programme ends before LHS of window + if(end <= u4(ltime)) // programme ends before LHS of window continue; // this event is before the window - let's try the next event // this event is one we are interested in bg = (swapColour)?DrawStyle::PROGRAMMEA:DrawStyle::PROGRAMMEB; // alternate cell colour swapColour = !swapColour; // it wil be the other colour next time - if(event->time <= UINT(selTime) && end > UINT(selTime) && currentRow) + if(event->time <= u4(selTime) && end > u4(selTime) && currentRow) { // this is the selected programme thisEvent.description = event->description; @@ -630,9 +630,9 @@ void VEpg::drawgrid() // redraws grid and select programme { if (currentRow && thisEvent.id == 0) { - if (end <= UINT(selTime) && end > UINT(thisEvent.time)) + if (end <= u4(selTime) && end > u4(thisEvent.time)) thisEvent.time = end; - if (event->time > UINT(selTime) && event->time < thisEvent.time + thisEvent.duration) + if (event->time > u4(selTime) && event->time < thisEvent.time + thisEvent.duration) thisEvent.duration = event->time - thisEvent.time; } } @@ -666,9 +666,9 @@ void VEpg::updateEventList() { if (!chanList) return; Channel* chan; - for(UINT listIndex = 0; listIndex < gridRows; listIndex++) + for(u4 listIndex = 0; listIndex < gridRows; listIndex++) { - if(listTop + listIndex >= UINT(chanListbox.getBottomOption())) + if(listTop + listIndex >= u4(chanListbox.getBottomOption())) continue; chan = (*chanList)[listTop + listIndex]; if (eventLista[listIndex]) @@ -695,16 +695,16 @@ void VEpg::paintCell(Event* event, int yOffset, const DrawStyle& bg, const DrawS w = x = 0; // keep compiler happy y =yOffset; h = getFontHeight(); // TODO if want border around text, need to increae this and wselectlist line height - UINT end = event->time + event->duration; // programme end time - if(event->time <= UINT(ltime) && end > UINT(ltime)) // spans start of displayed window + u4 end = event->time + event->duration; // programme end time + if(event->time <= u4(ltime) && end > u4(ltime)) // spans start of displayed window { x = 155; // LHS of window - if (end > (UINT(ltime) + (window_width * 60))) + if (end > (u4(ltime) + (window_width * 60))) w = window_width * MINUTE_SCALE; // spans full 2 hour window else w = MINUTE_SCALE * (event->time + event->duration - ltime ) / 60; // get width of remaining programme } - if((event->time >= UINT(ltime)) && (event->time <= UINT(ltime) + (window_width * 60))) // starts within window + if((event->time >= u4(ltime)) && (event->time <= u4(ltime) + (window_width * 60))) // starts within window { x = 155 + (MINUTE_SCALE * (event->time - ltime) / 60); w = MINUTE_SCALE * event->duration / 60; @@ -724,7 +724,7 @@ void VEpg::paintCell(Event* event, int yOffset, const DrawStyle& bg, const DrawS mbstate_t state; memset((void*)&state,0,sizeof(state)); - UINT textPos; + u4 textPos; for (textPos = 0; textPos tchanList); + VEpg(MessageReceiver* parent, u4 currentChannel, std::shared_ptr tchanList); ~VEpg(); static VEpg* getInstance(); @@ -67,7 +67,7 @@ class VEpg : public Boxx, public MessageReceiver, public TimerReceiver EventList* eventList; // list of events (programmes) for a channel Event thisEvent; // the selected event time_t selTime; // current selection time - UINT e; // temp used to point to an event + u4 e; // temp used to point to an event std::shared_ptr chanList; // list of available channels tm* epgtime; // selected time within epg tm* Ltime; // time of LHS of epg view @@ -83,10 +83,10 @@ class VEpg : public Boxx, public MessageReceiver, public TimerReceiver time_t prevHour(time_t* t); MessageReceiver* parent; BoxStack* boxstack; - UINT gridRows; - UINT currentChannelIndex; - UINT window_width; - UINT window_x; + u4 gridRows; + u4 currentChannelIndex; + u4 window_width; + u4 window_x; }; #endif diff --git a/src/vepglistadvanced.cc b/src/vepglistadvanced.cc index 0a1b94f..ab8797d 100644 --- a/src/vepglistadvanced.cc +++ b/src/vepglistadvanced.cc @@ -79,7 +79,7 @@ VEpgListAdvanced::VEpgListAdvanced(MessageReceiver* tvideolive, std::shared_ptr< epg.setBackgroundColour(DrawStyle::VIEWTRANSPARENTBACKGROUND); epgTVmedia.setPosition(epg.getRegionR().w - 100 - 10, 10); - epgTVmedia.setSize(100, static_cast(150 / Osd::getInstance()->getPixelAspect())); + epgTVmedia.setSize(100, static_cast(150 / Osd::getInstance()->getPixelAspect())); epg.add(&epgTVmedia); boxRed.setBackgroundColour(DrawStyle::RED); @@ -314,7 +314,7 @@ void VEpgListAdvanced::doRecord() LogNT::getInstance()->debug(TAG, "Found the option you pointed at. {} {}", current->title, current->id); unsigned int chanlistsize = chanList->size(); Channel* chan; - UINT listIndex; + u4 listIndex; for (listIndex = 0; listIndex < chanlistsize; listIndex++) { @@ -341,7 +341,7 @@ void VEpgListAdvanced::doGrid() channelNumber = chan->number; } - UINT listIndex; + u4 listIndex; unsigned int chanlistsize = chanList->size(); Channel* chan; @@ -379,9 +379,9 @@ void VEpgListAdvanced::clearEventList() * * if (!chanList) return; Channel* chan; - for(UINT listIndex = 0; listIndex < gridRows; listIndex++) + for(u4 listIndex = 0; listIndex < gridRows; listIndex++) { - if(listTop + listIndex >= UINT(chanListbox.getBottomOption())) + if(listTop + listIndex >= u4(chanListbox.getBottomOption())) continue; chan = (*chanList)[listTop + listIndex]; eventLista[listIndex] = VDR::getInstance()->getChannelSchedule(chan->number, ltime - 1, window_width * 60 + 2); // ltime - 1 to get prog before window (allows cursor left past ltime). + 2 to get prog after window @@ -412,7 +412,7 @@ void VEpgListAdvanced::updateEpgDataNowNext(bool changeState) int startupdate = 0; int endupdate = 0; - UINT chanlistsize = chanList->size(); + u4 chanlistsize = chanList->size(); if (changeState) { @@ -420,7 +420,7 @@ void VEpgListAdvanced::updateEpgDataNowNext(bool changeState) eventLista.resize(chanList->size()); Channel* chan; - for (UINT listIndex = 0; listIndex < chanlistsize; listIndex++) + for (u4 listIndex = 0; listIndex < chanlistsize; listIndex++) { if (listIndex >= chanlistsize) continue; @@ -545,7 +545,7 @@ void VEpgListAdvanced::drawDataNowNext(bool next, bool doIndexPop) Event* currentEvent = NULL; EventList::iterator j; - UINT minevents = 1; + u4 minevents = 1; if (next) minevents++; @@ -555,7 +555,7 @@ void VEpgListAdvanced::drawDataNowNext(bool next, bool doIndexPop) std::string eventText; - for (UINT listIndex = 0; listIndex < chanlistsize; listIndex++) + for (u4 listIndex = 0; listIndex < chanlistsize; listIndex++) { Channel* chan; chan = (*chanList)[listIndex]; @@ -620,7 +620,7 @@ void VEpgListAdvanced::draw(bool doIndexPop) char tempA[300]; unsigned int chanlistsize = chanList->size(); Channel* chan; - UINT listIndex; + u4 listIndex; for (listIndex = 0; listIndex < chanlistsize; listIndex++) { @@ -874,7 +874,7 @@ int VEpgListAdvanced::handleCommand(int command) LogNT::getInstance()->debug(TAG, "Found the option you pointed at. {} {}", current->title.c_str(), current->id); unsigned int chanlistsize = chanList->size(); Channel* chan; - UINT listIndex; + u4 listIndex; for (listIndex = 0; listIndex < chanlistsize; listIndex++) { diff --git a/src/vepgsettimer.cc b/src/vepgsettimer.cc index f226d6a..0d2e6d9 100644 --- a/src/vepgsettimer.cc +++ b/src/vepgsettimer.cc @@ -149,7 +149,7 @@ char* VEpgSetTimer::genTimerString() eventTitle = new char[strlen(event->title.c_str()) + 1]; strcpy(eventTitle, event->title.c_str()); - for(UINT i=0; i < strlen(eventTitle); i++) if (eventTitle[i] == ':') eventTitle[i] = '|'; + for(u4 i=0; i < strlen(eventTitle); i++) if (eventTitle[i] == ':') eventTitle[i] = '|'; SNPRINTF(timerString, 1023, "%i:%lu:%s:%s:%s:%s:%s:%s:", flags, channel->number, dateString, diff --git a/src/vepgsummary.cc b/src/vepgsummary.cc index 82835f0..eb7993e 100644 --- a/src/vepgsummary.cc +++ b/src/vepgsummary.cc @@ -128,7 +128,7 @@ VEpgSummary::VEpgSummary(Event *tevent, Channel* tchannel) } epgTVmedia.setPosition(summary->getRegionR().w-130-10,0); - epgTVmedia.setSize(130, static_cast(195 / Osd::getInstance()->getPixelAspect())); + epgTVmedia.setSize(130, static_cast(195 / Osd::getInstance()->getPixelAspect())); summary->add(&epgTVmedia); if (movieview) movieview->add(&epgTVmedia); if (seriesview) seriesview->add(&epgTVmedia); diff --git a/src/video.cc b/src/video.cc index bd8842a..31f195f 100644 --- a/src/video.cc +++ b/src/video.cc @@ -122,7 +122,7 @@ hmsf Video::framesToHMSF(u4 frames, double fps) }*/ /* -UINT Video::getFPS() +u4 Video::getFPS() { if (format == NTSC) return 30; else return 25; diff --git a/src/video.h b/src/video.h index 6f1ed2d..acb741f 100644 --- a/src/video.h +++ b/src/video.h @@ -38,8 +38,8 @@ enum VideoMode { typedef struct _VideoDisplay { enum VideoMode mode; enum VideoMode fallbackMode; - UINT x,y; - UINT width,height; + u4 x,y; + u4 width,height; } VideoDisplay; class Video: public DrainTarget, public AbstractOption @@ -54,7 +54,7 @@ class Video: public DrainTarget, public AbstractOption virtual int shutdown()=0; virtual int setFormat(UCHAR format)=0; virtual UCHAR getSupportedFormats() { return COMPOSITERGB | SVIDEO;}; // if it returns zero there are no different formats - virtual UINT supportedTVsize() { return 0; }; // if no selection is allowed + virtual u4 supportedTVsize() { return 0; }; // if no selection is allowed virtual UCHAR supportedTVFormats() { return 0; }; // if no selection is allowed virtual int setConnection(UCHAR connection)=0; @@ -78,7 +78,7 @@ class Video: public DrainTarget, public AbstractOption virtual int attachFrameBuffer()=0; // What does this do? // virtual u4 timecodeToFrameNumber(u8 timecode)=0; //Obsolete and not HD compatible virtual u8 getCurrentTimestamp()=0; - virtual bool displayIFrame(const UCHAR* buffer, UINT length)=0; + virtual bool displayIFrame(const UCHAR* buffer, u4 length)=0; virtual int EnterIframePlayback() {return 1;}; // Must not be implemented virtual bool supportsh264() { return false; }; @@ -111,14 +111,14 @@ class Video: public DrainTarget, public AbstractOption int getMode() { return mode; } UCHAR getFormat() { return format; } - UINT getScreenWidth() { return screenWidth; } - UINT getScreenHeight() { return screenHeight; } + u4 getScreenWidth() { return screenWidth; } + u4 getScreenHeight() { return screenHeight; } virtual UCHAR getTVsize() { return tvsize; } virtual bool setVideoDisplay(VideoDisplay display); - // UINT getFPS(); //removed + // u4 getFPS(); //removed // Video formats - AV_SET_VID_DISP_FMT const static UCHAR NTSC = 0; @@ -187,8 +187,8 @@ class Video: public DrainTarget, public AbstractOption bool h264; - UINT screenWidth; - UINT screenHeight; + u4 screenWidth; + u4 screenHeight; }; #endif diff --git a/src/videoomx.cc b/src/videoomx.cc index f9db08f..5dcd73c 100644 --- a/src/videoomx.cc +++ b/src/videoomx.cc @@ -353,8 +353,8 @@ bool VideoOMX::saveOptionstoServer() return true; } -/*Option(UINT id, const char* displayText, const char* configSection, const char* configKey, UINT optionType, - UINT numChoices, UINT defaultChoice, UINT startInt, +/*Option(u4 id, const char* displayText, const char* configSection, const char* configKey, u4 optionType, + u4 numChoices, u4 defaultChoice, u4 startInt, const char * const * options, const char * const * optionkeys = NULL, AbstractOption* handler=NULL);*/ bool VideoOMX::addOptionsToPanes(int panenumber,Options *options,WOptionPane* pane) @@ -2030,7 +2030,7 @@ int VideoOMX::DestroyInputBufsOMX() //need s to be called with locked mutex cur_input_buf_omx=NULL; input_bufs_omx_mutex.lock(); - for (UINT i=0; i< input_bufs_omx_all.size();i++) { + for (u4 i=0; i< input_bufs_omx_all.size();i++) { // free(input_bufs_omx_all[i]->pBuffer); // input_bufs_omx_all[i]->pBuffer=NULL; error=OMX_FreeBuffer(omx_vid_dec,omx_codec_input_port,input_bufs_omx_all[i]); @@ -2909,7 +2909,7 @@ bool VideoOMX::DrainTargetBufferFull() } -void VideoOMX::PrepareMediaSample(const MediaPacketList& mplist, UINT /* samplepos */) +void VideoOMX::PrepareMediaSample(const MediaPacketList& mplist, u4 /* samplepos */) { mediapackets.clear(); @@ -2920,9 +2920,9 @@ void VideoOMX::PrepareMediaSample(const MediaPacketList& mplist, UINT /* samplep } -UINT VideoOMX::DeliverMediaSample(UCHAR* buffer, UINT *samplepos) +u4 VideoOMX::DeliverMediaSample(UCHAR* buffer, u4 *samplepos) { - UINT consumed=0; + u4 consumed=0; while (consumed < mediapackets.size()) { DeliverMediaPacket(mediapackets[consumed], buffer, samplepos); if (*samplepos == mediapackets[consumed].length) { @@ -2934,9 +2934,9 @@ UINT VideoOMX::DeliverMediaSample(UCHAR* buffer, UINT *samplepos) return consumed; } -UINT VideoOMX::DeliverMediaPacket(MediaPacket packet, +u4 VideoOMX::DeliverMediaPacket(MediaPacket packet, const UCHAR* buffer, - UINT *samplepos) + u4 *samplepos) { if (packet.type == MPTYPE_VIDEO_H264) { @@ -2970,7 +2970,7 @@ UINT VideoOMX::DeliverMediaPacket(MediaPacket packet, return 0; //Not in iframe mode! } - UINT headerstrip=0; + u4 headerstrip=0; if (packet.disconti) { firstsynched=false; if (cur_input_buf_omx) { @@ -3118,7 +3118,7 @@ UINT VideoOMX::DeliverMediaPacket(MediaPacket packet, -bool VideoOMX::displayIFrame(const UCHAR* buffer, UINT length) { +bool VideoOMX::displayIFrame(const UCHAR* buffer, u4 length) { if (!omx_running) return false; if (!iframemode) EnterIframePlayback(); @@ -3142,7 +3142,7 @@ bool VideoOMX::displayIFrame(const UCHAR* buffer, UINT length) { input_bufs_omx_mutex.unlock(); } - UINT read_pos = 0; + u4 read_pos = 0; unsigned int pattern, packet_length; unsigned int headerstrip = 0; bool first = true; diff --git a/src/videoomx.h b/src/videoomx.h index a720e16..b137557 100644 --- a/src/videoomx.h +++ b/src/videoomx.h @@ -70,7 +70,7 @@ class VideoOMX : public Video int shutdown(); UCHAR getSupportedFormats() { return COMPOSITERGB | HDMI;}; - UINT supportedTVsize() { return ASPECT4X3|ASPECT16X9|ASPECT14X9 ;}; + u4 supportedTVsize() { return ASPECT4X3|ASPECT16X9|ASPECT14X9 ;}; UCHAR supportedTVFormats() { return NTSC|PAL|PAL_M|NTSC_J;}; int setFormat(UCHAR format); @@ -99,14 +99,14 @@ class VideoOMX : public Video int attachFrameBuffer(); // What does this do? u4 timecodeToFrameNumber(u8 timecode); u8 getCurrentTimestamp(); - bool displayIFrame(const UCHAR* bulibaver, UINT length); + bool displayIFrame(const UCHAR* bulibaver, u4 length); virtual bool dtsTimefix(){return false;} //please we need dts time values virtual int getTeletextBufferFaktor(){return 5;}; // Writing Data to Videodevice - virtual void PrepareMediaSample(const MediaPacketList&, UINT samplepos); - virtual UINT DeliverMediaSample(UCHAR* bulibaver, UINT* samplepos); + virtual void PrepareMediaSample(const MediaPacketList&, u4 samplepos); + virtual u4 DeliverMediaSample(UCHAR* bulibaver, u4* samplepos); virtual bool supportsh264(){return true;}; @@ -150,7 +150,7 @@ class VideoOMX : public Video virtual bool DrainTargetBufferFull(); - UINT DeliverMediaPacket(MediaPacket packet,const UCHAR* bulibaver,UINT *samplepos); + u4 DeliverMediaPacket(MediaPacket packet,const UCHAR* bulibaver,u4 *samplepos); #define VPE_DECODER_OMX 1 @@ -186,9 +186,9 @@ class VideoOMX : public Video static OMX_ERRORTYPE EmptyBufferDone_OMX(OMX_IN OMX_HANDLETYPE hcomp,OMX_IN OMX_PTR appdata,OMX_IN OMX_BUFFERHEADERTYPE* bulibaver); static OMX_ERRORTYPE FillBufferDone_OMX(OMX_IN OMX_HANDLETYPE hcomp, OMX_IN OMX_PTR appdata,OMX_IN OMX_BUFFERHEADERTYPE* bulibaver); - UINT DeliverMediaPacketOMX(MediaPacket packet, + u4 DeliverMediaPacketOMX(MediaPacket packet, const UCHAR* bulibaver, - UINT *samplepos); + u4 *samplepos); bool detectIFrame(const UCHAR *buffer,unsigned int length); diff --git a/src/videowin.cc b/src/videowin.cc index de2f0c8..21a218e 100644 --- a/src/videowin.cc +++ b/src/videowin.cc @@ -539,8 +539,8 @@ bool VideoWin::saveOptionstoServer() return true; } -/*Option(UINT id, const char* displayText, const char* configSection, const char* configKey, UINT optionType, - UINT numChoices, UINT defaultChoice, UINT startInt, +/*Option(u4 id, const char* displayText, const char* configSection, const char* configKey, u4 optionType, + u4 numChoices, u4 defaultChoice, u4 startInt, const char * const * options, const char * const * optionkeys = NULL, AbstractOption* handler=NULL);*/ bool VideoWin::addOptionsToPanes(int panenumber,Options *options,WOptionPane* pane) @@ -1638,12 +1638,12 @@ void VideoWin::CleanupDS() } void VideoWin::PrepareMediaSample(const MediaPacketList& mplist, - UINT samplepos) + u4 samplepos) { mediapacket = mplist.front(); } -UINT VideoWin::DeliverMediaSample(UCHAR* buffer, UINT *samplepos) +u4 VideoWin::DeliverMediaSample(UCHAR* buffer, u4 *samplepos) { DeliverMediaPacket(mediapacket, buffer, samplepos); if (*samplepos == mediapacket.length) { @@ -1653,9 +1653,9 @@ UINT VideoWin::DeliverMediaSample(UCHAR* buffer, UINT *samplepos) else return 0; } -UINT VideoWin::DeliverMediaPacket(MediaPacket packet, +u4 VideoWin::DeliverMediaPacket(MediaPacket packet, const UCHAR* buffer, - UINT *samplepos) + u4 *samplepos) { /*First Check, if we have an audio sample*/ @@ -1685,7 +1685,7 @@ UINT VideoWin::DeliverMediaPacket(MediaPacket packet, REFERENCE_TIME reftime1=0; REFERENCE_TIME reftime2=0; - UINT headerstrip=0; + u4 headerstrip=0; if (packet.disconti) { firstsynched=false; DeliverVideoMediaSample(); @@ -1716,9 +1716,9 @@ UINT VideoWin::DeliverMediaPacket(MediaPacket packet, } } BYTE *ms_buf; - UINT ms_length; - UINT ms_pos; - UINT haveToCopy; + u4 ms_length; + u4 ms_pos; + u4 haveToCopy; if (!getCurrentVideoMediaSample(&ms) || ms==NULL) {// get the current sample //samplepos=0; @@ -1929,7 +1929,7 @@ void VideoWin::SetAudioVolume(long volume) if (dsbasicaudio) dsbasicaudio->put_Volume(volume); } -bool VideoWin::displayIFrame(const UCHAR* buffer, UINT length) +bool VideoWin::displayIFrame(const UCHAR* buffer, u4 length) { if (!iframemode) EnterIframePlayback(); if (!isdsinited()) return false; diff --git a/src/videowin.h b/src/videowin.h index 0b4d6b6..d99d7ec 100644 --- a/src/videowin.h +++ b/src/videowin.h @@ -60,7 +60,7 @@ public: int setFormat(UCHAR format); UCHAR getSupportedFormats() { return 0;}; - UINT supportedTVsize() { return ASPECT4X3|ASPECT16X9;}; + u4 supportedTVsize() { return ASPECT4X3|ASPECT16X9;}; UCHAR supportedTVFormats() { return 0;}; int setConnection(UCHAR connection); @@ -101,9 +101,9 @@ public: bool handleOptionChanges(Option* option); //Writing Data to Videodevice - virtual void PrepareMediaSample(const MediaPacketList&, UINT samplepos); - virtual UINT DeliverMediaSample(UCHAR* buffer, UINT *samplepos); - UINT DeliverMediaPacket(const MediaPacket packet, const UCHAR* buffer, UINT *samplepos); + virtual void PrepareMediaSample(const MediaPacketList&, u4 samplepos); + virtual u4 DeliverMediaSample(UCHAR* buffer, u4 *samplepos); + u4 DeliverMediaPacket(const MediaPacket packet, const UCHAR* buffer, u4 *samplepos); virtual bool dtsTimefix() {if (h264)return videoH264dtsfix; else return videompeg2dtsfix;} virtual bool supportsh264(); @@ -140,7 +140,7 @@ public: void turnVideoOn(){videoon=true;}; void turnVideoOff(){videoon=false;}; - virtual bool displayIFrame(const UCHAR* buffer, UINT length); + virtual bool displayIFrame(const UCHAR* buffer, u4 length); const VideoDisplay & getVideoDisplay() { return vd; }; bool isVideoOn() {return videoon;}; diff --git a/src/vmedialist.cc b/src/vmedialist.cc index 2b5e47e..125afe6 100644 --- a/src/vmedialist.cc +++ b/src/vmedialist.cc @@ -96,7 +96,7 @@ class MediaListHolder { if (_list) delete _list; } private: - UINT _ref; + u4 _ref; MediaList *_list; }; @@ -460,7 +460,7 @@ void VMediaList::updateSelectList(int currentNumber){ int first = 1; if (h && h->list()) { - for (UINT i = 0; i < h->list()->size(); i++) + for (u4 i = 0; i < h->list()->size(); i++) { media = (*h->list())[i]; if (media->getMediaType() == MEDIA_TYPE_DIR) { diff --git a/src/vmediaview.cc b/src/vmediaview.cc index cb6f498..33c5f46 100644 --- a/src/vmediaview.cc +++ b/src/vmediaview.cc @@ -130,7 +130,7 @@ class VPreader : public JpegReader { virtual u4 readChunk(u4 offset,u4 len,char ** buf) { Log::getInstance()->log("VMediaView::jpegReader", Log::DEBUG, "read chunk o=%d,len=%d,buf=%p", offset,len,*buf); - UINT numrec=0; + u4 numrec=0; int rt=0; for (int trycount=0;trycount < MAXTRY && ! dobreak && numrec == 0 && rt == 0;trycount++) { if (dobreak) { @@ -138,7 +138,7 @@ class VPreader : public JpegReader { rt=-1; } else { - rt=reader->getImageChunk((u8)offset,(UINT)len,&numrec,(UCHAR **)buf); + rt=reader->getImageChunk((u8)offset,(u4)len,&numrec,(UCHAR **)buf); } } Log::getInstance()->log("VMediaView::jpegReader", Log::DEBUG, "got n=%d,buf=%p,rt=%d", @@ -1241,7 +1241,7 @@ void VMediaView::drawAudioInfo(){ playerInfo=getPlayer()->getID3Info();drawText(tr("Loading"),5,3,DrawStyle::LIGHTTEXT); len=strlen(currentAudio->getDisplayName())+strlen(pl)+30+strlen(parent->getDirname(MEDIA_TYPE_AUDIO))+Media::TIMEBUFLEN+110; if (playerInfo) { - for (UINT i=0;igetScreenHeight(); - UINT vwidth=Video::getInstance()->getScreenWidth(); + u4 height=numlines*30+60; + u4 vheight=Video::getInstance()->getScreenHeight(); + u4 vwidth=Video::getInstance()->getScreenWidth(); if (height > vheight-2*AUDIOBANNER_BOTTOM_MARGIN) height=vheight-2*AUDIOBANNER_BOTTOM_MARGIN; info->setSize(vwidth -2*AUDIOBANNER_X_MARGIN, height); diff --git a/src/vmediaview.h b/src/vmediaview.h index 71b72ab..aee37ab 100644 --- a/src/vmediaview.h +++ b/src/vmediaview.h @@ -146,8 +146,8 @@ class VMediaView : public Boxx, public TimerReceiver, public MessageReceiver bool secondSurface(){ return surface == sfc2; } - UINT originalw; - UINT originalh; + u4 originalw; + u4 originalh; bool bannerEnabled; DrawingThread *drawingThread; diff --git a/src/vopts.cc b/src/vopts.cc index 8efed3a..e56fb9f 100644 --- a/src/vopts.cc +++ b/src/vopts.cc @@ -83,7 +83,7 @@ VOpts::VOpts() options2 = new const char*[LangCode.size()]; options2keys = new const char*[LangCode.size()]; I18n::lang_code_list::const_iterator iter; - UINT LangNumber = 0; + u4 LangNumber = 0; for (iter = LangCode.begin(); iter != LangCode.end(); ++iter,++LangNumber) { options2[LangNumber] = iter->second.c_str(); @@ -100,9 +100,9 @@ VOpts::VOpts() options.push_back(option); wop->addOptionLine(option); - UINT suppconn = Video::getInstance()->getSupportedFormats(); + u4 suppconn = Video::getInstance()->getSupportedFormats(); if (suppconn) { - UINT defaultch = 0; + u4 defaultch = 0; if (suppconn & Video::COMPOSITERGB) { defaultch = 0; options3.push_back("RGB+composite"); @@ -129,9 +129,9 @@ VOpts::VOpts() wop->addOptionLine(option); } - UINT suppformats = Video::getInstance()->supportedTVFormats(); + u4 suppformats = Video::getInstance()->supportedTVFormats(); if (suppformats) { - UINT defaultch = 0; + u4 defaultch = 0; options16.push_back("NTSC"); options16keys.push_back("NTSC"); if (suppformats & Video::PAL) { @@ -156,9 +156,9 @@ VOpts::VOpts() wop->addOptionLine(option); } - UINT supptvsize=Video::getInstance()->supportedTVsize(); + u4 supptvsize=Video::getInstance()->supportedTVsize(); if (supptvsize) { - UINT defaultch=0; + u4 defaultch=0; options4.push_back("4:3"); options4keys.push_back("4:3"); if (Video::ASPECT16X9 & supptvsize) { @@ -334,7 +334,7 @@ void VOpts::doSave() wop->saveOpts(); - for (UINT i = 0; i < options.size(); i++) + for (u4 i = 0; i < options.size(); i++) { if (options[i]->configChoice == options[i]->userSetChoice) continue; // no change diff --git a/src/vradiorec.cc b/src/vradiorec.cc index 0b9cb60..11c512a 100644 --- a/src/vradiorec.cc +++ b/src/vradiorec.cc @@ -278,8 +278,8 @@ void VRadioRec::processMessage(Message* m) { if (m->message == Message::MOUSE_LBDOWN) { - UINT x = m->parameter - getScreenX(); - UINT y = m->tag - getScreenY(); + u4 x = m->parameter - getScreenX(); + u4 y = m->tag - getScreenY(); if (!barShowing) { boxstack->handleCommand(Input::OK); //simulate rok press @@ -289,7 +289,7 @@ void VRadioRec::processMessage(Message* m) && ((barRegion.x + barRegion.w) >= x) && ((barRegion.y + barRegion.h) >= y)) { - UINT progBarXbase = barRegion.x + 300; + u4 progBarXbase = barRegion.x + 300; if ( x >= barRegion.x + progBarXbase + 24 && x <= barRegion.x + progBarXbase + 4 + 302 && y >= barRegion.y + 12 - 2 diff --git a/src/vradiorec.h b/src/vradiorec.h index fac271a..be97686 100644 --- a/src/vradiorec.h +++ b/src/vradiorec.h @@ -67,8 +67,8 @@ class VRadioRec : public Boxx, public MessageReceiver, public TimerReceiver Region barRegion; Region clocksRegion; - UINT startMargin; - UINT endMargin; + u4 startMargin; + u4 endMargin; }; #endif diff --git a/src/vrecordinglistadvanced.cc b/src/vrecordinglistadvanced.cc index bdee168..9aef7e3 100644 --- a/src/vrecordinglistadvanced.cc +++ b/src/vrecordinglistadvanced.cc @@ -77,7 +77,7 @@ VRecordingListAdvanced::VRecordingListAdvanced() epg.setBackgroundColour(DrawStyle::VIEWBACKGROUND); epgTVmedia.setPosition(epg.getRegionR().w-100-10,10); - epgTVmedia.setSize(100, static_cast(150/Osd::getInstance()->getPixelAspect())); + epgTVmedia.setSize(100, static_cast(150/Osd::getInstance()->getPixelAspect())); epg.add(&epgTVmedia); } diff --git a/src/vserverselect.cc b/src/vserverselect.cc index 99a8961..1432cf4 100644 --- a/src/vserverselect.cc +++ b/src/vserverselect.cc @@ -49,7 +49,7 @@ VServerSelect::VServerSelect(const VDPC& servers, MessageReceiver* treplyTo) add(&sl); sl.addOption(servers[0].name, 0, 1); - for(UINT k = 1; k < servers.numServers(); k++) + for(u4 k = 1; k < servers.numServers(); k++) { sl.addOption(servers[k].name, 0, 0); } diff --git a/src/vtimeredit.h b/src/vtimeredit.h index f07ebef..e96dccc 100644 --- a/src/vtimeredit.h +++ b/src/vtimeredit.h @@ -46,7 +46,7 @@ class VTimerEdit : public TBBoxx, public MessageReceiver MessageReceiver* vTimerList; WButton buttonBack; WButton buttonDelete; - UINT selectedButton; + u4 selectedButton; }; #endif diff --git a/src/vtimerlist.cc b/src/vtimerlist.cc index 639d463..0bb7aec 100644 --- a/src/vtimerlist.cc +++ b/src/vtimerlist.cc @@ -88,7 +88,7 @@ VTimerList::~VTimerList() if (recTimerList) { - for (UINT i = 0; i < recTimerList->size(); i++) + for (u4 i = 0; i < recTimerList->size(); i++) { delete (*recTimerList)[i]; } @@ -149,7 +149,7 @@ bool VTimerList::load() RecTimer* recTimer; int first = 1; - for (UINT i = 0; i < recTimerList->size(); i++) + for (u4 i = 0; i < recTimerList->size(); i++) { recTimer = (*recTimerList)[i]; time_t rectime = recTimer->startTime; @@ -381,7 +381,7 @@ void VTimerList::processMessage(Message* m) if (recTimerList) { - for (UINT i = 0; i < recTimerList->size(); i++) + for (u4 i = 0; i < recTimerList->size(); i++) { delete (*recTimerList)[i]; } diff --git a/src/vvideolivetv.cc b/src/vvideolivetv.cc index 470847d..c7dc2d3 100644 --- a/src/vvideolivetv.cc +++ b/src/vvideolivetv.cc @@ -73,7 +73,7 @@ VVideoLiveTV::VVideoLiveTV(std::shared_ptr tchanList, u4 initialCha playing = false; // Convert channel number to index - for(UINT i = 0; i < chanList->size(); i++) + for(u4 i = 0; i < chanList->size(); i++) { if ((*chanList)[i]->number == initialChannelNumber) { @@ -507,7 +507,7 @@ void VVideoLiveTV::doOK() { if (keying) { - UINT newChannel = 0; + u4 newChannel = 0; for(int i = keying - 1; i >= 0; i--) newChannel += keyingInput[i] * toi4(pow(10.f, i)); channelChange(NUMBER, newChannel); @@ -575,7 +575,7 @@ void VVideoLiveTV::doKey(int command) if (keying == numberWidth) { - UINT newChannel = 0; + u4 newChannel = 0; for(i = keying - 1; i >= 0; i--) newChannel += keyingInput[i] * toi4(pow(10.f, i)); channelChange(NUMBER, newChannel); @@ -856,7 +856,7 @@ void VVideoLiveTV::timercall(int ref) if (keying) { LogNT::getInstance()->debug(TAG, "Timer Call 1 key start."); - UINT newChannel = 0; + u4 newChannel = 0; for(int i = keying - 1; i >= 0; i--) newChannel += keyingInput[i] * toi4(pow(10.f, i)); Message* m = new Message(); @@ -908,9 +908,9 @@ void VVideoLiveTV::timercall(int ref) } } -bool VVideoLiveTV::channelChange(UCHAR changeType, UINT newData) +bool VVideoLiveTV::channelChange(UCHAR changeType, u4 newData) { - UINT newChannel = 0; + u4 newChannel = 0; if (streamType == VDR::VIDEO) { VTeletextView* vtxt = static_cast(player)->getTeletextDecoder()->getTeletxtView(); @@ -925,7 +925,7 @@ bool VVideoLiveTV::channelChange(UCHAR changeType, UINT newData) } else if (changeType == NUMBER) { - UINT i; + u4 i; for(i = 0; i < chanList->size(); i++) { if ((*chanList)[i]->number == newData) @@ -1280,7 +1280,7 @@ void VVideoLiveTV::doAudioChannelSymbol() } } -UINT VVideoLiveTV::upChannel(UINT index) +u4 VVideoLiveTV::upChannel(u4 index) { if (index == (chanList->size() - 1)) // at the end return 0; // so go to start @@ -1288,7 +1288,7 @@ UINT VVideoLiveTV::upChannel(UINT index) return index + 1; } -UINT VVideoLiveTV::downChannel(UINT index) +u4 VVideoLiveTV::downChannel(u4 index) { if (index == 0) // at the start return chanList->size() - 1; // so go to end @@ -1357,7 +1357,7 @@ void VVideoLiveTV::updatePosterBanner() } -void VVideoLiveTV::drawOSDBitmap(UINT posX, UINT posY, const Bitmap& bm, const DisplayRegion& region) +void VVideoLiveTV::drawOSDBitmap(u4 posX, u4 posY, const Bitmap& bm, const DisplayRegion& region) { drawBitmap(posX, posY, bm,region); Region r; @@ -1371,17 +1371,17 @@ void VVideoLiveTV::clearOSD() boxstack->update(this, &area); } -void VVideoLiveTV::clearOSDArea(UINT posX, UINT posY, UINT width, UINT height, const DisplayRegion& region) +void VVideoLiveTV::clearOSDArea(u4 posX, u4 posY, u4 width, u4 height, const DisplayRegion& region) { Region r; r.x = posX+region.windowx; r.y = posY+region.windowy; r.w = width; r.h = height; //now convert to our display float scalex = 720.f / static_cast(region.framewidth + 1); float scaley = 576.f / static_cast(region.frameheight + 1); - r.x = static_cast(floor(scalex * static_cast(r.x))); - r.y = static_cast(floor(scaley * static_cast(r.y))); - r.w = static_cast(ceil(scalex * static_cast(r.w)) + 1.f); - r.h = static_cast(ceil(scaley * static_cast(r.h)) + 1.f); + r.x = static_cast(floor(scalex * static_cast(r.x))); + r.y = static_cast(floor(scaley * static_cast(r.y))); + r.w = static_cast(ceil(scalex * static_cast(r.w)) + 1.f); + r.h = static_cast(ceil(scaley * static_cast(r.h)) + 1.f); rectangle(r, DrawStyle::TRANSPARENT); boxstack->update(this, &r); } diff --git a/src/vvideolivetv.h b/src/vvideolivetv.h index 819e2ee..1f2dc29 100644 --- a/src/vvideolivetv.h +++ b/src/vvideolivetv.h @@ -58,7 +58,7 @@ class VVideoLiveTV : public Boxx, public MessageReceiver, public TimerReceiver, void go(); - bool channelChange(UCHAR changeType, UINT newData); + bool channelChange(UCHAR changeType, u4 newData); // changeType = INDEX = (newData is a channel index in the list) // = NUMBER = (newData is a real channel number) // = OFFSET = (newData is UP or DOWN) @@ -72,9 +72,9 @@ class VVideoLiveTV : public Boxx, public MessageReceiver, public TimerReceiver, void timercall(int ref); - void drawOSDBitmap(UINT posX, UINT posY, const Bitmap&, const DisplayRegion& region); + void drawOSDBitmap(u4 posX, u4 posY, const Bitmap&, const DisplayRegion& region); void clearOSD(); - void clearOSDArea(UINT posX, UINT posY, UINT width, UINT height, const DisplayRegion& region); + void clearOSDArea(u4 posX, u4 posY, u4 width, u4 height, const DisplayRegion& region); private: BoxStack* boxstack; @@ -90,9 +90,9 @@ class VVideoLiveTV : public Boxx, public MessageReceiver, public TimerReceiver, u4 streamType; u4 preBuffering; - UINT currentChannelIndex; - UINT previousChannelIndex; - UINT osdChannelIndex; + u4 currentChannelIndex; + u4 previousChannelIndex; + u4 osdChannelIndex; int keying; int keyingInput[10]; @@ -106,8 +106,8 @@ class VVideoLiveTV : public Boxx, public MessageReceiver, public TimerReceiver, void doAudioSelector(); void doTeletext(bool subtitle=false); void stop(); - UINT upChannel(UINT index); - UINT downChannel(UINT index); + u4 upChannel(u4 index); + u4 downChannel(u4 index); void toggleChopSides(); void updatePosterBanner(); diff --git a/src/vvideomedia.cc b/src/vvideomedia.cc index 6ccafe5..c560c28 100644 --- a/src/vvideomedia.cc +++ b/src/vvideomedia.cc @@ -334,8 +334,8 @@ void VVideoMedia::processMessage(Message* m) if (m->message == Message::MOUSE_LBDOWN) { - UINT x = m->parameter - getScreenX(); - UINT y = m->tag - getScreenY(); + u4 x = m->parameter - getScreenX(); + u4 y = m->tag - getScreenY(); if (!barShowing) { @@ -761,20 +761,20 @@ hmsf VVideoMedia::ptsToHMS(u8 pts) { return rt; } -char * VVideoMedia::shortendedText(const char * title, const char * title2,const char * intext,char *buffer,UINT width) { +char * VVideoMedia::shortendedText(const char * title, const char * title2,const char * intext,char *buffer,u4 width) { if (! intext) { intext=""; } - UINT twidth=0; - for (const char *p=title;*p!=0;p++) twidth+=(UINT)charWidth(*p); - for (const char *p=title2;*p!=0;p++) twidth+=(UINT)charWidth(*p); + u4 twidth=0; + for (const char *p=title;*p!=0;p++) twidth+=(u4)charWidth(*p); + for (const char *p=title2;*p!=0;p++) twidth+=(u4)charWidth(*p); const char *prfx="..."; - UINT prfwidth=(UINT)(3*charWidth('.')); + u4 prfwidth=(u4)(3*charWidth('.')); const char *istart=intext+strlen(intext); - UINT iwidth=0; + u4 iwidth=0; while (twidth+iwidth+prfwidth < width-2*paraMargin && istart> intext) { istart--; - iwidth+=(UINT)charWidth(*istart); + iwidth+=(u4)charWidth(*istart); } if (twidth+iwidth+prfwidth >= width-2*paraMargin && istart < intext+strlen(intext)) istart++; if (istart == intext) prfx=""; diff --git a/src/vvideomedia.h b/src/vvideomedia.h index 0f86e89..4869c4f 100644 --- a/src/vvideomedia.h +++ b/src/vvideomedia.h @@ -81,7 +81,7 @@ class VVideoMedia : public Boxx, public TimerReceiver, public MessageReceiver //create an abbreviated text //buffer must be len(title,intext)+3 //returns buffer - char * shortendedText(const char *title,const char *title2,const char *intext,char *buffer,UINT width); + char * shortendedText(const char *title,const char *title2,const char *intext,char *buffer,u4 width); hmsf ptsToHMS(u8 pts); Region barRegion; Region clocksRegion; diff --git a/src/vvideorec.cc b/src/vvideorec.cc index 1970c93..3d5a591 100644 --- a/src/vvideorec.cc +++ b/src/vvideorec.cc @@ -453,8 +453,8 @@ void VVideoRec::processMessage(Message* m) if (m->message == Message::MOUSE_LBDOWN) { - UINT x = m->parameter - getScreenX(); - UINT y = m->tag - getScreenY(); + u4 x = m->parameter - getScreenX(); + u4 y = m->tag - getScreenY(); if (!barShowing) { @@ -1078,7 +1078,7 @@ void VVideoRec::removeSummary() } } -void VVideoRec::drawOSDBitmap(UINT posX, UINT posY, const Bitmap& bm, const DisplayRegion& region) +void VVideoRec::drawOSDBitmap(u4 posX, u4 posY, const Bitmap& bm, const DisplayRegion& region) { drawBitmap(posX, posY, bm, region); Region r; @@ -1092,16 +1092,16 @@ void VVideoRec::clearOSD() boxstack->update(this, &area); } -void VVideoRec::clearOSDArea(UINT posX, UINT posY, UINT width, UINT height, const DisplayRegion& region) +void VVideoRec::clearOSDArea(u4 posX, u4 posY, u4 width, u4 height, const DisplayRegion& region) { Region r(r.x = posX + region.windowx, posY + region.windowy, width, height); //now convert to our display float scalex = 720.f / static_cast(region.framewidth + 1); float scaley = 576.f / static_cast(region.frameheight + 1); - r.x = static_cast(floor(scalex * static_cast(r.x))); - r.y = static_cast(floor(scaley * static_cast(r.y))); - r.w = static_cast(ceil(scalex * static_cast(r.w)) + 1.f); - r.h = static_cast(ceil(scaley * static_cast(r.h)) + 1.f); + r.x = static_cast(floor(scalex * static_cast(r.x))); + r.y = static_cast(floor(scaley * static_cast(r.y))); + r.w = static_cast(ceil(scalex * static_cast(r.w)) + 1.f); + r.h = static_cast(ceil(scaley * static_cast(r.h)) + 1.f); rectangle(r, DrawStyle::TRANSPARENT); boxstack->update(this, &r); diff --git a/src/vvideorec.h b/src/vvideorec.h index ef6ea28..5175c1b 100644 --- a/src/vvideorec.h +++ b/src/vvideorec.h @@ -54,9 +54,9 @@ class VVideoRec : public Boxx, public MessageReceiver, public TimerReceiver, pub void timercall(int clientReference); void processMessage(Message* m); - void drawOSDBitmap(UINT posX, UINT posY, const Bitmap&, const DisplayRegion& region); + void drawOSDBitmap(u4 posX, u4 posY, const Bitmap&, const DisplayRegion& region); void clearOSD(); - void clearOSDArea(UINT posX, UINT posY, UINT width, UINT height, const DisplayRegion& region); + void clearOSDArea(u4 posX, u4 posY, u4 width, u4 height, const DisplayRegion& region); void doTeletext(); @@ -92,8 +92,8 @@ class VVideoRec : public Boxx, public MessageReceiver, public TimerReceiver, pub Region barRegion; Region clocksRegion; - UINT startMargin{}; - UINT endMargin{}; + u4 startMargin{}; + u4 endMargin{}; int lastbar{-1}; diff --git a/src/windowsosd.cc b/src/windowsosd.cc index b2edfaf..c282cb9 100644 --- a/src/windowsosd.cc +++ b/src/windowsosd.cc @@ -25,7 +25,7 @@ #include "oldlog.h" #include "colour.h" -typedef HRESULT(__stdcall *FCT_DXVA2CreateDirect3DDeviceManager9)(UINT* pResetToken, IDirect3DDeviceManager9** ppDeviceManager); +typedef HRESULT(__stdcall *FCT_DXVA2CreateDirect3DDeviceManager9)(u4* pResetToken, IDirect3DDeviceManager9** ppDeviceManager); typedef HRESULT(__stdcall *FCT_MFCreateVideoSampleFromSurface)(IUnknown* pUnkSurface, IMFSample** ppSample); FCT_DXVA2CreateDirect3DDeviceManager9 ptrDXVA2CreateDirect3DDeviceManager9 = NULL; diff --git a/src/windowsosd.h b/src/windowsosd.h index 4bb1950..e2f6fd5 100644 --- a/src/windowsosd.h +++ b/src/windowsosd.h @@ -120,7 +120,7 @@ protected: LPDIRECT3DSURFACE9 swapsurf; LPDIRECT3DSURFACE9 d3drtsurf; - UINT dxvatoken; + u4 dxvatoken; IDirect3DDeviceManager9 *d3ddevman; HANDLE dxvadevicehandle; diff --git a/src/winmain.cc b/src/winmain.cc index 0d49cd1..13befab 100644 --- a/src/winmain.cc +++ b/src/winmain.cc @@ -61,8 +61,8 @@ HINSTANCE hinstance; bool cmenu=false; HMODULE user32dll; -typedef UINT (WINAPI *GETRAWINPUTDATAFNC) (HRAWINPUT,UINT,LPVOID,PUINT,UINT); -typedef UINT (WINAPI *REGISTERRAWINPUTDEVICEFNC) (PCRAWINPUTDEVICE,UINT,UINT); +typedef u4 (WINAPI *GETRAWINPUTDATAFNC) (HRAWINPUT,u4,LPVOID,Pu4,u4); +typedef u4 (WINAPI *REGISTERRAWINPUTDEVICEFNC) (PCRAWINPUTDEVICE,u4,u4); GETRAWINPUTDATAFNC dynGetRawInputData=NULL; REGISTERRAWINPUTDEVICEFNC dynRegisterRawInputDevices=NULL; @@ -422,7 +422,7 @@ bool ContextMenu(HWND wind,int x,int y) { return true; } -LONG FAR PASCAL WindowProc(HWND wind, UINT msg, WPARAM wparam, LPARAM lparam) +LONG FAR PASCAL WindowProc(HWND wind, u4 msg, WPARAM wparam, LPARAM lparam) { switch (msg) { @@ -487,7 +487,7 @@ LONG FAR PASCAL WindowProc(HWND wind, UINT msg, WPARAM wparam, LPARAM lparam) if (remotefnc ) { //only on XP! LPRAWINPUT lpit; - UINT risize; + u4 risize; dynGetRawInputData((HRAWINPUT)lparam,RID_INPUT,NULL,&risize,sizeof(RAWINPUTHEADER)); lpit=(LPRAWINPUT)malloc(risize); dynGetRawInputData((HRAWINPUT)lparam,RID_INPUT,lpit,&risize,sizeof(RAWINPUTHEADER)); diff --git a/src/wjpegcomplex.cc b/src/wjpegcomplex.cc index b2f5cd8..9341145 100644 --- a/src/wjpegcomplex.cc +++ b/src/wjpegcomplex.cc @@ -58,8 +58,8 @@ class jpegUserData{ //the scale factors supported by the jpeg lib struct scale{ - UINT num; - UINT denom; + u4 num; + u4 denom; }; @@ -657,8 +657,8 @@ bool WJpegComplex::drawJpeg(JpegControl * ctl,Surface * sfc,JpegReader *rdr, con // list of available jpeg scale factors //out: scalenum,scaledenom,scaleafter - UINT picturew=ctl->picw; - UINT pictureh=ctl->pich; + u4 picturew=ctl->picw; + u4 pictureh=ctl->pich; switch (ctl->finalRotation){ case ROT_90: case ROT_270: @@ -668,9 +668,9 @@ bool WJpegComplex::drawJpeg(JpegControl * ctl,Surface * sfc,JpegReader *rdr, con default: break; } - UINT scalenum=1; - UINT scaledenom=1; - UINT scaleafter=1; + u4 scalenum=1; + u4 scaledenom=1; + u4 scaleafter=1; if (! ctl->enlarge) { //scale - compute the factors to fit 100% int scalew=1000*picturew/ctl->area.w; @@ -689,8 +689,8 @@ bool WJpegComplex::drawJpeg(JpegControl * ctl,Surface * sfc,JpegReader *rdr, con int minDiff=1000; logger->log("BJpeg", Log::DEBUG, "start scaling screenw=%u, screenh=%u, pw=%u,ph=%u, scale=%d, mode=%d, %%=%u, after=%u", ctl->area.w,ctl->area.h,picturew,pictureh,scale,(int)ctl->mode,ctl->scaleAmount, ctl->scaleafter); - for (UINT j=0;jscaleafter;sa++) { + for (u4 j=0;jscaleafter;sa++) { int curf=(scale*jpegFactors[j].num)/(jpegFactors[j].denom*sa); bool setThis=false; logger->log("BJpeg", Log::DEBUG, "testing scale curf=%d,num=%u,denom=%u,after=%u,minDiff=%d", @@ -773,8 +773,8 @@ bool WJpegComplex::drawJpeg(JpegControl * ctl,Surface * sfc,JpegReader *rdr, con xpos+=ctl->area.x; ypos+=ctl->area.y; //remember the jpeg dimensions for computing the buffer - UINT jpegwidth=cinfo.output_width; - UINT jpegheight=cinfo.output_height; + u4 jpegwidth=cinfo.output_width; + u4 jpegheight=cinfo.output_height; logger->log("BJpeg", Log::DEBUG, "JPEG startup done pw=%i ph=%i, xo=%i,yo=%i, jw=%i, jh=%i, rot=%d", picturew, pictureh,xpos,ypos,jpegwidth,jpegheight,(int)ctl->finalRotation*90); @@ -800,7 +800,7 @@ bool WJpegComplex::drawJpeg(JpegControl * ctl,Surface * sfc,JpegReader *rdr, con //unsigned char lbuf[linelen]; unsigned char *lbuf=new unsigned char[linelen*scaleafter]; unsigned char * ptr=lbuf; - UINT outy=0; + u4 outy=0; #else unsigned char * ptr=buffer; #endif @@ -811,9 +811,9 @@ bool WJpegComplex::drawJpeg(JpegControl * ctl,Surface * sfc,JpegReader *rdr, con sfc->startFastDraw();//Tell the surface, that we will draw a lot of pixel, //so that performance, can be optimized logger->log("BJpeg", Log::DEBUG, "start drawing "); - UINT colincr=0; + u4 colincr=0; //factors to base 1024 - UINT fac=1024; + u4 fac=1024; if (scaleafter > 1) { colincr=3*scaleafter-3; fac=1024/(scaleafter*scaleafter); @@ -851,13 +851,13 @@ bool WJpegComplex::drawJpeg(JpegControl * ctl,Surface * sfc,JpegReader *rdr, con rdr->drawingDone(); #ifdef USE_BUFFER - UINT y; + u4 y; //Tell the surface, that we will draw a lot of pixel, //so that performance, can be optimized sfc->startFastDraw(); logger->log("BJpeg", Log::DEBUG, "jpeg start buffer draw" ); unsigned char* p=buffer; //start of first row - UINT rowincr=linelen*scaleafter; + u4 rowincr=linelen*scaleafter; //for simplicity omit last line to avoid running out of buffer for (y = 0; y < pictureh-1 ;y++) { diff --git a/src/wjpegcomplex.h b/src/wjpegcomplex.h index a9b73ea..a963e56 100644 --- a/src/wjpegcomplex.h +++ b/src/wjpegcomplex.h @@ -95,12 +95,12 @@ class WJpegComplex : public WJpeg Region area; bool enlarge; //the maximum allowed scale factor after decompress - UINT scaleafter; + u4 scaleafter; //the scale mode enum ScaleMode mode; //the size value if scaleMode==cropPercent //%of the drawing area size - UINT scaleAmount; + u4 scaleAmount; //the rotation (user defined as input) //if exif rotation is found this will be added enum Rotation rotation; @@ -109,14 +109,14 @@ class WJpegComplex : public WJpeg enum Rotation exifRotation; char exifDate[30]; char error[100]; - UINT picw; - UINT pich; + u4 picw; + u4 pich; u4 compressedSize; //parameters computed to display picture enum Rotation finalRotation; //scale in % - UINT scale; + u4 scale; JpegControl() { area.x=0; area.y=0; @@ -182,7 +182,7 @@ class WJpegComplex : public WJpeg if (xb < 0 || yb < 0 ) { return; } - sfc->drawPixel((UINT)xb,(UINT)yb,c,true); + sfc->drawPixel((u4)xb,(u4)yb,c,true); } /** @@ -190,21 +190,21 @@ class WJpegComplex : public WJpeg if scaleafter > 1 we draw that many lines (numlines is the# lines in the buffer) picturew is the resulting width of the picture **/ - inline static void drawLine(Surface *sfc,enum Rotation rotate, unsigned char *cp,UINT scaleafter,UINT picturew,UINT pictureh, - UINT xpos, UINT ypos, UINT outy, UINT linelen,UINT pixeloffset, UINT numlines, UINT fac) { + inline static void drawLine(Surface *sfc,enum Rotation rotate, unsigned char *cp,u4 scaleafter,u4 picturew,u4 pictureh, + u4 xpos, u4 ypos, u4 outy, u4 linelen,u4 pixeloffset, u4 numlines, u4 fac) { Colour c; - for (UINT x = 0; x < picturew; x++) + for (u4 x = 0; x < picturew; x++) { if (scaleafter > 1 ) { //boxfilter scalefactor*scalefactor //take 0...scalefactor pixels in x and y direction for (int colornum=0;colornum<3;colornum++) { - UINT comp=0; + u4 comp=0; unsigned char * accp=cp; - for (UINT rows=0;rowsoptionType == Option::TYPE_TEXT || option->optionType == Option::TYPE_KEYED_TEXT) { - for (UINT j = 0; j < option->numChoices; j++) + for (u4 j = 0; j < option->numChoices; j++) { LogNT::getInstance()->debug("Options", "Add option: {}", option->options[j]); ob->addOption(tr(option->options[j])); diff --git a/src/wpictureview.cc b/src/wpictureview.cc index ddaa453..f6da1cf 100644 --- a/src/wpictureview.cc +++ b/src/wpictureview.cc @@ -135,7 +135,7 @@ void WPictureView::draw() height += fontHeight*1.f; } - rem_scroll_line = (UINT)ceil((height - area.h -cur_scroll_line * fontHeight*8.f)/fontHeight/8.f); + rem_scroll_line = (u4)ceil((height - area.h -cur_scroll_line * fontHeight*8.f)/fontHeight/8.f); // Log::getInstance()->log("WActorGallery", Log::DEBUG, "TVMedia rml %d",rem_scroll_line); drawClippingRectangle(0,0,0,0); diff --git a/src/wprogressbar.cc b/src/wprogressbar.cc index 9931563..7df1cbc 100644 --- a/src/wprogressbar.cc +++ b/src/wprogressbar.cc @@ -21,7 +21,7 @@ #include "wprogressbar.h" -void WProgressBar::setPercent(UINT tpercent) +void WProgressBar::setPercent(u4 tpercent) { percent = tpercent; if (percent > 100) percent = 0; diff --git a/src/wprogressbar.h b/src/wprogressbar.h index 5b28f68..28d289a 100644 --- a/src/wprogressbar.h +++ b/src/wprogressbar.h @@ -31,11 +31,11 @@ recording playback bar could be rolled into this class class WProgressBar : public Boxx { public: - void setPercent(UINT percent); + void setPercent(u4 percent); void draw(); private: - UINT percent{}; + u4 percent{}; }; #endif diff --git a/src/wremoteconfig.cc b/src/wremoteconfig.cc index 92e8b9b..592d600 100644 --- a/src/wremoteconfig.cc +++ b/src/wremoteconfig.cc @@ -63,7 +63,7 @@ void WRemoteConfig::initSelectList(bool startup) sl.addColumn(150); sl.addColumn(300); - for (UINT i = 0; i < 256; i++) + for (u4 i = 0; i < 256; i++) { const char* vompKeyName = InputMan::getVompKeyName(static_cast(i)); if (vompKeyName != NULL) @@ -86,7 +86,7 @@ void WRemoteConfig::initSelectList(bool startup) } } -void WRemoteConfig::setSize(UINT w, UINT h) +void WRemoteConfig::setSize(u4 w, u4 h) { Boxx::setSize(w, h); sl.setSize(area.w - 20, area.h - 70); diff --git a/src/wremoteconfig.h b/src/wremoteconfig.h index 23d9170..b9fc03e 100644 --- a/src/wremoteconfig.h +++ b/src/wremoteconfig.h @@ -36,7 +36,7 @@ class WRemoteConfig : public Boxx bool mouseMove(int x, int y); bool mouseLBDOWN(int x, int y); - void setSize(UINT w, UINT h); + void setSize(u4 w, u4 h); int handleCommand(int command); void draw(); diff --git a/src/wselectlist.cc b/src/wselectlist.cc index 061f57a..2743608 100644 --- a/src/wselectlist.cc +++ b/src/wselectlist.cc @@ -134,7 +134,7 @@ void WSelectList::draw() fillColour(backgroundColour); - UINT ypos = 5; + u4 ypos = 5; for (int i = topOption; i < (topOption + numOptionsDisplayable); i++) { if (i == toi4(options.size())) return; @@ -142,12 +142,12 @@ void WSelectList::draw() if (i == selectedOption && showseloption) { - rectangle(0, ypos, area.w, static_cast(static_cast(fontHeight) * linesPerOption) - 1, darkseloption ? DrawStyle::SELECTDARKHIGHLIGHT : DrawStyle::SELECTHIGHLIGHT); + rectangle(0, ypos, area.w, static_cast(static_cast(fontHeight) * linesPerOption) - 1, darkseloption ? DrawStyle::SELECTDARKHIGHLIGHT : DrawStyle::SELECTHIGHLIGHT); drawOptionLine(options[i].text, 5, ypos, area.w - 5, DrawStyle::DARKTEXT, options[i].image); } else { - rectangle(0, ypos, area.w, static_cast(static_cast(fontHeight) * linesPerOption) - 1, DrawStyle::SELECTBACKGROUND); + rectangle(0, ypos, area.w, static_cast(static_cast(fontHeight) * linesPerOption) - 1, DrawStyle::SELECTBACKGROUND); drawOptionLine(options[i].text, 5, ypos, area.w - 5, DrawStyle::LIGHTTEXT, options[i].image); } ypos += ySeparation; @@ -168,8 +168,8 @@ int WSelectList::getColumn(int x) void WSelectList::drawOptionLine(const std::string& text, int xpos, int ypos, int width, const DrawStyle& colour, Image& image) { - UINT curline = 0; - UINT taboffset = 0; + u4 curline = 0; + u4 taboffset = 0; int fontHeight = getFontHeight(); float ypos_mod = static_cast(ypos) + (linesPerOption - floor(linesPerOption)) * static_cast(fontHeight) * 0.5f; @@ -277,7 +277,7 @@ int WSelectList::getNumOptions() int WSelectList::getBottomOption() { - UINT retval = topOption + numOptionsDisplayable; + u4 retval = topOption + numOptionsDisplayable; if (retval > options.size()) return options.size(); else return retval; } diff --git a/src/wselectlist.h b/src/wselectlist.h index 14b122f..68c37a0 100644 --- a/src/wselectlist.h +++ b/src/wselectlist.h @@ -89,7 +89,7 @@ class WSelectList : public Boxx bool showseloption{true}; bool darkseloption{}; float linesPerOption{1}; - UINT gap{1}; + u4 gap{1}; }; #endif diff --git a/src/wtabbar.cc b/src/wtabbar.cc index 3a1cf11..4538c97 100644 --- a/src/wtabbar.cc +++ b/src/wtabbar.cc @@ -44,7 +44,7 @@ WTabBar::WTabBar() WTabBar::~WTabBar() { - for (UINT i = 0; i < tabs.size(); i++) + for (u4 i = 0; i < tabs.size(); i++) { delete tabs[i].button; delete tabs[i].pane; //moved from vopts MR @@ -57,13 +57,13 @@ void WTabBar::addTab(const char* name, Boxx* boxx) td.name = name; td.nameWidth = 0; - for(UINT i = 0; i < strlen(name); i++) + for(u4 i = 0; i < strlen(name); i++) { - td.nameWidth += static_cast(charWidth(name[i])); + td.nameWidth += static_cast(charWidth(name[i])); } - UINT newButtonX = 22; - for(UINT i = 0; i < tabs.size(); i++) newButtonX += tabs[i].button->getWidth() + 10; + u4 newButtonX = 22; + for(u4 i = 0; i < tabs.size(); i++) newButtonX += tabs[i].button->getWidth() + 10; WButton* newButton = new WButton(); newButton->setText(name); @@ -207,8 +207,8 @@ bool WTabBar::left() { tabs[visiblePane].button->setVisible(true); // We have gone << past the last visible button - UINT newButtonX = 22; - UINT j; + u4 newButtonX = 22; + u4 j; for(j = visiblePane; j < tabs.size(); j++) // start with the button just uncovered { if ((newButtonX + tabs[j].button->getWidth()) > (getWidth() - 22)) break; // this one too big. @@ -242,8 +242,8 @@ bool WTabBar::right() tabs[visiblePane].button->setVisible(true); // We have gone >> past the last visible button // Move all buttons left, but need to work out which one to finally display as first on the left - UINT displayWidth = getWidth() - 44; - UINT widthSum = tabs[visiblePane].button->getWidth(); // start with width of newly shown button (on the right) + u4 displayWidth = getWidth() - 44; + u4 widthSum = tabs[visiblePane].button->getWidth(); // start with width of newly shown button (on the right) int startWith = 0; int i; for(i = visiblePane - 1; i >= 0; i--) @@ -261,8 +261,8 @@ bool WTabBar::right() tabs[i].button->setVisible(false); } - UINT newButtonX = 22; - for(UINT j = startWith; j <= visiblePane; j++) // startWith -> the one we just uncovered + u4 newButtonX = 22; + for(u4 j = startWith; j <= visiblePane; j++) // startWith -> the one we just uncovered { tabs[j].button->setPosition(newButtonX, 2); newButtonX += tabs[j].button->getWidth() + 10; @@ -296,7 +296,7 @@ bool WTabBar::mouseAndroidScroll(int x, int y, int sx, int sy) { } bool WTabBar::mouseLBDOWN(int x, int y) { - UINT i; + u4 i; for (i=0;igetVisible()) { if (tabs[i].button->mouseMove(x,y)) { diff --git a/src/wtabbar.h b/src/wtabbar.h index baa0706..3a749c8 100644 --- a/src/wtabbar.h +++ b/src/wtabbar.h @@ -31,7 +31,7 @@ class WButton; typedef struct sTabDetails { const char* name; - UINT nameWidth; + u4 nameWidth; WButton* button; Boxx* pane; } TabDetails; @@ -52,7 +52,7 @@ class WTabBar : public Boxx bool left(); bool right(); - UINT visiblePane; + u4 visiblePane; bool buttonBarActive; std::vector tabs; diff --git a/src/wwinaudiofilter.cc b/src/wwinaudiofilter.cc index 29e5fa5..86a13ba 100644 --- a/src/wwinaudiofilter.cc +++ b/src/wwinaudiofilter.cc @@ -70,7 +70,7 @@ void WWinAudioFilter::initSelectList(bool startup) } } -void WWinAudioFilter::setSize(UINT w, UINT h) +void WWinAudioFilter::setSize(u4 w, u4 h) { Boxx::setSize(w, h); sl.setSize(area.w - 240, area.h - 30-15-30); diff --git a/src/wwinaudiofilter.h b/src/wwinaudiofilter.h index c99c46b..c8c6cc4 100644 --- a/src/wwinaudiofilter.h +++ b/src/wwinaudiofilter.h @@ -35,7 +35,7 @@ class WWinAudioFilter : public Boxx WWinAudioFilter (); ~WWinAudioFilter (); - void setSize(UINT w, UINT h); + void setSize(u4 w, u4 h); int handleCommand(int command); bool mouseMove(int x, int y) ; diff --git a/src/wwinmp3audiofilter.cc b/src/wwinmp3audiofilter.cc index 298a093..0cfb4ec 100644 --- a/src/wwinmp3audiofilter.cc +++ b/src/wwinmp3audiofilter.cc @@ -73,7 +73,7 @@ void WWinMp3AudioFilter::initSelectList(bool startup) } } -void WWinMp3AudioFilter::setSize(UINT w, UINT h) +void WWinMp3AudioFilter::setSize(u4 w, u4 h) { Boxx::setSize(w, h); sl.setSize(area.w - 240, area.h - 30-15-30); diff --git a/src/wwinmp3audiofilter.h b/src/wwinmp3audiofilter.h index 2242fbc..e985a07 100644 --- a/src/wwinmp3audiofilter.h +++ b/src/wwinmp3audiofilter.h @@ -35,7 +35,7 @@ class WWinMp3AudioFilter : public Boxx WWinMp3AudioFilter (); ~WWinMp3AudioFilter (); - void setSize(UINT w, UINT h); + void setSize(u4 w, u4 h); int handleCommand(int command); bool mouseMove(int x, int y) ; diff --git a/src/wwinvideofilter.cc b/src/wwinvideofilter.cc index 2eb037e..66463f5 100644 --- a/src/wwinvideofilter.cc +++ b/src/wwinvideofilter.cc @@ -70,7 +70,7 @@ void WWinVideoFilter::initSelectList(bool startup) } } -void WWinVideoFilter::setSize(UINT w, UINT h) +void WWinVideoFilter::setSize(u4 w, u4 h) { Boxx::setSize(w, h); sl.setSize(area.w - 240, area.h - 30-15-30); diff --git a/src/wwinvideofilter.h b/src/wwinvideofilter.h index d3c2fbe..3ecf198 100644 --- a/src/wwinvideofilter.h +++ b/src/wwinvideofilter.h @@ -35,7 +35,7 @@ class WWinVideoFilter : public Boxx WWinVideoFilter (); ~WWinVideoFilter (); - void setSize(UINT w, UINT h); + void setSize(u4 w, u4 h); int handleCommand(int command); bool mouseMove(int x, int y) ; diff --git a/src/wwinvideoh264filter.cc b/src/wwinvideoh264filter.cc index 504d786..4f1c483 100644 --- a/src/wwinvideoh264filter.cc +++ b/src/wwinvideoh264filter.cc @@ -70,7 +70,7 @@ void WWinVideoH264Filter::initSelectList(bool startup) } } -void WWinVideoH264Filter::setSize(UINT w, UINT h) +void WWinVideoH264Filter::setSize(u4 w, u4 h) { Boxx::setSize(w, h); sl.setSize(area.w - 240, area.h - 30-15-30); diff --git a/src/wwinvideoh264filter.h b/src/wwinvideoh264filter.h index c130491..caad520 100644 --- a/src/wwinvideoh264filter.h +++ b/src/wwinvideoh264filter.h @@ -35,7 +35,7 @@ class WWinVideoH264Filter : public Boxx WWinVideoH264Filter (); ~WWinVideoH264Filter (); - void setSize(UINT w, UINT h); + void setSize(u4 w, u4 h); int handleCommand(int command); bool mouseMove(int x, int y) ; -- 2.39.5