]> git.vomp.tv Git - vompclient.git/commitdiff
Type change: UCHAR -> u1
authorChris Tallon <chris@vomp.tv>
Sun, 14 Aug 2022 17:08:35 +0000 (17:08 +0000)
committerChris Tallon <chris@vomp.tv>
Sun, 14 Aug 2022 17:08:35 +0000 (17:08 +0000)
113 files changed:
src/audio.h
src/audioomx.cc
src/audioomx.h
src/audioplayer.cc
src/audioplayer.h
src/audiowin.cc
src/audiowin.h
src/bitmap.cc
src/bitmap.h
src/boxx.cc
src/boxx.h
src/channel.h
src/defines.h
src/demuxer.cc
src/demuxer.h
src/demuxeraudio.cc
src/demuxeraudio.h
src/demuxermedia.cc
src/demuxermedia.h
src/demuxerts.cc
src/demuxerts.h
src/demuxervdr.cc
src/demuxervdr.h
src/draintarget.h
src/dvbsubtitles.cc
src/dvbsubtitles.h
src/imageloader.cc
src/imagereader.cc
src/imagereader.h
src/input.cc
src/input.h
src/inputcec.cc
src/inputcec.h
src/inputlinux.cc
src/inputlinux.h
src/inputlirc.cc
src/inputlirc.h
src/inputman.cc
src/inputman.h
src/inputudp.cc
src/inputudp.h
src/inputwin.cc
src/inputwin.h
src/media.cc
src/mediafile.cc
src/movieinfo.h
src/option.cc
src/option.h
src/osdopenvg.cc
src/osdopenvg.h
src/osdvector.h
src/osdwinvector.cc
src/osdwinvector.h
src/playerlive.h
src/playermedia.cc
src/playermedia.h
src/playerradiolive.cc
src/playerradiolive.h
src/playerradiorec.cc
src/playerradiorec.h
src/playervideolive.cc
src/playervideolive.h
src/playervideorec.cc
src/playervideorec.h
src/recinfo.cc
src/recinfo.h
src/recording.cc
src/serialize.cc
src/serialize.h
src/stream.cc
src/stream.h
src/surface.cc
src/surface.h
src/surfacedirectfb.cc
src/surfacevector.cc
src/surfacevector.h
src/tbboxx.cc
src/tbboxx.h
src/tcp.h
src/teletextdecodervbiebu.cc
src/teletextdecodervbiebu.h
src/util.cc
src/vdpc.cc
src/vdr.cc
src/vdr.h
src/vdrrequestpacket.cc
src/vdrrequestpacket.h
src/vdrresponsepacket.cc
src/vdrresponsepacket.h
src/vepgsettimer.h
src/video.h
src/videoomx.cc
src/videoomx.h
src/videowin.cc
src/videowin.h
src/vinfo.h
src/vmediaview.cc
src/vquestion.cc
src/vquestion.h
src/vradiorec.cc
src/vvideolivetv.cc
src/vvideolivetv.h
src/vvideomedia.cc
src/vvideomedia.h
src/vvideorec.cc
src/wbutton.cc
src/wbutton.h
src/winmain.cc
src/woptionbox.cc
src/woptionbox.h
src/wremoteconfig.cc
src/wsymbol.cc
src/wsymbol.h

index 4a3342b4300eda0fd1d33a427d75a787d02a4700..23948f6f33c95671b032125d0fc309447f36df32 100644 (file)
@@ -44,9 +44,9 @@ class Audio : public DrainTarget, public AbstractOption
     static Audio* getInstance();
    // static void setInstance(Audio* );
 
-    virtual int init(UCHAR streamType)=0;
+    virtual int init(u1 streamType)=0;
     virtual int shutdown()=0;
-    virtual int setStreamType(UCHAR streamType)=0;
+    virtual int setStreamType(u1 streamType)=0;
     virtual int setChannel()=0;
     virtual int setSource()=0;
     virtual int sync()=0;
@@ -80,9 +80,9 @@ class Audio : public DrainTarget, public AbstractOption
     int doMuting();
 
     // Audio stream type  // FIXME these are MVP specific (probably!)
-    const static UCHAR MPEG2_PES = 2;
-    const static UCHAR MPEG1_PES = 3; // unused
-    const static UCHAR MP3 = 0;  //media player
+    const static u1 MPEG2_PES = 2;
+    const static u1 MPEG1_PES = 3; // unused
+    const static u1 MP3 = 0;  //media player
 
 #ifdef DEV
     virtual int test()=0;
@@ -91,9 +91,9 @@ class Audio : public DrainTarget, public AbstractOption
   protected:
     static Audio* instance;
     int initted;
-    UCHAR userMute;
-    UCHAR systemMute;
-    UCHAR muted;
+    u1 userMute;
+    u1 systemMute;
+    u1 muted;
     int volume;
 
     audio_volume Aoffset;
index 6ea98035436a63eb15ca8c23e4c5c404c7b11330..ece2aa7b1a96cf8db8e0ceecd7b865926c9f9523 100644 (file)
@@ -84,7 +84,7 @@ AudioOMX::~AudioOMX()
 {
 }
 
-int AudioOMX::init(UCHAR tstreamType) {
+int AudioOMX::init(u1 tstreamType) {
        if (initted)
                return 0;
        initted = 1;
@@ -99,7 +99,7 @@ int AudioOMX::init(UCHAR tstreamType) {
        unMute();
 
        decompress_buffer_size=20000;
-       decompress_buffer=static_cast<UCHAR*>(malloc(decompress_buffer_size));
+       decompress_buffer=static_cast<u1*>(malloc(decompress_buffer_size));
        decompress_buffer_filled=0;
 
 #if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 9, 100)
@@ -530,7 +530,7 @@ OMX_ERRORTYPE AudioOMX::FillBufferDone_OMX(OMX_IN OMX_HANDLETYPE /* hcomp */, OM
   return OMX_ErrorNone;
 }
 
-int AudioOMX::setStreamType(UCHAR /* type */)
+int AudioOMX::setStreamType(u1 /* type */)
 {
   if (!initted) return 0;
 
@@ -1614,7 +1614,7 @@ int AudioOMX::test()
 }
 #endif
 
-unsigned int AudioOMX::AdvanceMpAudioSync(const UCHAR *data,unsigned int size,unsigned int *framesize)
+unsigned int AudioOMX::AdvanceMpAudioSync(const u1 *data,unsigned int size,unsigned int *framesize)
 {
        if (size<=2) return size; // silly;
        unsigned int atest=0;
@@ -1690,7 +1690,7 @@ unsigned int AudioOMX::AdvanceMpAudioSync(const UCHAR *data,unsigned int size,un
        return size;
 }
 
-unsigned int AudioOMX::AdvanceAc3AudioSync(const UCHAR *data,unsigned int size,unsigned int *framesize)
+unsigned int AudioOMX::AdvanceAc3AudioSync(const u1 *data,unsigned int size,unsigned int *framesize)
 {
        if (size<=4) return size; // silly;
        const int frm_size_tab[] = { 64, 64, 80, 80, 96, 96, 112, 112, 128, 128,
@@ -1714,7 +1714,7 @@ unsigned int AudioOMX::AdvanceAc3AudioSync(const UCHAR *data,unsigned int size,u
        return size;
 }
 
-unsigned int AudioOMX::AdvanceAacLatmAudioSync(const UCHAR *data,unsigned int size,unsigned int *framesize)
+unsigned int AudioOMX::AdvanceAacLatmAudioSync(const u1 *data,unsigned int size,unsigned int *framesize)
 {
        if (size<=4) return size; // silly;
        unsigned int atest=0;
@@ -1737,7 +1737,7 @@ void AudioOMX::PrepareMediaSample(const MediaPacketList& mplist, u4 /* samplepos
   packet = mplist.front();
 }
 
-u4 AudioOMX::DeliverMediaSample(UCHAR* buffer, u4* samplepos) {
+u4 AudioOMX::DeliverMediaSample(u1* buffer, u4* samplepos) {
        DeliverMediaPacket(packet, buffer, samplepos);
        if (*samplepos == packet.length) {
                *samplepos = 0;
@@ -1792,7 +1792,7 @@ bool AudioOMX::DrainTargetBufferFull()
 }
 
 
-u4 AudioOMX::DeliverMediaPacket(MediaPacket mpacket, const UCHAR* buffer,
+u4 AudioOMX::DeliverMediaPacket(MediaPacket mpacket, const u1* buffer,
                u4 *samplepos) {
        /*First Check, if we have an audio sample*/
        VideoOMX* vw = static_cast<VideoOMX*>(Video::getInstance());
index 27e965097b5d9f8d985eeac1ab88d10bbeb7dd68..c36314c0f5021028e86d6d6a11b79083cb57cb6b 100644 (file)
@@ -43,10 +43,10 @@ class AudioOMX : public Audio
     AudioOMX();
     virtual ~AudioOMX();
 
-    int init(UCHAR streamType);
+    int init(u1 streamType);
     int shutdown();
 
-    int setStreamType(UCHAR streamType);
+    int setStreamType(u1 streamType);
     int setChannel();
     int setSource();
     int sync();
@@ -76,8 +76,8 @@ class AudioOMX : public Audio
 
     //Writing Data to Audiodevice
     virtual void PrepareMediaSample(const MediaPacketList&, u4 samplepos);
-    virtual u4 DeliverMediaSample(UCHAR* buffer, u4 *samplepos);
-    u4 DeliverMediaPacket(MediaPacket packet, const UCHAR* buffer,u4 *samplepos);
+    virtual u4 DeliverMediaSample(u1* buffer, u4 *samplepos);
+    u4 DeliverMediaPacket(MediaPacket packet, const u1* buffer,u4 *samplepos);
 
     virtual long long SetStartOffset(long long curreftime, bool *rsync);
     virtual void ResetTimeOffsets();
@@ -86,7 +86,7 @@ class AudioOMX : public Audio
     virtual bool DrainTargetBufferFull();
 
 
-       UCHAR getLastAType() {return lastAType;}
+       u1 getLastAType() {return lastAType;}
 
        bool loadOptionsFromServer(VDR* vdr);
        bool saveOptionstoServer();
@@ -100,8 +100,8 @@ class AudioOMX : public Audio
 
   private:
     int initAllParams();
-    UCHAR streamType;
-       UCHAR lastAType;
+    u1 streamType;
+       u1 lastAType;
        bool firstsynched;
 
     MediaPacket packet;
@@ -130,9 +130,9 @@ class AudioOMX : public Audio
 
 
 
-       unsigned int AdvanceAc3AudioSync(const UCHAR *data,unsigned int size,unsigned int *framesize);
-       unsigned int AdvanceAacLatmAudioSync(const UCHAR *data,unsigned int size,unsigned int *framesize);
-       unsigned int AdvanceMpAudioSync(const UCHAR *data,unsigned int size,unsigned int *framesize);
+       unsigned int AdvanceAc3AudioSync(const u1 *data,unsigned int size,unsigned int *framesize);
+       unsigned int AdvanceAacLatmAudioSync(const u1 *data,unsigned int size,unsigned int *framesize);
+       unsigned int AdvanceMpAudioSync(const u1 *data,unsigned int size,unsigned int *framesize);
 
 
     void ReturnEmptyOMXBuffer(OMX_BUFFERHEADERTYPE* bulibaver);
@@ -183,7 +183,7 @@ class AudioOMX : public Audio
     SwrContext* resam_con_libav;
 
 
-    UCHAR * decompress_buffer;
+    u1 * decompress_buffer;
     unsigned int decompress_buffer_size;
     unsigned int decompress_buffer_filled;
     bool lsync;
index 4c42116ad4bf48ef90f96589fc65df76926b8255..17083057156e3a42d566e3f3d6ea8b0315bfadcf 100644 (file)
@@ -150,7 +150,7 @@ bool AudioPlayer::isPlayerRunning() {
        return playerRunnig;
 }
 
-int AudioPlayer::setRequestedState(UCHAR rstate) {
+int AudioPlayer::setRequestedState(u1 rstate) {
        int rt=0;
        threadLock();
        requestState=rstate;
@@ -161,15 +161,15 @@ int AudioPlayer::setRequestedState(UCHAR rstate) {
 }
 
 
-UCHAR AudioPlayer::getState() {
-       UCHAR rt=0;
+u1 AudioPlayer::getState() {
+       u1 rt=0;
        threadLock();
        rt=state;
        threadUnlock();
        return rt;
 }
 
-void AudioPlayer::setState(UCHAR s) {
+void AudioPlayer::setState(u1 s) {
        threadLock();
        state=s;
        threadUnlock();
@@ -317,7 +317,7 @@ int AudioPlayer::openFile() {
     rt=MediaPlayer::getInstance()->getMediaInfo(2,&mi);
     canPosition=mi.canPosition;
     u4 rsize=0;
-    UCHAR *idbuf=NULL;
+    u1 *idbuf=NULL;
     if (canPosition) {
       rt=MediaPlayer::getInstance()->getMediaBlock(2,0,demuxer->headerBytes(),&rsize,&idbuf);
     }
@@ -357,11 +357,11 @@ int AudioPlayer::openFile() {
 }
 //method called by the playing thread to handle 
 //"commands" by the frontend
-UCHAR AudioPlayer::checkState()
+u1 AudioPlayer::checkState()
 {
        threadLock();
-       UCHAR rstate=requestState;
-       UCHAR cstate=state;
+       u1 rstate=requestState;
+       u1 cstate=state;
        int rseq=requestedSequence;
        int cseq=sequence;
        int fseq=playSequence;
@@ -543,7 +543,7 @@ void AudioPlayer::threadMethod()
   int retrycount=0;
   while(1)
   {
-               UCHAR cstate=checkState();
+               u1 cstate=checkState();
     if (! running) {
                        break;
                }
index 2fe12235464b9a186d25b7de46e80856c30df174..699f056aeac0a30b9527cc1150a8551eb07970e5 100644 (file)
@@ -106,17 +106,17 @@ class AudioPlayer : public Thread_TYPE, public Callback, public TimerReceiver
     
     virtual void call(void * caller);
 
-    UCHAR getState() ;
+    u1 getState() ;
 
-    const static UCHAR S_PLAY = 1;
-    const static UCHAR S_PAUSE = 2;
-    const static UCHAR S_POSITION = 3;
+    const static u1 S_PLAY = 1;
+    const static u1 S_PAUSE = 2;
+    const static u1 S_POSITION = 3;
                //player finished a song - no reset, next will follow
-    const static UCHAR S_DONE=5;
-    const static UCHAR S_STOP = 6;
-    const static UCHAR S_ERROR = 8;
-    const static UCHAR S_FF = 9;
-    const static UCHAR S_BACK = 10;
+    const static u1 S_DONE=5;
+    const static u1 S_STOP = 6;
+    const static u1 S_ERROR = 8;
+    const static u1 S_FF = 9;
+    const static u1 S_BACK = 10;
 
     //message parameters for frontend messages
     const static u4 CONNECTION_LOST=1;
@@ -156,20 +156,20 @@ class AudioPlayer : public Thread_TYPE, public Callback, public TimerReceiver
     int feederState;
 
     //synchronized get/set methods for states
-    int setRequestedState(UCHAR st);
-    void setState(UCHAR st);
+    int setRequestedState(u1 st);
+    void setState(u1 st);
 
     //to be called from within the thread
-    UCHAR checkState();
+    u1 checkState();
 
                //variables used by the thread
                u4 thisWrite;
          u4 thisRead;
     bool running;
 
-    UCHAR *threadBuffer;
-    UCHAR state;
-    UCHAR requestState;
+    u1 *threadBuffer;
+    u1 state;
+    u1 requestState;
     u8 streampos;
     u8 lenInBytes;
                u8 bytesWritten;
index 247a7e8838d6865138b40eddd6f6e3a45c45d6d7..fc4977d9cd86e99e3bf9d881570f4a0526ed0077 100644 (file)
@@ -61,7 +61,7 @@ AudioWin::~AudioWin()
 
 }
 
-int AudioWin::init(UCHAR tstreamType)
+int AudioWin::init(u1 tstreamType)
 {
   if (initted) return 0;
   initFilterDatabase();
@@ -82,7 +82,7 @@ int AudioWin::write(char *buf, int len)
   return 0; //write(fdAudio, buf, len);
 }
 
-int AudioWin::setStreamType(UCHAR type)
+int AudioWin::setStreamType(u1 type)
 {
   ((VideoWin*)VideoWin::getInstance())->setAudioStreamType(type);
   aud_type=type;
@@ -353,7 +353,7 @@ bool AudioWin::saveOptionstoServer()
     return true;
 }
 
-u4 AudioWin::DeliverMediaSample(UCHAR* buffer, u4 *samplepos)
+u4 AudioWin::DeliverMediaSample(u1* buffer, u4 *samplepos)
 {
   DeliverMediaPacket(mediapacket, buffer, samplepos);
   if (*samplepos == mediapacket.length) {
@@ -364,7 +364,7 @@ u4 AudioWin::DeliverMediaSample(UCHAR* buffer, u4 *samplepos)
 }
 
 u4 AudioWin::DeliverMediaPacket(const MediaPacket packet,
-     UCHAR* buffer,
+     u1* buffer,
      u4 *samplepos)
 {
 
index c48376d8bdf9c8aae265e60d62c0c733629a02f3..8cc8a21d1f71b0426522621b4b2021a3492b970a 100644 (file)
@@ -41,10 +41,10 @@ class AudioWin : public Audio
     AudioWin();
     ~AudioWin();
 
-    int init(UCHAR streamType);
+    int init(u1 streamType);
     int shutdown();
 
-    int setStreamType(UCHAR streamType);
+    int setStreamType(u1 streamType);
     int setChannel();
     int setSource();
     int sync();
@@ -64,8 +64,8 @@ class AudioWin : public Audio
 
     // Writing Data to Audiodevice
     virtual void PrepareMediaSample(const MediaPacketList&, u4 samplepos);
-    virtual u4 DeliverMediaSample(UCHAR* buffer, u4 *samplepos);
-    u4 DeliverMediaPacket(MediaPacket packet, UCHAR* buffer, u4 *samplepos);
+    virtual u4 DeliverMediaSample(u1* buffer, u4 *samplepos);
+    u4 DeliverMediaPacket(MediaPacket packet, u1* buffer, u4 *samplepos);
     
     int dsInitAudioFilter(IGraphBuilder* dsgraphbuilder);
     const AudioFilterDescList *getAudioFilterList(int &selected);
@@ -107,7 +107,7 @@ private:
   int  mp3audiofilterselected;
   bool firstsynched;
   long winvolume;
-  UCHAR aud_type;
+  u1 aud_type;
 #ifdef DEV
     int test();
 #endif
index 28d9fabeb92b9624bc0143ebfb39cf164f6a2b4c..2a544567215914aee36af8c8a06403492cb5b0d7 100644 (file)
@@ -30,24 +30,24 @@ DisplayRegion::DisplayRegion()
        windowh=575;
 }
 
-Palette::Palette(UCHAR tBpp)
+Palette::Palette(u1 tBpp)
 {
   numColours = 0;
   setBpp(tBpp);
 }
 
-void Palette::argb2yrba(u4 argb, UCHAR& y, UCHAR& cr, UCHAR& cb, UCHAR& a)
+void Palette::argb2yrba(u4 argb, u1& y, u1& cr, u1& cb, u1& a)
 {
-  a = static_cast<UCHAR>((argb & 0xFF000000) >> 24);
+  a = static_cast<u1>((argb & 0xFF000000) >> 24);
   int r = (argb & 0x00FF0000) >> 16;
   int g = (argb & 0x0000FF00) >> 8;
   int b = (argb & 0x000000FF);
-  y  = static_cast<UCHAR>((1052*r + 2065*g + 401*b + 4096*16 + 2048) / 4096);
-  cr = static_cast<UCHAR>((1799*r - 1508*g - 291*b + 4096*128 + 2048) / 4096);
-  cb = static_cast<UCHAR>((-608*r - 1191*g + 1799*b + 4096*128 + 2048) / 4096);
+  y  = static_cast<u1>((1052*r + 2065*g + 401*b + 4096*16 + 2048) / 4096);
+  cr = static_cast<u1>((1799*r - 1508*g - 291*b + 4096*128 + 2048) / 4096);
+  cb = static_cast<u1>((-608*r - 1191*g + 1799*b + 4096*128 + 2048) / 4096);
 }
 
-u4 Palette::yrba2argb(UCHAR y, UCHAR cr, UCHAR cb, UCHAR a)
+u4 Palette::yrba2argb(u1 y, u1 cr, u1 cb, u1 a)
 {
   int r, g, b;
   r = (4769*(y-16) + 6537*(cr-128) + 2048) / 4096;
@@ -62,7 +62,7 @@ u4 Palette::yrba2argb(UCHAR y, UCHAR cr, UCHAR cb, UCHAR a)
   return (a << 24) + (r << 16) + (g << 8) + b;
 }
 
-void Palette::setBpp(UCHAR tBpp)
+void Palette::setBpp(u1 tBpp)
 {
   bpp = tBpp;
   if (bpp > MAX_DEPTH) bpp = MAX_DEPTH;
@@ -75,7 +75,7 @@ void Palette::setBpp(UCHAR tBpp)
   A.resize(maxColours,255);
 }
 
-void Palette::setColour(UCHAR index, u4 tColour)
+void Palette::setColour(u1 index, u4 tColour)
 {
   if (index >= maxColours) return;
   if (index >= numColours) numColours = index + 1;
@@ -83,7 +83,7 @@ void Palette::setColour(UCHAR index, u4 tColour)
   argb2yrba(tColour, Y[index], Cr[index], Cb[index], A[index]);
 }
 
-void Palette::setYCrCbA(UCHAR index, UCHAR tY, UCHAR tCr, UCHAR tCb, UCHAR tA)
+void Palette::setYCrCbA(u1 index, u1 tY, u1 tCr, u1 tCb, u1 tA)
 {
   if (index >= maxColours) return;
   if (index >= numColours) numColours = index + 1;
@@ -91,7 +91,7 @@ void Palette::setYCrCbA(UCHAR index, UCHAR tY, UCHAR tCr, UCHAR tCb, UCHAR tA)
   colour[index] = yrba2argb(tY, tCr, tCb, tA);
 }
 
-Bitmap::Bitmap(u4 tWidth, u4 tHeight, UCHAR tBpp)
+Bitmap::Bitmap(u4 tWidth, u4 tHeight, u1 tBpp)
 {
   setSize(tWidth, tHeight);
   palette.setBpp(tBpp);
@@ -107,7 +107,7 @@ void Bitmap::setSize(u4 tWidth, u4 tHeight)
     bitmap.assign(width * height, 0);
 }
 
-bool Bitmap::setIndex(u4 x, u4 y, UCHAR index)
+bool Bitmap::setIndex(u4 x, u4 y, u1 index)
 {
   if (x <= width && y <= height)
   {
@@ -117,7 +117,7 @@ bool Bitmap::setIndex(u4 x, u4 y, UCHAR index)
   else return false;
 }
 
-UCHAR Bitmap::getIndex(u4 x, u4 y) const
+u1 Bitmap::getIndex(u4 x, u4 y) const
 {
   if (x > width || y > height)
     return 0;
@@ -133,7 +133,7 @@ u4 Bitmap::getColour(u4 x, u4 y) const
     return palette.getColour(bitmap[x + y*width]);
 }
 
-void Bitmap::setAllIndices(UCHAR index)
+void Bitmap::setAllIndices(u1 index)
 {
   bitmap.assign(width * height, index);
 }
index 5a9246c13f10b668907e01c30428c4221973b94a..250d28ce94965bb7ec55999d40ac71b9161502f8 100644 (file)
@@ -35,48 +35,48 @@ class DisplayRegion
 class Palette
 {
   public:
-    Palette(UCHAR tBpp = 8);
-    UCHAR getBpp() const { return bpp; }
+    Palette(u1 tBpp = 8);
+    u1 getBpp() const { return bpp; }
     void reset() { numColours = 0; }
-    void setBpp(UCHAR tBpp);
-    u4 getColour(UCHAR index) const { return index < maxColours ? colour[index] : 0; }
-    void setColour(UCHAR index, u4 tColour);
-    void setYCrCbA(UCHAR index, UCHAR tY, UCHAR tCr, UCHAR tCb, UCHAR tA);
+    void setBpp(u1 tBpp);
+    u4 getColour(u1 index) const { return index < maxColours ? colour[index] : 0; }
+    void setColour(u1 index, u4 tColour);
+    void setYCrCbA(u1 index, u1 tY, u1 tCr, u1 tCb, u1 tA);
     const std::vector<u4>& getColourVector() const { return colour; }
-    const std::vector<UCHAR>& getYVector() const { return Y; }
-    const std::vector<UCHAR>& getCrVector() const { return Cr; }
-    const std::vector<UCHAR>& getCbVector() const { return Cb; }
-    const std::vector<UCHAR>& getAVector() const { return A; }
+    const std::vector<u1>& getYVector() const { return Y; }
+    const std::vector<u1>& getCrVector() const { return Cr; }
+    const std::vector<u1>& getCbVector() const { return Cb; }
+    const std::vector<u1>& getAVector() const { return A; }
     u4 getNumColours() const { return numColours; }
   private:
     const static u4 MAX_DEPTH = 8;
     std::vector<u4> colour;
-    std::vector<UCHAR> Y;
-    std::vector<UCHAR> Cr;
-    std::vector<UCHAR> Cb;
-    std::vector<UCHAR> A;
-    UCHAR bpp;
+    std::vector<u1> Y;
+    std::vector<u1> Cr;
+    std::vector<u1> Cb;
+    std::vector<u1> A;
+    u1 bpp;
     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);
+    void argb2yrba(u4 argb, u1& y, u1& cr, u1& cb, u1& a);
+    u4 yrba2argb(u1 y, u1 cr, u1 cb, u1 a);
 };
 
 class Bitmap
 {
   private:
-    std::vector<UCHAR> bitmap;
+    std::vector<u1> bitmap;
     u4 width, height;
   public:
-    Bitmap(u4 tWidth = 0, u4 tHeight = 0, UCHAR tBpp = 8);
+    Bitmap(u4 tWidth = 0, u4 tHeight = 0, u1 tBpp = 8);
     Palette palette;
     u4 getWidth() const { return width; }
     u4 getHeight() const { return height; }
-    UCHAR getIndex(u4 x, u4 y) const;
+    u1 getIndex(u4 x, u4 y) const;
     u4 getColour(u4 x, u4 y) const;
-    const std::vector<UCHAR> & rawData() const { return bitmap; }
+    const std::vector<u1> & rawData() const { return bitmap; }
     void setSize(u4 tWidth, u4 tHeight);
-    bool setIndex(u4 x, u4 y, UCHAR index);
-    void setAllIndices(UCHAR index);
+    bool setIndex(u4 x, u4 y, u1 index);
+    void setAllIndices(u1 index);
 }; 
 
 #endif
index 7120a0e8182d57574a1bc076b1048576f84942a1..956830213868531843b6b316b225615b3e9f938f 100644 (file)
@@ -526,7 +526,7 @@ void Boxx::drawJpeg(const char* fileName, int x, int y, int *width, int *height)
   else if (surface) surface->drawJpeg(fileName, x, y, width, height);
 }
 
-void Boxx::drawMonoBitmap(UCHAR* base, int dx, int dy, unsigned int height,unsigned int width, const DrawStyle& nextColour)
+void Boxx::drawMonoBitmap(u1* base, int dx, int dy, unsigned int height,unsigned int width, const DrawStyle& nextColour)
 {
   if (parent) parent->drawMonoBitmap(base, area.x +dx, area.y + dy, height, width, nextColour);
   else if (surface) surface->drawMonoBitmap(base, dx,dy, height, width, nextColour);
index 57f5013e595aee56055d8c5b21f76baa2f17814f..e46ffc9eab02df48c21cd060c39343bc4643d2b7 100644 (file)
@@ -120,7 +120,7 @@ class Boxx
     void drawJpeg(const char *fileName,int x, int y,int *width, int *height);
 
     void drawTTChar(int ox, int oy,int x, int y, cTeletextChar c);
-    void drawMonoBitmap(UCHAR*base, int dx, int dy, unsigned int height,unsigned int width, const DrawStyle& nextColour);
+    void drawMonoBitmap(u1*base, int dx, int dy, unsigned int height,unsigned int width, const DrawStyle& nextColour);
 
     /* This is for system which need a locking of the drawing surface to speed up drawing */
     void startFastDraw();
index 84280dec55eb378e06ef3a83d3727b0cffb1ab02..5adc383040b586b4b669024d108874e871480840 100644 (file)
@@ -46,7 +46,7 @@ class Channel
     int index{-1};
     u4 number{};
     u4 type{};
-    UCHAR vstreamtype{2}; //Mpeg2
+    u1 vstreamtype{2}; //Mpeg2
     std::string name;
 
     u4 vpid{};
index a835c968266345363e67a69768f64dcda5ffc25d..3b0951b5ba0d379390ee86c5b3ef61ffe0e510be 100644 (file)
@@ -20,8 +20,6 @@
 #ifndef DEFINES_H
 #define DEFINES_H
 
-typedef unsigned char UCHAR;
-
 #include <stdint.h>
 
 typedef int8_t i1;
index 0d2400dde0dff545f6585c15dd5e2c94177b7bbb..a9e176e9f99467dc7c45769ec2fa987310823553 100644 (file)
@@ -50,7 +50,7 @@ Demuxer* Demuxer::instance = NULL;
 
 class NALUUnit {
 public:
-    NALUUnit(const UCHAR* buf,u4 length_buf);
+    NALUUnit(const u1* buf,u4 length_buf);
     ~NALUUnit();
 
 inline    u4 getBits(u4 num_bits);
@@ -60,16 +60,16 @@ inline    u4 getBits(u4 num_bits);
     int getPos(){return pos;};
 
 protected:
-    UCHAR* nalu_buf;
+    u1* nalu_buf;
     u4 nalu_length;
     u4 pos;
-    UCHAR bit_pos;
-    UCHAR working_byte;
+    u1 bit_pos;
+    u1 working_byte;
     u4 last_bytes;
     bool eonalu;
 };
 
-NALUUnit::NALUUnit(const UCHAR *buf, u4 length_buf)
+NALUUnit::NALUUnit(const u1 *buf, u4 length_buf)
 {
     nalu_length=0;
     nalu_buf=NULL;
@@ -103,7 +103,7 @@ NALUUnit::NALUUnit(const UCHAR *buf, u4 length_buf)
     nalu_end=std::min(length_buf-1,nalu_end);
     if (nalu_end <= nalu_start) return; // input buffer too small. corrupt data? ignore.
     nalu_length=nalu_end-nalu_start;
-    nalu_buf=(UCHAR*)malloc(nalu_length);
+    nalu_buf=(u1*)malloc(nalu_length);
     memcpy(nalu_buf,buf+nalu_start,nalu_length);
     pos=1;
 }
@@ -180,7 +180,7 @@ static const int PESPacket_initial_size = 2000;
 PESPacket::PESPacket()
 {
   data_size = PESPacket_initial_size;
-  data = (UCHAR*)malloc(data_size);
+  data = (u1*)malloc(data_size);
   data[0] = 0x00;
   data[1] = 0x00;
   data[2] = 0x01;
@@ -215,11 +215,11 @@ void PESPacket::copyFrom(const PESPacket& packet)
   substream = packet.substream;
   seq_header = packet.seq_header;
   data_size = size;
-  data = (UCHAR*)malloc(data_size);
+  data = (u1*)malloc(data_size);
   memcpy(data, packet.data, data_size);
 }
 
-void PESPacket::init(UCHAR type, UCHAR sub)
+void PESPacket::init(u1 type, u1 sub)
 {
   length = 0; 
   size = 6;
@@ -238,7 +238,7 @@ void PESPacket::truncate()
 
 
 
-int PESPacket::write(const UCHAR *buf, int len)
+int PESPacket::write(const u1 *buf, int len)
 {
 
 
@@ -248,7 +248,7 @@ int PESPacket::write(const UCHAR *buf, int 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);
+    data = (u1*)realloc(data, data_size);
   }
   memcpy(data + size, buf, len);
   length += len;
@@ -281,7 +281,7 @@ u8 PESPacket::getPTS() const
   else return PTS_INVALID;
 }
 
-UCHAR PESPacket::operator[] (u4 index) const
+u1 PESPacket::operator[] (u4 index) const
 {
   if (index >= size)
     return 0;
@@ -702,8 +702,8 @@ bool Demuxer::writeTeletext(bool * dataavail)
 bool Demuxer::submitPacket(PESPacket& packet)
 {
   u4 sent = 0;
-  UCHAR packet_type = packet.getPacketType();
-  const UCHAR* packetdata = packet.getData();
+  u1 packet_type = packet.getPacketType();
+  const u1* packetdata = packet.getData();
   if (packet_type >= PESTYPE_VID0 && packet_type <= PESTYPE_VIDMAX)
   {
     if (video_current == -1) video_current = packet_type;
@@ -722,7 +722,7 @@ bool Demuxer::submitPacket(PESPacket& packet)
     avail_mpaudchan[packet_type - PESTYPE_AUD0] = true;
     if (audio_current == packet_type && !aud_seeking)
        {
-      UCHAR type=MPTYPE_MPEG_AUDIO;
+      u1 type=MPTYPE_MPEG_AUDIO;
       switch (astreamtype)
       {
       case 3:
@@ -1134,7 +1134,7 @@ void Demuxer::parsePacketDetails(PESPacket& packet)
     }
 }
 
-u4 Demuxer::stripAudio(UCHAR* buf, u4 len)
+u4 Demuxer::stripAudio(u1* buf, u4 len)
 {
   u4 read_pos = 0, write_pos = 0;
   u4 pattern, packet_length;
@@ -1164,7 +1164,7 @@ u4 Demuxer::stripAudio(UCHAR* buf, u4 len)
   return write_pos;
 }
 
-void Demuxer::changeTimes(UCHAR* buf, u4 len,u4 playtime)
+void Demuxer::changeTimes(u1* buf, u4 len,u4 playtime)
 {
        u4 pattern, packet_length;
        u4 read_pos = 0;
@@ -1204,7 +1204,7 @@ void Demuxer::changeTimes(UCHAR* buf, u4 len,u4 playtime)
 
 }
 
-bool Demuxer::scanForVideo(UCHAR* buf, u4 len, bool &ish264)
+bool Demuxer::scanForVideo(u1* buf, u4 len, bool &ish264)
 {
   u4 pos = 3;
   u4 pattern;
index a68071cdde7f260615d0ba0461f686477687ee5d..b235e35ccfafced4ed3ff0c127c3f72b4eaf0422 100644 (file)
@@ -52,19 +52,19 @@ class PESPacket
     PESPacket(const PESPacket& packet);
     PESPacket& operator=(const PESPacket& packet);
     ~PESPacket();
-    void init(UCHAR type, UCHAR sub = 0);
+    void init(u1 type, u1 sub = 0);
     void truncate();
-    int  write(const UCHAR* buf, int len);
+    int  write(const u1* buf, int len);
 
-    UCHAR operator[] (u4 index) const;
+    u1 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; }
+    const u1* getData() const { return data; }
     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; }
+    u1 getPacketType() const { return packetType; }
+    void setSubstream(u1 s) { substream = s; }
+    u1 getSubstream() const { return substream; }
     u8 getPTS() const;
     bool hasPTS() const { return (getPTS() != PTS_INVALID); }
 
@@ -78,11 +78,11 @@ class PESPacket
 
   protected:
     void copyFrom(const PESPacket& packet);
-    UCHAR * data;
+    u1 * data;
     u4 length, size;
     u4 data_size;
-    UCHAR packetType;
-    UCHAR substream;
+    u1 packetType;
+    u1 substream;
     u4 mutable seq_header; // 0 = no, 1 = unknown, else = header offset
 };
 
@@ -110,9 +110,9 @@ class Demuxer
     bool writeVideo(bool * dataavail=NULL);
     bool writeTeletext(bool * dataavail=NULL);
 
-    virtual int scan(UCHAR* buf, int len) = 0;
-    virtual int findPTS(UCHAR* buf, int len, u8* dest) = 0;
-    virtual int put(UCHAR* buf, int len) = 0;
+    virtual int scan(u1* buf, int len) = 0;
+    virtual int findPTS(u1* buf, int len, u8* dest) = 0;
+    virtual int put(u1* buf, int len) = 0;
     virtual void setFrameNum(u4 /* frame */) {}
     virtual void setPacketNum(u4 /* packet */) {}
     virtual u4 getFrameNumFromPTS(u8 /* pts */) { return 0; }
@@ -128,7 +128,7 @@ class Demuxer
 
     int getHorizontalSize() { return horizontal_size; }
     int getVerticalSize() { return vertical_size; }
-    UCHAR getAspectRatio(int *tparx,int *tpary) {
+    u1 getAspectRatio(int *tparx,int *tpary) {
        *tparx=parx; *tpary=pary;return aspect_ratio; }
     int getFrameRate() { return frame_rate; }
     int getBitRate() { return bit_rate; }
@@ -136,7 +136,7 @@ class Demuxer
     u8 getVideoPTS() { return video_pts; }
     u8 getAudioPTS() { return audio_pts; }
 
-    enum AspectRatio : UCHAR
+    enum AspectRatio : u1
     {
       ASPECT_1_1  = 1,
       ASPECT_4_3  = 2,
@@ -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 u4 stripAudio(UCHAR* buf, u4 len);
-    void changeTimes(UCHAR* buf, u4 len,u4 playtime);
+    virtual u4 stripAudio(u1* buf, u4 len);
+    void changeTimes(u1* 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, u4 len, bool &ish264);
+    static bool scanForVideo(u1* buf, u4 len, bool &ish264);
 
     enum PESTYPE
     {
index 57bc65ef182e690759f421b9d5614ea0629030fa..08df047c70a458ab14ad2e08db85d1e44785b648 100644 (file)
 class PacketBuffer {
   
   public:
-    PacketBuffer(Stream *as,UCHAR strtype) {
+    PacketBuffer(Stream *as,u1 strtype) {
       log=Log::getInstance();
       audio=as;
       streamtype=strtype;
       newStream();
     }
     //just handle the data (do not deal with headers)
-    int putInternal(UCHAR* buf,int len,unsigned int &packetnum);
+    int putInternal(u1* buf,int len,unsigned int &packetnum);
     void reset(){
       partPacket=0;
       bytesWritten=0;
@@ -86,13 +86,13 @@ class PacketBuffer {
       reset();
     }
                bool doSkip();
-    UCHAR store[DemuxerAudio::PACKET_SIZE]; // Storage for partial packets
+    u1 store[DemuxerAudio::PACKET_SIZE]; // Storage for partial packets
     int partPacket;    // Length of partial packet stored from previous put()
     int bytesWritten;  //if they are !=0 and != framelength the stream is full...
     int framelen;
     Log * log;
     Stream * audio;
-    UCHAR streamtype;
+    u1 streamtype;
     //global counters
     u4 numpackets;
     u4 numbytes;
@@ -156,7 +156,7 @@ void DemuxerAudio::reset() {
   isStarting=true;
 }
 
-int DemuxerAudio::scan(UCHAR *buf, int len)
+int DemuxerAudio::scan(u1 *buf, int len)
 {
   //no differend pids here
   return 0;
@@ -281,7 +281,7 @@ static int  samplingRateTable[4][3]={
 /*11*/ {-1,-1,-1}};
 
 //max 7 char!
-static const char * mpegString(UCHAR code) {
+static const char * mpegString(u1 code) {
   switch(code) {
     case 0:
       return "MPEG2.5";
@@ -295,7 +295,7 @@ static const char * mpegString(UCHAR code) {
   return "UNKNOWN";
 }
 
-static const char * layerString(UCHAR code) {
+static const char * layerString(u1 code) {
   switch(code) {
     case 0:
       return "Layer reserved";
@@ -386,7 +386,7 @@ static struct tagid {
   */
 
 #define MAXLEN(tagtype) ((u4)frameLen<sizeof(tag->tagtype)-1?(u4)frameLen:sizeof(tag->tagtype)-1)
-bool DemuxerAudio::fillId3Tag(id3_tag * tag,UCHAR * frameData, int frameLen, int dataOffset, bool v23) {
+bool DemuxerAudio::fillId3Tag(id3_tag * tag,u1 * frameData, int frameLen, int dataOffset, bool v23) {
   int tl=v23?4:3;
   int tagIndex=-1;
   if (tag == NULL) return false;
@@ -398,7 +398,7 @@ bool DemuxerAudio::fillId3Tag(id3_tag * tag,UCHAR * frameData, int frameLen, int
     }
   }
   if (tagIndex < 0) return false;
-  UCHAR encoding=*(frameData+dataOffset);
+  u1 encoding=*(frameData+dataOffset);
   dataOffset++;
   frameLen--;
   if (encoding != 0) {
@@ -417,11 +417,11 @@ bool DemuxerAudio::fillId3Tag(id3_tag * tag,UCHAR * frameData, int frameLen, int
       break;
     case 3:  //genre
       {
-      UCHAR * st=frameData+dataOffset;
+      u1 * st=frameData+dataOffset;
       int genre=0;
       if (*st=='(') {
         genre=atoi((const char *)(st+1)) && 31;
-        st=(UCHAR *)id3_1_genre[genre];
+        st=(u1 *)id3_1_genre[genre];
       }
       strncpy(tag->genre,(char*)st,MAXLEN(genre));
       tag->genre[MAXLEN(genre)]=0;
@@ -461,9 +461,9 @@ bool DemuxerAudio::fillId3Tag(id3_tag * tag,UCHAR * frameData, int frameLen, int
   *  otherwise the id3 info is filled
   */
 
-int DemuxerAudio::parseID3V2(UCHAR *data, int len) {
+int DemuxerAudio::parseID3V2(u1 *data, int len) {
   int debug=0;
-  UCHAR * start=data;
+  u1 * start=data;
   id3_header id3header;
   id3_frame id3frame;
   id3_tag * id3tag=NULL;
@@ -517,7 +517,7 @@ int DemuxerAudio::parseID3V2(UCHAR *data, int len) {
       len-=id3header.extended_header.size+extended_hdr_hdr;
     }
     //set the end of the header
-    UCHAR * eob=start+id3header.size+10;
+    u1 * eob=start+id3header.size+10;
     bool readNext=true;
     while (data < eob && readNext)
     {
@@ -603,7 +603,7 @@ int DemuxerAudio::parseID3V2(UCHAR *data, int len) {
   */
 #define MEMCPY(type,len,offset) {int type##max=sizeof(tag->type)-1<len?sizeof(tag->type)-1:len;strncpy(tag->type,(char*)&data[offset],type##max);tag->type[type##max]=0;}
 
-int DemuxerAudio::parseID3V1(UCHAR *data, int len) {
+int DemuxerAudio::parseID3V1(u1 *data, int len) {
   int debug=1;
   if (len < 128) return -1;
   if(data[0]=='T' && data[1]=='A' && data[2]=='G')
@@ -635,15 +635,15 @@ int DemuxerAudio::parseID3V1(UCHAR *data, int len) {
 }
 
 //infos from http://www.multiweb.cz/twoinches/MP3inside.htm
-int DemuxerAudio::parseVBR(UCHAR *data, int len) {
-       UCHAR *hdr=findHeader(data,len);
+int DemuxerAudio::parseVBR(u1 *data, int len) {
+       u1 *hdr=findHeader(data,len);
        //we expect the header exactly here
        if (hdr != data) return -1;
        const static char * VBRHDR="Xing";
        int vbridpos=36;
-  UCHAR mpgtype=(data[1] & 0x18)>>3;
-  UCHAR chmode=(data[2] & 0xc0) >> 6;
-  UCHAR layer=(data[2] & 0x06) >>1;
+  u1 mpgtype=(data[1] & 0x18)>>3;
+  u1 chmode=(data[2] & 0xc0) >> 6;
+  u1 layer=(data[2] & 0x06) >>1;
        if ( mpgtype == 3 && chmode == 11) vbridpos=21;
        if ( mpgtype != 3 && chmode != 11) vbridpos=21;
        if ( mpgtype != 3 && chmode == 11) vbridpos=13;
@@ -709,10 +709,10 @@ int DemuxerAudio::parseVBR(UCHAR *data, int len) {
 
 
 
-UCHAR * DemuxerAudio::findHeader(UCHAR *buf, int len, bool writeInfo) {
+u1 * DemuxerAudio::findHeader(u1 *buf, int len, bool writeInfo) {
   while (len >= 3) //assume hdr+crc
   {
-    UCHAR pattern=*buf;
+    u1 pattern=*buf;
     buf++; len--;
     if (pattern != HDRBYTE1 ) continue;
     if ((*buf & HDRBYTE2MASK) != HDRBYTE2) continue;
@@ -724,33 +724,33 @@ UCHAR * DemuxerAudio::findHeader(UCHAR *buf, int len, bool writeInfo) {
 
 
 
-int DemuxerAudio::readHeader(UCHAR * hbuf,int len,bool writeInfo) {
+int DemuxerAudio::readHeader(u1 * hbuf,int len,bool writeInfo) {
   int curFramelen=0;
   int curBitrate=0;
   int curSamplingRate=0;
   if (*hbuf != HDRBYTE1) return -1;
   hbuf++;
   if ((*hbuf & HDRBYTE2MASK) != HDRBYTE2) return -1;
-  UCHAR mpgtype=(*hbuf & 0x18)>>3;
+  u1 mpgtype=(*hbuf & 0x18)>>3;
   if (mpgtype == 1) {
     log->log("DemuxerAudio",Log::DEBUG,"header invalid mpgtype %s %i %i %i",
         mpegString(mpgtype),*hbuf,*(hbuf+1),*(hbuf+2));
     return 1;
   }
-  UCHAR layer=(*hbuf & 0x06) >>1;
+  u1 layer=(*hbuf & 0x06) >>1;
   //bool hasCRC=!(*hbuf & 1);
   hbuf++;
-  UCHAR bitrateCode=(*hbuf & 0xf0) >>4;
-  UCHAR samplingCode=(*hbuf & 0x0c) >> 2;
+  u1 bitrateCode=(*hbuf & 0xf0) >>4;
+  u1 samplingCode=(*hbuf & 0x0c) >> 2;
   bool padding=*hbuf & 0x02;
   hbuf++;
   //0 Stereo, 1 JointStereo, 2 Dual, 3 Mono
-  UCHAR chmode=(*hbuf & 0xc0) >> 6;
-  //UCHAR extension=(*hbuf & 0x30) >> 4;
+  u1 chmode=(*hbuf & 0xc0) >> 6;
+  //u1 extension=(*hbuf & 0x30) >> 4;
 
   //layercode: 1-L3, 2-L2, 3-L1
   //columns 0,1,2 for MPEG1
-  UCHAR bitrateColumn=3-layer;
+  u1 bitrateColumn=3-layer;
   if (bitrateColumn > 2) {
     log->log("DemuxerAudio",Log::DEBUG,"header invalid layer %s %i %i %i",
         layerString(layer),*(hbuf-2),*(hbuf-1),*hbuf);
@@ -759,7 +759,7 @@ int DemuxerAudio::readHeader(UCHAR * hbuf,int len,bool writeInfo) {
   if (mpgtype != 3) bitrateColumn+=3;
   if (bitrateColumn>4) bitrateColumn=4;
   curBitrate=1000*bitrateTable[bitrateCode][bitrateColumn];
-  UCHAR sampleRateColumn=0;
+  u1 sampleRateColumn=0;
   if (mpgtype == 10) sampleRateColumn=1;
   if (mpgtype == 0) sampleRateColumn=2;
   curSamplingRate=samplingRateTable[samplingCode][sampleRateColumn];
@@ -821,7 +821,7 @@ int DemuxerAudio::readHeader(UCHAR * hbuf,int len,bool writeInfo) {
   return 0;
 }
 
-int DemuxerAudio::findPTS(UCHAR* buf, int len, u8* dest)
+int DemuxerAudio::findPTS(u1* buf, int len, u8* dest)
 {
   //we have no PTS number ...
   *dest=0;
@@ -842,13 +842,13 @@ bool PacketBuffer::doSkip() {
 }
        
 // just handle the real stream without dealing with the header
-int PacketBuffer::putInternal(UCHAR * wbuf, int len,unsigned int &packetnum)
+int PacketBuffer::putInternal(u1 * wbuf, int len,unsigned int &packetnum)
 {
    /* Important, the type passed to stream must be a mediapacket type as defined in 
        Draintarget.h and not the device setting of the mvp, so we have to translate it here,
        in order to get it working on windows
        --MR */
-  UCHAR mptype=0;
+  u1 mptype=0;
   switch (streamtype) {
         case Audio::MPEG1_PES: //?
         case Audio::MPEG2_PES: //Important, this must be a PES !
@@ -912,11 +912,11 @@ int PacketBuffer::putInternal(UCHAR * wbuf, int len,unsigned int &packetnum)
   more intelligent then we are...
   We only loose a correct position display.
   */
-int DemuxerAudio::put(UCHAR* wbuf, int len)
+int DemuxerAudio::put(u1* wbuf, int len)
 {
   //return audiostream.put(wbuf,len,streamtype);
   int framelen=PACKET_SIZE;
-  UCHAR *hdr;
+  u1 *hdr;
   int bytesConsumed=0;
   int oldBytes=0;
   if (tmpFill != 0 || (buffer->bufferEmpty() && len < HDRLEN)) {
@@ -1068,8 +1068,8 @@ const DemuxerAudio::vbrInfo * DemuxerAudio::getVBRINfo() {
        return vbr;
 }
 
-int DemuxerAudio::checkStart(UCHAR *b, int len) {
-  UCHAR *start=b;
+int DemuxerAudio::checkStart(u1 *b, int len) {
+  u1 *start=b;
   int id3len=parseID3V2(b,len);
   if (id3len > 0) {
     char * str=id3->toString();
@@ -1085,12 +1085,12 @@ int DemuxerAudio::checkStart(UCHAR *b, int len) {
                b+=vbrlen;
                len-=vbrlen;
        }
-  UCHAR * hdr=findHeader(b,len,true);
+  u1 * hdr=findHeader(b,len,true);
   if (hdr == NULL) return -1;
   return hdr-start;
 }
 
-int DemuxerAudio::checkID3(UCHAR *b, int len) {
+int DemuxerAudio::checkID3(u1 *b, int len) {
   if (len != 128) return -1;
   int rt=parseID3V1(b,len);
   if (rt >= 0) {
index bd9a3d17e8a68d90bccc5ba7ec6c5488e2e42ddb..ad9870691322f254f701777b96553ce99ea28d7e 100644 (file)
@@ -44,17 +44,17 @@ class DemuxerAudio : public Demuxer
                        u4 numFrames;
                        u4 numBytes;
                        u4 fileSeconds;
-                       UCHAR table[100];
+                       u1 table[100];
                } vbrInfo;
     DemuxerAudio(int p_vID = 0, int p_aID = 0);
                virtual ~DemuxerAudio();
     virtual void flush();
                virtual void reset();
-    virtual int scan(UCHAR* buf, int len);
-    virtual int findPTS(UCHAR* buf, int len, u8* dest);
+    virtual int scan(u1* buf, int len);
+    virtual int findPTS(u1* buf, int len, u8* dest);
     virtual void setVID(int p_vID);
     virtual void setAID(int p_aID,int type);
-    virtual int put(UCHAR* buf, int len);
+    virtual int put(u1* buf, int len);
 
                //special functions for the audioplayer
                bool isSync() ;
@@ -83,10 +83,10 @@ class DemuxerAudio : public Demuxer
                //will return the offset in buffer where the first valid
                //header was found (with potentially skipping ID3 and VBR)
                //return -1 if nothing found
-               int checkStart(UCHAR * buffer, int len);
+               int checkStart(u1 * buffer, int len);
                //check for ID3V1 (at the end)
                //return 0 if found
-               int checkID3(UCHAR * buffer, int len);
+               int checkID3(u1 * buffer, int len);
 
                //return length if we can do this
                //otherwise return 0
@@ -98,7 +98,7 @@ class DemuxerAudio : public Demuxer
 
                //try to read the iD3 tag value (V2xx) and
                //fill it into the ID3 store
-               bool fillId3Tag(id3_tag * tag,UCHAR * frameData, int frameLen, int dataOffset, bool v23);
+               bool fillId3Tag(id3_tag * tag,u1 * frameData, int frameLen, int dataOffset, bool v23);
 
     const static u4 PACKET_SIZE=4096;
   private:
@@ -112,7 +112,7 @@ class DemuxerAudio : public Demuxer
                */
                Log * log;
                
-               int readHeader(UCHAR* buf, int len, bool writeInfo=false);
+               int readHeader(u1* buf, int len, bool writeInfo=false);
 
                //info flags for the player
                bool inSync; //set if we read a valid header
@@ -135,10 +135,10 @@ class DemuxerAudio : public Demuxer
 
                //search for the start of a header
                //return NULL if none found
-               UCHAR * findHeader(UCHAR * buf, int len, bool writeInfo=false);
+               u1 * findHeader(u1 * buf, int len, bool writeInfo=false);
                //we need a buffer to be able to read at least a complete header
                const static int HDRLEN=4;
-               UCHAR tmpBuffer[PACKET_SIZE+HDRLEN];
+               u1 tmpBuffer[PACKET_SIZE+HDRLEN];
                u4 tmpFill;
 
                //compute the bytes/second from the BR info
@@ -148,18 +148,18 @@ class DemuxerAudio : public Demuxer
                //parse ID3V2 at the beginning
                //set info if there
                //return length of header, -1 if not found
-               int parseID3V2(UCHAR *data, int len);
+               int parseID3V2(u1 *data, int len);
                int id3_2_3_FrameParse(unsigned char buf[], id3_frame *frame);
     int id3_2_2_FrameParse(unsigned char buf[], id3_frame *frame);
 
                //parse ID3V1 at the end
                //set info if there, return -1 otherwise
-    int parseID3V1(UCHAR *data, int len) ;
+    int parseID3V1(u1 *data, int len) ;
 
                //parse a VBR header and set VBR info
                //input has to point to firts MPEG header in file
                //potentially after ID3V2
-               int parseVBR(UCHAR *data, int len);
+               int parseVBR(u1 *data, int len);
 
 
                class PacketBuffer* buffer;
index 285df3adca65c325735abbc4acaf06dafbc8c1f9..98c82fb693bb565c08318bc35fcc5f7d63d52b51 100644 (file)
@@ -70,7 +70,7 @@ void DemuxerMedia::flush()
   Demuxer::flush();
 }
 
-int DemuxerMedia::scan(UCHAR *buf, int len)
+int DemuxerMedia::scan(u1 *buf, int len)
 {
   int ret = 0;
   int astate=0; //hdrbyte
@@ -118,7 +118,7 @@ int DemuxerMedia::scan(UCHAR *buf, int len)
   return ret;
 }
 
-int DemuxerMedia::findPTS(UCHAR* buf, int len, u8* dest)
+int DemuxerMedia::findPTS(u1* buf, int len, u8* dest)
 {
   // nobody uses this
   // No PTS found.
@@ -139,7 +139,7 @@ void DemuxerMedia::setPacketNum(u4 npacket)
   Log::getInstance()->log("Demuxer", Log::DEBUG, "setPacketNum %d", npacket);
 }
 
-int DemuxerMedia::put(UCHAR* buf, int len)
+int DemuxerMedia::put(u1* buf, int len)
 {
   int ret = 0;    // return number of bytes consumed
   if (submitting)
@@ -282,13 +282,13 @@ void DemuxerMedia::parseVDRPacketDetails()
 
 //find a sequence header backward
 //search for 00 00 01 <video> backwards
-u8 DemuxerMedia::findLastPTS(UCHAR *buffer, u4 len) {
+u8 DemuxerMedia::findLastPTS(u1 *buffer, u4 len) {
   PESPacket pack;
   int pstate=4;
   u4 minlen=12;
   if (len < minlen) return 0;
-  UCHAR *curpos=buffer+len-minlen;
-  UCHAR *packend=buffer+len;
+  u1 *curpos=buffer+len-minlen;
+  u1 *packend=buffer+len;
   while ((curpos - pstate) > buffer) {
     switch (pstate){
       case 4:
index aafe056f8f79e4262855453882471ffcd73f5c01..60273bf405e6c1e2bc6d5b2a5ec8110e30bc5548 100644 (file)
@@ -31,16 +31,16 @@ class DemuxerMedia : public Demuxer
     DemuxerMedia();
     void reset();
     void flush();
-    int scan(UCHAR* buf, int len);
-    int findPTS(UCHAR* buf, int len, u8* dest);
-    int put(UCHAR* buf, int len);
+    int scan(u1* buf, int len);
+    int findPTS(u1* buf, int len, u8* dest);
+    int put(u1* buf, int len);
     void setFrameNum(u4 frame);
     void setPacketNum(u4 npacket);
     u4 getFrameNumFromPTS(u8 pts) {return 0;}
     u4 getPacketNum();
     u8 getLenPTS();
     u8 getCurrentPTS();
-    u8 findLastPTS(UCHAR *buf, u4 len);
+    u8 findLastPTS(u1 *buf, u4 len);
 
   private:
     int state;
index 0df18d0984b4f5477f4310837b26c0f04f4289d7..2ec0ef170a595c2d876be94203281e3129345693 100644 (file)
@@ -91,7 +91,7 @@ tPacket.init(PESTYPE_PRIVATE_1,PESTYPE_SUBSTREAM_TELETEXTMAX);
   pinfo.hasaccessunit=false;
 }
 
-int DemuxerTS::scan(UCHAR* /*buf*/, int /*len*/)
+int DemuxerTS::scan(u1* /*buf*/, int /*len*/)
 {
   switch (atype)
   {
@@ -150,7 +150,7 @@ void DemuxerTS::setTID(int p_tID)
 
 
 
-int DemuxerTS::findPTS(UCHAR* buf, int len, u8* dest)
+int DemuxerTS::findPTS(u1* buf, int len, u8* dest)
 {
   int scanaid=0;
 
@@ -163,12 +163,12 @@ int DemuxerTS::findPTS(UCHAR* buf, int len, u8* dest)
       
       int datalen = TS_SIZE - 4;
       int pid = ( (buf[1] & 0x1F) << 8 ) | buf[2];
-      UCHAR payload = buf[1] & 0x40;
+      u1 payload = buf[1] & 0x40;
       
       if (buf[3] & 0x20) // Adaptation field is present
           datalen -= (buf[4] + 1);
 
-      UCHAR* curbuf =buf+ (TS_SIZE - datalen);
+      u1* curbuf =buf+ (TS_SIZE - datalen);
      
 
       if (payload) {
@@ -245,7 +245,7 @@ void DemuxerTS::setPacketNum(u4 npacket)
   LogNT::getInstance()->debug("DemuxerTS", "setPacketNum {}", npacket);
 }
 
-int DemuxerTS::put(UCHAR* buf, int len)
+int DemuxerTS::put(u1* buf, int len)
 {
   int ret = 0;    // return number of bytes consumed
 
@@ -334,12 +334,12 @@ int DemuxerTS::put(UCHAR* buf, int len)
 }
 
 
-int DemuxerTS::processTS(UCHAR* buf)
+int DemuxerTS::processTS(u1* buf)
 {
   int datalen = TS_SIZE - 4;
 
   int pid = ( (buf[1] & 0x1F) << 8 ) | buf[2];
-  UCHAR payload = buf[1] & 0x40;
+  u1 payload = buf[1] & 0x40;
 
 
   if (buf[3] & 0x20) // Adaptation field is present
@@ -722,7 +722,7 @@ int DemuxerTS::processTS(UCHAR* buf)
         if (submitPacket(*packet) == 0) return 0;
         parsed = false;
         packet->truncate();
-        packet->write((UCHAR*)"\200\000\000", 3);
+        packet->write((u1*)"\200\000\000", 3);
         packet->write(buf, datalen);
       }
     }
@@ -861,7 +861,7 @@ void DemuxerTS::parseTSPacketDetails(PESPacket &packet) // Only important stuff
 }
 
 
-bool DemuxerTS::scanForVideo(UCHAR* buf, u4 len, bool &ish264)
+bool DemuxerTS::scanForVideo(u1* buf, u4 len, bool &ish264)
 {
     int pmtpidy=0;
 
@@ -874,12 +874,12 @@ bool DemuxerTS::scanForVideo(UCHAR* buf, u4 len, bool &ish264)
       
       int datalen = TS_SIZE - 4;
       int pid = ( (buf[1] & 0x1F) << 8 ) | buf[2];
-      UCHAR payload = buf[1] & 0x40;
+      u1 payload = buf[1] & 0x40;
       
       if (buf[3] & 0x20) // Adaptation field is present
           datalen -= (buf[4] + 1);
 
-      UCHAR* curbuf =buf+ (TS_SIZE - datalen);
+      u1* curbuf =buf+ (TS_SIZE - datalen);
      
       if (payload) {
           if (pid == 0x00) {//PAT, only take first program number, ignore the rest
@@ -939,7 +939,7 @@ bool DemuxerTS::scanForVideo(UCHAR* buf, u4 len, bool &ish264)
   return false;
 }
 
-u4 DemuxerTS::stripAudio(UCHAR* buf, u4 len) //it has to be adapted
+u4 DemuxerTS::stripAudio(u1* buf, u4 len) //it has to be adapted
 { 
     //This function strips all TS Headers and non video payload
     u4 readpos=0;
@@ -952,7 +952,7 @@ u4 DemuxerTS::stripAudio(UCHAR* buf, u4 len) //it has to be adapted
 
         int datalen = TS_SIZE - 4;
         int pid = ( (buf[readpos+1] & 0x1F) << 8 ) | buf[readpos+2];
-        UCHAR payload = buf[readpos+1] & 0x40;
+        u1 payload = buf[readpos+1] & 0x40;
         if (buf[readpos+3] & 0x20) { // Adaptation field is present
            datalen -= (buf[readpos+4] + 1);
         }
@@ -983,7 +983,7 @@ u4 DemuxerTS::stripAudio(UCHAR* buf, u4 len) //it has to be adapted
                     memcpy(buf+writepos,destpaket.getData(),destpaket.getSize());
                     writepos+=destpaket.getSize();
                     destpaket.truncate();
-                                       destpaket.write((UCHAR*)"\200\000\000", 3);
+                                       destpaket.write((u1*)"\200\000\000", 3);
                     destpaket.write(buf+readpos,towrite);
 
                 }
index ad6cc54ca73c49e6f0834de4a5071cd9c7031917..788752a57f78e43ddfdd18dab72bb77ff39116cc 100644 (file)
@@ -35,8 +35,8 @@ class DemuxerTS : public Demuxer
   public:
     DemuxerTS(int p_vID = 0, int p_aID = 0, int p_subID = 0, int p_tID = 0);    
     void flush();
-    int scan(UCHAR* buf, int len);
-    int findPTS(UCHAR* buf, int len, u8* dest);
+    int scan(u1* buf, int len);
+    int findPTS(u1* buf, int len, u8* dest);
     void setVID(int p_vID);
     void setTID(int p_tID);
     void setAID(int p_aID, int type, int streamtype,bool slivetv);
@@ -45,21 +45,21 @@ class DemuxerTS : public Demuxer
     int  getTID() { return tID; }
     int  getAID() { return aID; }
     int  getSubID() { return subID; }
-    int put(UCHAR* buf, int len);
+    int put(u1* buf, int len);
 
     void setFrameNum(u4 frame);
     void setPacketNum(u4 npacket);
     u4 getFrameNumFromPTS(u8 pts);
     u4 getPacketNum();
-    u4 stripAudio(UCHAR* buf, u4 len);
-    static bool scanForVideo(UCHAR* buf, u4 len, bool &ish264);
+    u4 stripAudio(u1* buf, u4 len);
+    static bool scanForVideo(u1* buf, u4 len, bool &ish264);
     Channel *getChannelInfo() {return &channelinfo;};
 
 
   private:
-    int processTS(UCHAR* buf);
+    int processTS(u1* buf);
 
-    UCHAR store[TS_SIZE]; // Storage for partial packets
+    u1 store[TS_SIZE]; // Storage for partial packets
     int partPacket;    // Length of partial packet stored from previous put()
     bool parsed;       // Whether PES packet to be submitted has been parsed yet
     PESPacket vPacket; // Video PES packet under construction
index 7297f8e7a6b679ffd57ee394b56e8d761a794907..d606514e2423d1ec8442120e28a745f82bbda08c 100644 (file)
@@ -76,9 +76,9 @@ void DemuxerVDR::flush()
   Demuxer::flush();
 }
 
-int DemuxerVDR::scan(UCHAR *buf, int len) {
+int DemuxerVDR::scan(u1 *buf, int len) {
        // Temporarily, just look for the lowest audio stream and return it
-       UCHAR HiByte = PESTYPE_AUDMAX;
+       u1 HiByte = PESTYPE_AUDMAX;
        int ret = 0;
 
        while (len >= 4) {
@@ -98,7 +98,7 @@ int DemuxerVDR::scan(UCHAR *buf, int len) {
        return ret;
 }
 
-int DemuxerVDR::findPTS(UCHAR* buf, int len, u8* dest) {
+int DemuxerVDR::findPTS(u1* buf, int len, u8* dest) {
        while (len >= 14) {
                u4 pattern = buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3];
                buf++;
@@ -147,7 +147,7 @@ void DemuxerVDR::setPacketNum(u4 npacket)
   LogNT::getInstance()->debug(TAG, "setPacketNum {}", npacket);
 }
 
-int DemuxerVDR::put(UCHAR* buf, int len)
+int DemuxerVDR::put(u1* buf, int len)
 {
   int ret = 0;    // return number of bytes consumed
   if (submitting)
@@ -291,7 +291,7 @@ u4 DemuxerVDR::getFrameNumFromPTS(u8 pts)
 
 void DemuxerVDR::dealWithSubtitlePacket()
 {
-  const UCHAR* data = packet.getData();
+  const u1* data = packet.getData();
   u4 packetSize = packet.getSize();
   if (packetSize < 9) return;
   u4 payloadOffset = data[8] + 9;
@@ -310,7 +310,7 @@ void DemuxerVDR::dealWithSubtitlePacket()
     subtitlePacket.write(&data[payloadOffset+4], packetSize-payloadOffset-4);
   }
   
-  const UCHAR* sub_data = subtitlePacket.getData();
+  const u1* sub_data = subtitlePacket.getData();
   u4 subSize = subtitlePacket.getSize();
   while (subtitlePacketPosition < subSize)
   {
@@ -340,7 +340,7 @@ void DemuxerVDR::parseVDRPacketDetails()
     u4 payload_begin = packet[8] + 9;
     if (packet.getSize() > payload_begin)
     {
-      UCHAR substream_type = packet[payload_begin] & 0xF0;
+      u1 substream_type = packet[payload_begin] & 0xF0;
       if (substream_type == 0x20) // Subtitles
       {
         dealWithSubtitlePacket();
index 46922385a535c8c92aa6eb907507256af67c2384..50b2be8aa286aed70e7fb3ca407bbcb1383b8589 100644 (file)
@@ -31,9 +31,9 @@ class DemuxerVDR : public Demuxer
     DemuxerVDR();
     void reset();
     void flush();
-    int scan(UCHAR* buf, int len);
-    int findPTS(UCHAR* buf, int len, u8* dest);
-    int put(UCHAR* buf, int len);
+    int scan(u1* buf, int len);
+    int findPTS(u1* buf, int len, u8* dest);
+    int put(u1* buf, int len);
     void setFrameNum(u4 frame);
     void setPacketNum(u4 npacket);
     u4 getFrameNumFromPTS(u8 pts);
index b1d2074e7d4c646a168afda64e09812179586a2a..b6e9b17ba368c407957c68a693f0390fe72ddc29 100644 (file)
@@ -40,7 +40,7 @@ struct MediaPacket
   u4 pos_buffer; //position in stream buffer
   u4 length; //length of the packet
   // The fields below are not needed by the MVP
-  UCHAR type;
+  u1 type;
   u8 pts;
   u8 dts;
   bool synched;
@@ -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 u4 DeliverMediaSample(UCHAR* buffer, u4 *samplepos)=0;
+    virtual u4 DeliverMediaSample(u1* buffer, u4 *samplepos)=0;
     // The drain target might advice the feeder about free buffers with threadSignal
 
 
index c5f74b532ee3a389303c19beff0fc5283ce336a3..2887c49d35acbb6d3c602a242482d4aefde3dca1 100644 (file)
@@ -132,10 +132,10 @@ const u4 DVBSubtitleCLUT::defaultPalette8[256] = {
   0xFF55557F, 0xFF7F557F, 0xFF557F7F, 0xFF7F7F7F, // 1111 1100
 };
 
-void DVBSubtitleCLUT::setEntry(int bpp, u4 index, UCHAR Y, UCHAR Cr, UCHAR Cb, UCHAR T)
+void DVBSubtitleCLUT::setEntry(int bpp, u4 index, u1 Y, u1 Cr, u1 Cb, u1 T)
 {
-  UCHAR Y2 = Y;
-  UCHAR A;
+  u1 Y2 = Y;
+  u1 A;
   if (Y2 == 0) { Y2 = 16; A = 0; } else A = 255 - T;
   switch (bpp)
   {
@@ -175,7 +175,7 @@ DVBSubtitlePage::DVBSubtitlePage()
   serviceAcquired(false)
 {}
 
-void DVBSubtitlePage::setState(UCHAR s)
+void DVBSubtitlePage::setState(u1 s)
 {
   state = s;
   if (state == 1) // Acquisition point - page refresh
@@ -210,7 +210,7 @@ class DVBSubtitleObject
 {
   private:
     u4 objectID;
-    UCHAR nonModColourFlag;
+    u1 nonModColourFlag;
     struct RegionRef
     {
       DVBSubtitleRegion* region;
@@ -219,23 +219,23 @@ class DVBSubtitleObject
     };
     typedef std::vector<struct RegionRef> UseList;
     UseList useList;
-    UCHAR map2to4[4];
-    UCHAR map2to8[4];
-    UCHAR map4to8[16];
+    u1 map2to4[4];
+    u1 map2to8[4];
+    u1 map4to8[16];
     void initMapTables();
-    UCHAR* currentMapTable;
+    u1* currentMapTable;
     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);
+    void drawLine(const RegionRef& use, u4 x, u4 y, u1 colour, u4 len);
+    u1 get2Bits(const u1* data, u4& index);
+    u1 get4Bits(const u1* data, u4& index);
+    bool decode2BppCodeString(const u1* data, u4& index, const struct RegionRef& use, u4& x, u4 y);
+    bool decode4BppCodeString(const u1* data, u4& index, const struct RegionRef& use, u4& x, u4 y);
+    bool decode8BppCodeString(const u1* data, u4& index, const struct RegionRef& use, u4& x, u4 y);
   public:
     DVBSubtitleObject(u4 id = 0);
-    void setNonModColourFlag(UCHAR flag) { nonModColourFlag = flag; }
+    void setNonModColourFlag(u1 flag) { nonModColourFlag = flag; }
     void findWhereUsed(DVBSubtitlePage&);
-    void decodeSubBlock(const UCHAR* data, u4 length, bool even);
+    void decodeSubBlock(const u1* data, u4 length, bool even);
 };
 
 DVBSubtitleObject::DVBSubtitleObject(u4 id)
@@ -279,7 +279,7 @@ void DVBSubtitleObject::findWhereUsed(DVBSubtitlePage& page)
 }
 
 void DVBSubtitleObject::drawLine(const RegionRef& use, u4 x, u4 y,
-                                 UCHAR colour, u4 len)
+                                 u1 colour, u4 len)
 {
   if (nonModColourFlag && colour == 1) return;
   x += use.horizontalPosition;
@@ -288,9 +288,9 @@ void DVBSubtitleObject::drawLine(const RegionRef& use, u4 x, u4 y,
     use.region->setIndex(pos, y, colour);
 }
 
-UCHAR DVBSubtitleObject::get2Bits(const UCHAR* data, u4& index)
+u1 DVBSubtitleObject::get2Bits(const u1* data, u4& index)
 {
-  UCHAR result = data[index];
+  u1 result = data[index];
   if (!bitPos)
   {
     index++;
@@ -300,9 +300,9 @@ UCHAR DVBSubtitleObject::get2Bits(const UCHAR* data, u4& index)
   return (result >> bitPos) & 0x03;
 }
 
-UCHAR DVBSubtitleObject::get4Bits(const UCHAR* data, u4& index)
+u1 DVBSubtitleObject::get4Bits(const u1* data, u4& index)
 {
-  UCHAR result = data[index];
+  u1 result = data[index];
   if (!bitPos)
   {
     index++;
@@ -316,10 +316,10 @@ UCHAR DVBSubtitleObject::get4Bits(const UCHAR* data, u4& index)
   return result & 0x0F;
 }
 
-bool DVBSubtitleObject::decode2BppCodeString(const UCHAR* data, u4& index, const struct RegionRef& use, u4& x, u4 y)
+bool DVBSubtitleObject::decode2BppCodeString(const u1* data, u4& index, const struct RegionRef& use, u4& x, u4 y)
 {
   u4 rl = 0, colour = 0;
-  UCHAR code = get2Bits(data, index);
+  u1 code = get2Bits(data, index);
   if (code)
   {
     colour = code;
@@ -361,10 +361,10 @@ bool DVBSubtitleObject::decode2BppCodeString(const UCHAR* data, u4& index, const
   return true;
 }
 
-bool DVBSubtitleObject::decode4BppCodeString(const UCHAR* data, u4& index, const struct RegionRef& use, u4& x, u4 y)
+bool DVBSubtitleObject::decode4BppCodeString(const u1* data, u4& index, const struct RegionRef& use, u4& x, u4 y)
 {
   u4 rl = 0, colour = 0;
-  UCHAR code = get4Bits(data, index);
+  u1 code = get4Bits(data, index);
   if (code)
   {
     colour = code;
@@ -412,10 +412,10 @@ bool DVBSubtitleObject::decode4BppCodeString(const UCHAR* data, u4& index, const
   return true;
 }
 
-bool DVBSubtitleObject::decode8BppCodeString(const UCHAR* data, u4& index, const struct RegionRef& use, u4& x, u4 y)
+bool DVBSubtitleObject::decode8BppCodeString(const u1* data, u4& index, const struct RegionRef& use, u4& x, u4 y)
 {
   u4 rl = 0, colour = 0;
-  UCHAR code = data[index++];
+  u1 code = data[index++];
   if (code)
   {
     colour = code;
@@ -435,7 +435,7 @@ bool DVBSubtitleObject::decode8BppCodeString(const UCHAR* data, u4& index, const
   return true;
 }
 
-void DVBSubtitleObject::decodeSubBlock(const UCHAR* data, u4 length, bool even)
+void DVBSubtitleObject::decodeSubBlock(const u1* data, u4 length, bool even)
 {
   UseList::const_iterator use;
   for (use = useList.begin(); use != useList.end(); ++use)
@@ -533,7 +533,7 @@ void DVBSubtitles::put(const PESPacket& packet)
 
 bool DVBSubtitles::decodePacket(const PESPacket& packet)
 {
-  const UCHAR* data = packet.getData();
+  const u1* data = packet.getData();
   u4 packetSize = packet.getSize();
   if (packetSize < 9) return false;
   u4 segmentOffset = data[8] + 11;
@@ -542,7 +542,7 @@ bool DVBSubtitles::decodePacket(const PESPacket& packet)
     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];
+    u1 segmentType = data[segmentOffset + 1];
     u4 pageID = (data[segmentOffset + 2] << 8)
                  + data[segmentOffset + 3];
     u4 segmentLength = (data[segmentOffset + 4] << 8)
@@ -550,7 +550,7 @@ bool DVBSubtitles::decodePacket(const PESPacket& packet)
     if (pageOnDisplay == 65536) pageOnDisplay = pageID;
     if (pageOnDisplay != pageID) return false;
     if (packetSize <= segmentOffset + 5 + segmentLength) return false;
-    const UCHAR* segmentData = &data[segmentOffset + 6];
+    const u1* segmentData = &data[segmentOffset + 6];
     pages[pageID]; // Create this page if it doesn't exist
     PageMap::iterator pageEntry = pages.find(pageID);
     if (pageEntry == pages.end()) return false;
@@ -563,7 +563,7 @@ bool DVBSubtitles::decodePacket(const PESPacket& packet)
       if (segmentLength < 2) break;
       page.setState((segmentData[1] & 0x0C) >> 2);
       if (!page.serviceAcquired) break;
-      UCHAR pageVersion = (segmentData[1] & 0xF0) >> 4;
+      u1 pageVersion = (segmentData[1] & 0xF0) >> 4;
       if (pageVersion == page.version) break; // No update
       page.version = pageVersion;
       page.timeout = segmentData[0];
@@ -571,7 +571,7 @@ bool DVBSubtitles::decodePacket(const PESPacket& packet)
       u4 parsePos = 2;
       while (segmentLength > parsePos + 5)
       {
-        UCHAR regionID = segmentData[parsePos];
+        u1 regionID = segmentData[parsePos];
         page.regions[regionID]; // Create the region if it doesn't exist
         DVBSubtitlePage::Coords coords;
         coords.x = (segmentData[parsePos + 2] << 8) +
@@ -586,13 +586,13 @@ bool DVBSubtitles::decodePacket(const PESPacket& packet)
     case 0x11: // Region composition
     {
       if (segmentLength < 10) break;
-      UCHAR regionID = segmentData[0];
+      u1 regionID = segmentData[0];
       page.regions[regionID]; // Create the region if it doesn't exist
       DVBSubtitlePage::RegionMap::iterator regionEntry;
       regionEntry = page.regions.find(regionID);
       if (regionEntry == page.regions.end()) return false;
       DVBSubtitleRegion& region = regionEntry->second;
-      UCHAR regionVersion = (segmentData[1] & 0xF0) >> 4;
+      u1 regionVersion = (segmentData[1] & 0xF0) >> 4;
       if (regionVersion == region.version) break; // No update
       region.version = regionVersion;
       bool regionFillFlag = (segmentData[1] & 0x08) >> 3;
@@ -634,21 +634,21 @@ bool DVBSubtitles::decodePacket(const PESPacket& packet)
     case 0x12: // CLUT definition
     {
       if (segmentLength < 2) break;
-      UCHAR CLUTid = segmentData[0];
+      u1 CLUTid = segmentData[0];
       DVBSubtitlePage::CLUTMap::iterator clutEntry;
       clutEntry = page.CLUTs.find(CLUTid);
       if (clutEntry == page.CLUTs.end()) return false;
       DVBSubtitleCLUT& clut = clutEntry->second;
       clut.CLUTid = CLUTid;
-      UCHAR clutVersion = (segmentData[1] & 0xF0) >> 4;
+      u1 clutVersion = (segmentData[1] & 0xF0) >> 4;
       if (clutVersion == clut.version) break; // No update
       clut.version = clutVersion;
       u4 parsePos = 2;
       while (segmentLength > parsePos + 3)
       {
-        UCHAR clutEntryID = segmentData[parsePos];
+        u1 clutEntryID = segmentData[parsePos];
         bool fullRangeFlag = segmentData[parsePos + 1] & 0x01;
-        UCHAR Y, Cr, Cb, T;
+        u1 Y, Cr, Cb, T;
         if (fullRangeFlag)
         {
           if (segmentLength <= parsePos + 5) break;
@@ -665,7 +665,7 @@ bool DVBSubtitles::decodePacket(const PESPacket& packet)
           Cb  = (segmentData[parsePos + 3] & 0x3C) << 2;
           T   = (segmentData[parsePos + 3] & 0x03) << 6;
         }
-        UCHAR entryFlags = segmentData[parsePos + 1];
+        u1 entryFlags = segmentData[parsePos + 1];
         if (entryFlags & 0x80) clut.setEntry(2, clutEntryID, Y,Cr,Cb,T);
         if (entryFlags & 0x40) clut.setEntry(4, clutEntryID, Y,Cr,Cb,T);
         if (entryFlags & 0x20) clut.setEntry(8, clutEntryID, Y,Cr,Cb,T);
@@ -680,7 +680,7 @@ bool DVBSubtitles::decodePacket(const PESPacket& packet)
       u4 objectID = (segmentData[0] << 8) + segmentData[1];
       DVBSubtitleObject object(objectID);
       object.findWhereUsed(page);
-      UCHAR codingMethod = (segmentData[2] & 0x0C) >> 2;
+      u1 codingMethod = (segmentData[2] & 0x0C) >> 2;
       object.setNonModColourFlag(segmentData[2] & 0x01);
       if (codingMethod == 0x00) // Coding of pixels
       {
index 1edad8349e435504b6537a3240fa4a5640e73bfd..717c1f2703f3e07a5e348c809b94174840a6174d 100644 (file)
@@ -43,9 +43,9 @@ class DVBSubtitleCLUT
 {
   public:
     DVBSubtitleCLUT();
-    UCHAR CLUTid;
-    UCHAR version;
-    void setEntry(int bpp, u4 index, UCHAR Y, UCHAR Cr, UCHAR Cb, UCHAR T);
+    u1 CLUTid;
+    u1 version;
+    void setEntry(int bpp, u4 index, u1 Y, u1 Cr, u1 Cb, u1 T);
     const Palette& getPalette(int bpp) const;
   private:
     Palette palette2;
@@ -60,9 +60,9 @@ class DVBSubtitleRegion : public Bitmap
 {
   public:
     DVBSubtitleRegion();
-    UCHAR version;
-    UCHAR level;
-    UCHAR CLUTid;
+    u1 version;
+    u1 level;
+    u1 CLUTid;
     void setDepth(u4);
     struct ObjectRef
     {
@@ -80,20 +80,20 @@ class DVBSubtitlePage
     DVBSubtitlePage();
     u8 pts;
     bool dirty;
-    UCHAR version;
+    u1 version;
     u4 timeout;
-    UCHAR state;
+    u1 state;
     bool serviceAcquired;
-    typedef std::map<UCHAR, DVBSubtitleCLUT> CLUTMap;
+    typedef std::map<u1, DVBSubtitleCLUT> CLUTMap;
     CLUTMap CLUTs;
-    typedef std::map<UCHAR, DVBSubtitleRegion> RegionMap;
+    typedef std::map<u1, DVBSubtitleRegion> RegionMap;
     RegionMap regions;
     struct Coords { u4 x; u4 y; };
-    typedef std::map<UCHAR, Coords> DisplayMap;
+    typedef std::map<u1, Coords> DisplayMap;
     DisplayMap currentDisplay;
     DisplayMap pendingDisplay;
 
-    void setState(UCHAR s);
+    void setState(u1 s);
     void updateRegionPalettes(const DVBSubtitleCLUT&);
 };
 
@@ -102,7 +102,7 @@ class DVBSubtitleDisplayDefinition: public DisplayRegion
 public:
        DVBSubtitleDisplayDefinition();
 
-    UCHAR version;
+    u1 version;
     bool displaywindow;
 
 };
index 89090b885f2abd107ec3c2ed1963c79a59c44277..4389c1a91db6a11f2d84d597e595405e006f5cb0 100644 (file)
@@ -502,7 +502,7 @@ void ImageLoader::pictureReaderProcessOne()
   // Set up the common variables
   Image image;
   bool free_it = false;
-  UCHAR* imageData{};
+  u1* imageData{};
   u4 length{};
 
 
index 3f0727f18e938da4b15faa6a111309177af63a3b..372fefe9c2f8bfd0b3e2991a7529b5f3b8cb1852 100644 (file)
@@ -220,7 +220,7 @@ void ImageReader::call(void *) {
 }
  
 // the real entry for receiving data
-int ImageReader::getImageChunk(u8  offset,u4 len, u4 * rsize, UCHAR **buffer){
+int ImageReader::getImageChunk(u8  offset,u4 len, u4 * rsize, u1 **buffer){
   logger->log("ImageReader", Log::DEBUG, "request chunk offset=%llu, len=%u",offset,len);
   threadLock();
   *buffer=NULL;
index 35819921d8bb67d6a9b46b749c0fb189aeea5145..da19a8ebadf6873c9c2a2139ee32be8c50bccc90 100644 (file)
@@ -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,u4 len, u4 * rsize,UCHAR **buffer);
+    int getImageChunk(u8 offset,u4 len, u4 * rsize,u1 **buffer);
 
     //is the reader still running?
     bool isReaderRunning();
@@ -92,7 +92,7 @@ class ImageReader : public Thread_TYPE, public Callback
 
     class Chunk{
       public:
-      UCHAR * buffer; //receive buffer (to be deallocated with free)
+      u1 * buffer; //receive buffer (to be deallocated with free)
       u8 offset;  //offset within stream/file
       u4 reqlen;    //requested len
       u4 len;       //received len
index 09a09bc25b077a6530531f305ada3e9933901c51..cc42c9ca208fd22e3a0d8824caa1f73f35d3ca9b 100644 (file)
@@ -35,9 +35,9 @@ void Input::ResetToDefault()
   InitHWCListwithDefaults();
 }
 
-UCHAR Input::TranslateHWC(HWC_TYPE code)
+u1 Input::TranslateHWC(HWC_TYPE code)
 {
-  UCHAR ret = TranslateHWCFixed(code);
+  u1 ret = TranslateHWCFixed(code);
 
   if (ret != NA_UNKNOWN) // Found in fixed list
   {
@@ -48,11 +48,11 @@ UCHAR Input::TranslateHWC(HWC_TYPE code)
   return TranslateHWCList(code);
 }
 
-UCHAR Input::TranslateHWCList(HWC_TYPE code)
+u1 Input::TranslateHWCList(HWC_TYPE code)
 {
   if (learnMode != NOLEARNMODE)
   {
-    setHWCtoCommand(code, static_cast<UCHAR>(learnMode));
+    setHWCtoCommand(code, static_cast<u1>(learnMode));
     InputMan::getInstance()->cancelLearnMode();
     return NA_LEARN;
   }
@@ -67,7 +67,7 @@ UCHAR Input::TranslateHWCList(HWC_TYPE code)
   }
 }
 
-void Input::setHWCtoCommand(HWC_TYPE hcw, UCHAR command)
+void Input::setHWCtoCommand(HWC_TYPE hcw, u1 command)
 {
   translist[hcw] = command;
 }
@@ -90,7 +90,7 @@ void Input::LoadKeysConfig(VDR *vdr,const char *cfg)
                        u4 ul1, ul2;
                        u4 uc;
                        if (sscanf(keytrans, "%lXI%lXK%lX", &ul1, &ul2, &uc) == 3) {
-                               translist[((u8) ul1) | ((u8) ul2) << 32] = (UCHAR) uc;
+                               translist[((u8) ul1) | ((u8) ul2) << 32] = (u1) uc;
                        }
                        delete[] keytrans;
                }
@@ -155,7 +155,7 @@ void Input::sendInputKey(int key)
   MessageQueue::getInstance()->postMessage(m);
 }
 
-std::string Input::getAllHardwareKeyNamesAssignedToVompKey(UCHAR vompKey)
+std::string Input::getAllHardwareKeyNamesAssignedToVompKey(u1 vompKey)
 {
   std::string keyNames;
   keyNames.reserve(50);
index 0ba5e37210e6558e6c346f5749419654109a57b3..a6e38eff055010b71f2cfe5703b7f202a1eba946 100644 (file)
@@ -35,7 +35,7 @@
 
 class VDR;
 
-typedef std::map<HWC_TYPE, UCHAR> RemoteTranslationList;
+typedef std::map<HWC_TYPE, u1> RemoteTranslationList;
 
 class Input: public AbstractOption
 {
@@ -51,7 +51,7 @@ class Input: public AbstractOption
 
     static void sendInputKey(int key);
 
-    void setHWCtoCommand(HWC_TYPE hcw, UCHAR command);
+    void setHWCtoCommand(HWC_TYPE hcw, u1 command);
     void unsetHWC(HWC_TYPE hcw);
     void LoadKeysConfig(VDR* vdr, const char* keynum);
     void SaveKeysConfig();
@@ -66,9 +66,9 @@ class Input: public AbstractOption
     virtual void changePowerState(bool /* poweron */) {}; //informs the remote control, that about vomp's power state, this is important e.g. for cec
 
     virtual void InitHWCListwithDefaults()=0;
-    std::string getAllHardwareKeyNamesAssignedToVompKey(UCHAR vompKey);
-    char* CommandTranslateStr(UCHAR command);
-    void EnterLearnMode(UCHAR /* command */ ) {}; // Override and set lernMode to command
+    std::string getAllHardwareKeyNamesAssignedToVompKey(u1 vompKey);
+    char* CommandTranslateStr(u1 command);
+    void EnterLearnMode(u1 /* command */ ) {}; // Override and set lernMode to command
     void cancelLearnMode() { learnMode = NOLEARNMODE; }
     void ResetToDefault();
     virtual std::string getHardwareKeyName(HWC_TYPE hardwareKey) = 0;
@@ -76,78 +76,78 @@ class Input: public AbstractOption
 
     const static u4 NOLEARNMODE = 256;
     // Not buttons
-    const static UCHAR NA_LEARN    = 101;
-    const static UCHAR NA_NONE     = 98;
-    const static UCHAR NA_UNKNOWN  = 99;
+    const static u1 NA_LEARN    = 101;
+    const static u1 NA_NONE     = 98;
+    const static u1 NA_UNKNOWN  = 99;
 
     // Problem common buttons
-    const static UCHAR VOLUMEUP    = 16;
-    const static UCHAR VOLUMEDOWN  = 17;
-    const static UCHAR CHANNELUP   = 32;
-    const static UCHAR CHANNELDOWN = 33;
+    const static u1 VOLUMEUP    = 16;
+    const static u1 VOLUMEDOWN  = 17;
+    const static u1 CHANNELUP   = 32;
+    const static u1 CHANNELDOWN = 33;
 
     // Common buttons
-    const static UCHAR ZERO        = 0;
-    const static UCHAR ONE         = 1;
-    const static UCHAR TWO         = 2;
-    const static UCHAR THREE       = 3;
-    const static UCHAR FOUR        = 4;
-    const static UCHAR FIVE        = 5;
-    const static UCHAR SIX         = 6;
-    const static UCHAR SEVEN       = 7;
-    const static UCHAR EIGHT       = 8;
-    const static UCHAR NINE        = 9;
-    const static UCHAR POWER       = 61;
-    const static UCHAR GO          = 59;
-    const static UCHAR BACK        = 31;
-    const static UCHAR MENU        = 13;
-    const static UCHAR RED         = 11;
-    const static UCHAR GREEN       = 46;
-    const static UCHAR YELLOW      = 56;
-    const static UCHAR BLUE        = 41;
-    const static UCHAR MUTE        = 15;
-    const static UCHAR RADIO       = 12; // The unlabelled button on old
-    const static UCHAR REVERSE     = 50;
-    const static UCHAR PLAY        = 53;
-    const static UCHAR FORWARD     = 52;
-    const static UCHAR RECORD      = 55;
-    const static UCHAR STOP        = 54;
-    const static UCHAR PAUSE       = 48;
-    const static UCHAR SKIPBACK    = 36;
-    const static UCHAR SKIPFORWARD = 30;
-    const static UCHAR OK          = 37;
+    const static u1 ZERO        = 0;
+    const static u1 ONE         = 1;
+    const static u1 TWO         = 2;
+    const static u1 THREE       = 3;
+    const static u1 FOUR        = 4;
+    const static u1 FIVE        = 5;
+    const static u1 SIX         = 6;
+    const static u1 SEVEN       = 7;
+    const static u1 EIGHT       = 8;
+    const static u1 NINE        = 9;
+    const static u1 POWER       = 61;
+    const static u1 GO          = 59;
+    const static u1 BACK        = 31;
+    const static u1 MENU        = 13;
+    const static u1 RED         = 11;
+    const static u1 GREEN       = 46;
+    const static u1 YELLOW      = 56;
+    const static u1 BLUE        = 41;
+    const static u1 MUTE        = 15;
+    const static u1 RADIO       = 12; // The unlabelled button on old
+    const static u1 REVERSE     = 50;
+    const static u1 PLAY        = 53;
+    const static u1 FORWARD     = 52;
+    const static u1 RECORD      = 55;
+    const static u1 STOP        = 54;
+    const static u1 PAUSE       = 48;
+    const static u1 SKIPBACK    = 36;
+    const static u1 SKIPFORWARD = 30;
+    const static u1 OK          = 37;
 
     // Old remote only
-    const static UCHAR FULL        = 60;
+    const static u1 FULL        = 60;
 
     // New remote only
-    const static UCHAR TV          = 28;
-    const static UCHAR VIDEOS      = 24;
-    const static UCHAR MUSIC       = 25;
-    const static UCHAR PICTURES    = 26;
-    const static UCHAR GUIDE       = 27;
-    const static UCHAR UP          = 20;
-    const static UCHAR DOWN        = 21;
-    const static UCHAR LEFT        = 22;
-    const static UCHAR RIGHT       = 23;
-    const static UCHAR PREVCHANNEL = 18;
-    const static UCHAR STAR        = 10;
-    const static UCHAR HASH        = 14;
+    const static u1 TV          = 28;
+    const static u1 VIDEOS      = 24;
+    const static u1 MUSIC       = 25;
+    const static u1 PICTURES    = 26;
+    const static u1 GUIDE       = 27;
+    const static u1 UP          = 20;
+    const static u1 DOWN        = 21;
+    const static u1 LEFT        = 22;
+    const static u1 RIGHT       = 23;
+    const static u1 PREVCHANNEL = 18;
+    const static u1 STAR        = 10;
+    const static u1 HASH        = 14;
 
     // Android only
-    const static UCHAR PLAYPAUSE   = 201;
+    const static u1 PLAYPAUSE   = 201;
     // cec only
-    const static UCHAR POWERON     = 202;
-    const static UCHAR POWEROFF    = 203;
+    const static u1 POWERON     = 202;
+    const static u1 POWEROFF    = 203;
 
   protected:
     virtual const char* modName()=0;
     RemoteTranslationList translist;
     int learnMode{NOLEARNMODE};
 
-    virtual UCHAR TranslateHWCFixed(HWC_TYPE code) = 0;
-    UCHAR TranslateHWCList(HWC_TYPE code);
-    UCHAR TranslateHWC(HWC_TYPE code);
+    virtual u1 TranslateHWCFixed(HWC_TYPE code) = 0;
+    u1 TranslateHWCList(HWC_TYPE code);
+    u1 TranslateHWC(HWC_TYPE code);
 };
 
 #endif
index a752d0771914d8756ad36c8cecf7b8d2b40c2691..c2bfcaffcffb11c7b2a1ad5467425c7961de6733 100644 (file)
@@ -145,7 +145,7 @@ void InputCEC::incomingCECkey(int key)
   sendInputKey(TranslateHWC(key));
 }
 
-void InputCEC::incomingPowerkey(UCHAR key)
+void InputCEC::incomingPowerkey(u1 key)
 {
   sendInputKey(key);
 }
@@ -332,7 +332,7 @@ void InputCEC::InitHWCListwithDefaults()
   translist[CEC_USER_CONTROL_CODE_CHANNEL_DOWN] = CHANNELDOWN;
 }
 
-UCHAR InputCEC::TranslateHWCFixed(int code)
+u1 InputCEC::TranslateHWCFixed(int code)
 {
   switch (code)
   {
@@ -448,7 +448,7 @@ void InputCEC::InitKeymap()
   NAMETRICK2(CEC_USER_CONTROL_CODE_,MAX );
 }
 
-const char* InputCEC::getHardCodedHardwareKeyNamesForVompKey(UCHAR /* vompKey */)
+const char* InputCEC::getHardCodedHardwareKeyNamesForVompKey(u1 /* vompKey */)
 {
   return ""; // FIXME
 }
index 96b7f36f03213c4aabcdb75381dd3e42ec1295d9..fbf750dafab45b24717adf3d32a5fe38aee60558 100644 (file)
@@ -42,14 +42,14 @@ class InputCEC : public Input
     bool handleOptionChanges(Option* option);
 
     std::string getHardwareKeyName(int hardwareKey);
-    const char* getHardCodedHardwareKeyNamesForVompKey(UCHAR vompKey);
+    const char* getHardCodedHardwareKeyNamesForVompKey(u1 vompKey);
 
   private:
     static constexpr const char* myModName = "InputCEC";
     const char* modName() { return myModName; }
     void InitKeymap();
     void InitHWCListwithDefaults();
-    UCHAR TranslateHWCFixed(int code);
+    u1 TranslateHWCFixed(int code);
 
     bool cechandlesvolume{};
 
@@ -58,7 +58,7 @@ class InputCEC : public Input
     CEC::ICECCallbacks cec_callbacks;
 
     void incomingCECkey(int keys);
-    void incomingPowerkey(UCHAR key);
+    void incomingPowerkey(u1 key);
 
     static InputCEC* instance;
     static void cecLogMessage(void *param, const CEC::cec_log_message* message);
index 0dff75e58bb942b403fb2c25353c034b9b5dc713..af130558a34ee9fae92c66e07a17703323f88bf4 100644 (file)
@@ -106,7 +106,7 @@ void InputLinux::shutdown()
   initted = 0;
 }
 
-UCHAR InputLinux::TranslateHWCFixed(int code)
+u1 InputLinux::TranslateHWCFixed(int code)
 {
   // Translate /dev/input codes to VOMP codes for the hard coded buttons
   switch (code)
@@ -467,7 +467,7 @@ void InputLinux::InitKeymap()
   NAMETRICK(KEY_,NUMERIC_POUND);
 }
 
-const char* InputLinux::getHardCodedHardwareKeyNamesForVompKey(UCHAR vompKey)
+const char* InputLinux::getHardCodedHardwareKeyNamesForVompKey(u1 vompKey)
 {
   switch (vompKey)
   {
@@ -510,7 +510,7 @@ std::string InputLinux::getHardwareKeyName(int hardwareKey)
   return retval;
 }
 
-void InputLinux::EnterLearningMode(UCHAR vompKey)
+void InputLinux::EnterLearningMode(u1 vompKey)
 {
   learnMode = vompKey; // Armed
 }
index 9409c579105f5f3656a0a4537e009d87cd1b61f4..e4a30b06f60c33a2aa497231f09fe4772fe25069 100644 (file)
@@ -35,8 +35,8 @@ class InputLinux : public Input
     void shutdown();
 
     std::string getHardwareKeyName(int hardwareKey);
-    const char* getHardCodedHardwareKeyNamesForVompKey(UCHAR vompKey);
-    void EnterLearningMode(UCHAR vompKey);
+    const char* getHardCodedHardwareKeyNamesForVompKey(u1 vompKey);
+    void EnterLearningMode(u1 vompKey);
 
     bool start();
     void stop();
@@ -49,7 +49,7 @@ class InputLinux : public Input
 
     void InitKeymap();
     void InitHWCListwithDefaults();
-    UCHAR TranslateHWCFixed(int code);
+    u1 TranslateHWCFixed(int code);
 
     std::vector<int> devices;
 
index 0c9e3c37bbd6643938c2f85e07dbd03c610c12c8..4acad37707d9a191738c6ded31731ef0db9e0a17 100644 (file)
@@ -53,7 +53,7 @@ bool InputLIRC::init()
 
     bool objSuccess = Config::getInstance()->foreachPairInObject("input_lirc", remoteName, [&] (const std::string& lircName, const std::string& vompName)
     {
-      UCHAR keyNumber = InputMan::getVompKeyNumber(vompName.c_str());
+      u1 keyNumber = InputMan::getVompKeyNumber(vompName.c_str());
 
       log->debug(TAG, "  Lirc: {}, vomp: {}, vomp-number {}", lircName, vompName, keyNumber);
 
@@ -76,8 +76,8 @@ bool InputLIRC::init()
   }
 
 
-  using RemotesType = std::map<std::string, std::map<std::string, UCHAR>>;
-  using ButtonsType = std::map<std::string, UCHAR>;
+  using RemotesType = std::map<std::string, std::map<std::string, u1>>;
+  using ButtonsType = std::map<std::string, u1>;
 
   for(RemotesType::iterator i = remotes.begin(); i != remotes.end(); i++)
   {
@@ -193,7 +193,7 @@ void InputLIRC::listenLoop()
     else
       log->error(TAG, "Parse error");
     
-    UCHAR button;
+    u1 button;
     try
     {
       button = remotes.at(remoteName).at(remoteButton);
@@ -234,7 +234,7 @@ bool InputLIRC::parse(const std::string& input, std::string& remoteName, std::st
 }
 
 
-// const char* InputLIRC::getHardCodedHardwareKeyNamesForVompKey(UCHAR /* vompKey */)
+// const char* InputLIRC::getHardCodedHardwareKeyNamesForVompKey(u1 /* vompKey */)
 // {
 //   return "";
 // }
index 7b6e224e06865239554f40fee83e95584dfc4a42..679eccd7e637936d9e67fac8141801aacbf3e4eb 100644 (file)
@@ -56,11 +56,11 @@ class InputLIRC : public Input
     bool threadReqStop{};
 
     bool parse(const std::string& input, std::string& remoteName, std::string& remoteButton, int& repeatCount);
-    UCHAR TranslateHWCFixed(HWC_TYPE code) { return static_cast<UCHAR>(code); };
+    u1 TranslateHWCFixed(HWC_TYPE code) { return static_cast<u1>(code); };
 
     bool initted{};
     TCP tcp;
-    std::map<std::string, std::map<std::string, UCHAR>> remotes;
+    std::map<std::string, std::map<std::string, u1>> remotes;
 };
 
 #endif
index a8573eff8547e880f8576b78899d8f004256f111..502c704f04a863478c60f0ef0e6dcf8e5a4246ba 100644 (file)
@@ -283,7 +283,7 @@ bool InputMan::saveOptionstoServer()
   return true; // FIXME
 }
 
-const char* InputMan::getVompKeyName(UCHAR number)
+const char* InputMan::getVompKeyName(u1 number)
 {
   switch (number)
   {
@@ -387,7 +387,7 @@ const char* InputMan::getVompKeyName(UCHAR number)
   }
 }
 
-UCHAR InputMan::getVompKeyNumber(const char* vompKeyName)
+u1 InputMan::getVompKeyNumber(const char* vompKeyName)
 {
   if      (!strcmp(vompKeyName, "VOLUMEUP")) return Input::VOLUMEUP;
   else if (!strcmp(vompKeyName, "VOLUMEDOWN")) return Input::VOLUMEDOWN;
@@ -441,7 +441,7 @@ UCHAR InputMan::getVompKeyNumber(const char* vompKeyName)
   else return Input::NA_UNKNOWN;
 }
 
-std::string InputMan::getHardCodedHardwareKeyNamesForVompKey(UCHAR vompKey)
+std::string InputMan::getHardCodedHardwareKeyNamesForVompKey(u1 vompKey)
 {
   // Go through each active Input class and get the hardware key name for vompKey
 
@@ -472,7 +472,7 @@ std::string InputMan::getHardCodedHardwareKeyNamesForVompKey(UCHAR vompKey)
   return keyNames;
 }
 
-std::string InputMan::getAllHardwareKeyNamesAssignedToVompKey(UCHAR vompKey)
+std::string InputMan::getAllHardwareKeyNamesAssignedToVompKey(u1 vompKey)
 {
   std::string keyNames;
 
@@ -512,7 +512,7 @@ void InputMan::ResetToDefault()
   if (inputUDP) inputUDP->ResetToDefault();
 }
 
-void InputMan::EnterLearningMode(UCHAR vompKey)
+void InputMan::EnterLearningMode(u1 vompKey)
 {
 #ifdef VOMP_PLATFORM_RASPBERRY
   if (inputLinux) inputLinux->EnterLearningMode(vompKey);
index 4740b15c520350755df667c517f4ecabe8dd0482..4e82a43c2764047d542a4f5e7363b596b7152702 100644 (file)
@@ -116,14 +116,14 @@ class InputMan: public AbstractOption
     bool loadOptionsFromServer(VDR*);
     bool saveOptionstoServer();
 
-    static const char* getVompKeyName(UCHAR vompKey);
-    static UCHAR getVompKeyNumber(const char* vompKeyName);
+    static const char* getVompKeyName(u1 vompKey);
+    static u1 getVompKeyNumber(const char* vompKeyName);
 
 
-    std::string getHardCodedHardwareKeyNamesForVompKey(UCHAR vompKey);
-    std::string getAllHardwareKeyNamesAssignedToVompKey(UCHAR vompKey);
+    std::string getHardCodedHardwareKeyNamesForVompKey(u1 vompKey);
+    std::string getAllHardwareKeyNamesAssignedToVompKey(u1 vompKey);
 
-    void EnterLearningMode(UCHAR vompKey);
+    void EnterLearningMode(u1 vompKey);
     void cancelLearnMode();
     void ResetToDefault();
 
index 11eff5b33c0e57586363cf45ac7743af8cabfb8f..dcde094d88e52af1abcf3280b4f01d7e1e9e4962 100644 (file)
@@ -159,7 +159,7 @@ void InputUDP::processRequest(const void* data, u4 length)
   sendInputKey(command);
 }
 
-const char* InputUDP::getHardCodedHardwareKeyNamesForVompKey(UCHAR /* vompKey */)
+const char* InputUDP::getHardCodedHardwareKeyNamesForVompKey(u1 /* vompKey */)
 {
   return "";
 }
index 2b3fa122e503536b76d7faf5c1e6a51079b756bc..f115080eb7aebbdef81b7cde3947b6866d50bb06 100644 (file)
@@ -45,8 +45,8 @@ class InputUDP : public Input
 
     // InputUDP doesn't do any translation stuff so just keep everything happy here
     void InitHWCListwithDefaults() {};
-    UCHAR TranslateHWCFixed(HWC_TYPE code) { return static_cast<UCHAR>(code); };
-    const char* getHardCodedHardwareKeyNamesForVompKey(UCHAR vompKey);
+    u1 TranslateHWCFixed(HWC_TYPE code) { return static_cast<u1>(code); };
+    const char* getHardCodedHardwareKeyNamesForVompKey(u1 vompKey);
     std::string getHardwareKeyName(HWC_TYPE hardwareKey);
 
   private:
index a0c4b1fa9a2ecf26d963dd5fdcc88bbc5fe2628a..9f4282adab13ec4f4f95d96b984377881e0769d9 100644 (file)
@@ -58,7 +58,7 @@ void InputWin::shutdown()
 }
 
 /*
-UCHAR RemoteWin::getButtonPress(int waitType)
+u1 RemoteWin::getButtonPress(int waitType)
 {
   / * how = 0 - block
      how = 1 - start new wait
@@ -69,7 +69,7 @@ UCHAR RemoteWin::getButtonPress(int waitType)
   
 
   if (hascurevent) {
-         UCHAR temp=curevent;
+         u1 temp=curevent;
       hascurevent=false;
 
          return temp;
@@ -93,14 +93,14 @@ UCHAR RemoteWin::getButtonPress(int waitType)
                  return NA_NONE;
          }
   }
-  UCHAR temp2=curevent;
+  u1 temp2=curevent;
   hascurevent=false;
   return temp2;
   
 }
 */
 
-UCHAR InputWin::TranslateHWCFixed(HWC_TYPE code)
+u1 InputWin::TranslateHWCFixed(HWC_TYPE code)
 {
   switch (code) 
   {
@@ -175,7 +175,7 @@ UCHAR InputWin::TranslateHWCFixed(HWC_TYPE code)
     }
 }
 
-const char* InputWin::getHardCodedHardwareKeyNameForVompKey(UCHAR vompKey)
+const char* InputWin::getHardCodedHardwareKeyNameForVompKey(u1 vompKey)
 {
     switch (vompKey) 
     {
@@ -293,7 +293,7 @@ std::string InputWin::getHardwareKeyName(HWC_TYPE hardwareKey)
 
 int InputWin::ReceiveButtonVK(u4 button)
 {
-/*     UCHAR pb=NA_NONE;
+/*     u1 pb=NA_NONE;
        //should we use a translation table ? No APPCOMMAND iS DWORD!
        switch (button) { //Processing VK_Messages
        case VK_DOWN:
@@ -360,7 +360,7 @@ int InputWin::ReceiveButtonVK(u4 button)
        }; //All other commands are process via APPCOMMAND_MESSAGES
        if (pb==NA_NONE) return 0;*/
 
-  UCHAR pb = TranslateHWC(W_G_HCW(W_HCW_VK,button));
+  u1 pb = TranslateHWC(W_G_HCW(W_HCW_VK,button));
   if (pb==NA_UNKNOWN || pb==NA_NONE) return 0;
   sendInputKey(pb);
   return 1;
@@ -375,7 +375,7 @@ int InputWin::ReceiveButtonVK(u4 button)
 
 int InputWin::ReceiveButtonCH(u4 button)
 {
-  UCHAR pb = TranslateHWC(W_G_HCW(W_HCW_CH,button));
+  u1 pb = TranslateHWC(W_G_HCW(W_HCW_CH,button));
   if (pb==NA_UNKNOWN || pb==NA_NONE) return 0;
   sendInputKey(pb);
   return 1;
@@ -391,7 +391,7 @@ int InputWin::ReceiveButtonCH(u4 button)
 
 int InputWin::ReceiveButtonAP(u4 button)
 {
-/*     UCHAR pb=NA_NONE;
+/*     u1 pb=NA_NONE;
        //should we use a translation table ? No APPCOMMAND iS DWORD!
        switch (button) { //Processing VK_Messages
        case APPCOMMAND_BROWSER_BACKWARD:
@@ -447,7 +447,7 @@ int InputWin::ReceiveButtonAP(u4 button)
        //if (pb==NA_NONE) return 0;
 
 
-  UCHAR pb = TranslateHWC(W_G_HCW(W_HCW_AP,button));
+  u1 pb = TranslateHWC(W_G_HCW(W_HCW_AP,button));
   if (pb==NA_UNKNOWN || pb==NA_NONE) return 0;
   sendInputKey(pb);
   return 1;
@@ -462,7 +462,7 @@ int InputWin::ReceiveButtonAP(u4 button)
 
 int InputWin::ReceiveButtonRI(u4 button)
 {
-       //UCHAR pb=NA_NONE;
+       //u1 pb=NA_NONE;
        //Raw Input
        /* Note Codes above 0x29c are not listed in the specs on usb.org
           therefore they are used by try, they might be device dependent
@@ -494,7 +494,7 @@ int InputWin::ReceiveButtonRI(u4 button)
        };
        if (pb==NA_NONE) return 0;*/
 
-  UCHAR pb = TranslateHWC(W_G_HCW(W_HCW_RI,button));
+  u1 pb = TranslateHWC(W_G_HCW(W_HCW_RI,button));
   if (pb==NA_UNKNOWN || pb==NA_NONE) return 0;
   sendInputKey(pb);
   return 1;
index 587c984e3f4988dc51340430da52fc17762285ca..5d77523d4e9c7a2d6add18dda957ad41c0a3e204 100644 (file)
@@ -36,14 +36,14 @@ class InputWin : public Input
     bool init();
     void shutdown();
     //int getDevice();
-    //UCHAR getButtonPress(int how);
+    //u1 getButtonPress(int how);
    // void Signal();
     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);
+    const char* getHardCodedHardwareKeyNameForVompKey(u1 vompKey);
     std::string getHardwareKeyName(HWC_TYPE hardwareKey);
         
   private: 
@@ -52,10 +52,10 @@ class InputWin : public Input
 
     bool initted{};
          bool signal{};
-         UCHAR curevent{};
+         u1 curevent{};
          bool hascurevent{};
          HANDLE event;
-    UCHAR TranslateHWCFixed(HWC_TYPE code);
+    u1 TranslateHWCFixed(HWC_TYPE code);
 };
 
 #endif
index 04b757d1a20e471fc51702d4c5b424e576cf2805..b0424ad0dac6515d9fbd24e9adacb69aa9b3a044 100644 (file)
@@ -133,7 +133,7 @@ int MediaInfo::serializeImpl(SerializeBuffer *b) {
   */
 int MediaInfo::deserializeImpl(SerializeBuffer *b) {
   if (b->decodeLongLong(size) != 0) return -1;
-  UCHAR cp=0;
+  u1 cp=0;
   if (b->decodeByte(cp) != 0) return -1;
   canPosition=cp!=0;
   if (b->decodeLong(type) != 0) return -1;
@@ -299,7 +299,7 @@ int Media::deserializeImpl(SerializeBuffer *b) {
   u4 nlen=0;
   if (b->decodeString(nlen,fileName) != 0) return -1;
   if (b->decodeString(nlen,displayName) != 0) return -1;
-  UCHAR hasURI=0;
+  u1 hasURI=0;
   if (b->decodeByte(hasURI) != 0) return -1;
   if (hasURI!=0) {
     uri=new MediaURI();
@@ -446,7 +446,7 @@ int MediaList::deserializeImpl(SerializeBuffer *b) {
   emptyList();
   u4 numelem;
   if (b->decodeLong(numelem) != 0) return -1;
-  UCHAR hasRoot=0;
+  u1 hasRoot=0;
   if (b->decodeByte(hasRoot) != 0) return -1;
   if (hasRoot!=0) {
     _root=new MediaURI();
index 75d3f0ce0ccaf00d0fa5183307b792949bffa907..8e682f415a563a4769dccc6155832fbc1f7ec63e 100644 (file)
@@ -239,7 +239,7 @@ int MediaFile::getMediaBlock(u4 channel, u8 offset, u4 len, u4 * outlen,
     Log::getInstance()->log("Client", Log::DEBUG, "getMediaBlock pos = %llu not available", offset);
     return -1;
   }
-  if (*buffer == NULL) *buffer=(UCHAR *)malloc(len);
+  if (*buffer == NULL) *buffer=(u1 *)malloc(len);
   if (*buffer == NULL) {
     Log::getInstance()->log("Media::getMediaBlock",Log::ERR,"uanble to allocate buffer");
     return -1;
index 65f31d01a314f7aa0c2b6ed9d4c9232e9c674c73..8affb216bab6173381de2d2c3466d9d0aaae0f98 100644 (file)
@@ -32,7 +32,7 @@ struct MovieInfo
   std::string originalTitle;
   std::string tagline;
   std::string overview;
-  UCHAR adult{};
+  u1 adult{};
   std::string collectionName;
 
   int budget{};
index 287071316c4790484e909f52a66f3f1d6bb89467..ca9a5f2a0e90496a0376d21436412a290e820f93 100644 (file)
@@ -21,7 +21,7 @@
 #include "option.h"
 #include "vdr.h"
 
-Option::Option(u4 ID, const char* DISPLAYTEXT, const char* CONFIGSECTION, const char* CONFIGKEY, UCHAR OPTIONTYPE,
+Option::Option(u4 ID, const char* DISPLAYTEXT, const char* CONFIGSECTION, const char* CONFIGKEY, u1 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),
index f848afe9284e00519c7ca4b2c8a124da58c95963..2f47ec0a4ef00c83874a9abe4f7c53158b1c786a 100644 (file)
@@ -33,7 +33,7 @@ typedef std::vector<Option*> Options;
 class Option
 {
   public:
-    Option(u4 id, const char* displayText, const char* configSection, const char* configKey, UCHAR optionType,
+    Option(u4 id, const char* displayText, const char* configSection, const char* configKey, u1 optionType,
            u4 numChoices, u4 defaultChoice, u4 startInt,
            const char * const * options, const char * const * optionkeys = NULL, bool deletestrings = false, AbstractOption* handler = NULL);
     ~Option();
@@ -42,7 +42,7 @@ class Option
     const char* displayText;
     const char* configSection;
     const char* configKey;
-    UCHAR optionType;
+    u1 optionType;
     u4 numChoices;
     u4 defaultChoice;
     int startInt;
@@ -54,9 +54,9 @@ class Option
     u4 configChoice;
     u4 userSetChoice;
 
-    const static UCHAR TYPE_TEXT       = 1;
-    const static UCHAR TYPE_INT        = 2;
-    const static UCHAR TYPE_KEYED_TEXT = 3;
+    const static u1 TYPE_TEXT       = 1;
+    const static u1 TYPE_INT        = 2;
+    const static u1 TYPE_KEYED_TEXT = 3;
 };
 
 #endif
index 5f5d023448a7c53fbfafcc77cf57016c85be9241..46ee3398e3d38ef502519f537b1b5e7a724fc75e 100644 (file)
@@ -1623,7 +1623,7 @@ void OsdOpenVG::destroyImageRef(VectorHandleImage handle)
   putOpenVGCommand(comm, false);
 }
 
-bool OsdOpenVG::getStaticImageData(unsigned int static_id, UCHAR** userdata, u4* length)
+bool OsdOpenVG::getStaticImageData(unsigned int static_id, u1** userdata, u4* length)
 {
   if (sa_MAX > static_id)
   {
index 58aa0517cbfc1308a69521f44c3b3e8bc1dc5e5a..0bf358a707720bb0697c216a62832daf2bea9ccf 100644 (file)
@@ -138,7 +138,7 @@ class OsdOpenVG : public OsdVector, public MessageReceiver
     VectorHandleImage createImagePalette(int width, int height, const unsigned char* image_data, const unsigned int* palette_data);
     void destroyDrawStyleHandle(VectorHandle index);
     VectorHandle createDrawStyleHandle(const DrawStyle& c);
-    bool getStaticImageData(unsigned int static_id, UCHAR** userdata, u4* length);
+    bool getStaticImageData(unsigned int static_id, u1** userdata, u4* length);
 
     void drawSetTrans(SurfaceInfo& sc);
     void executeDrawCommand(SVGCommand& command);
index a210479d1291e45f93d244e303905462da07fade..e61517549ce7a55945949f47f74fd9a118db3ba5 100644 (file)
@@ -241,7 +241,7 @@ class OsdVector : public Osd
     virtual void getScreenSize(int& width, int& height) = 0;
     virtual void getRealScreenSize(int& width, int& height) = 0;
 
-    virtual bool getStaticImageData(unsigned int static_id, UCHAR** userdata, u4* length) = 0;
+    virtual bool getStaticImageData(unsigned int static_id, u1** userdata, u4* length) = 0;
 
     // Used only by OsdVector and SurfaceVector
     void removeImageRef(const VectorHandleImage ref);
index 74be676698e44769d4f53da645e5eb348d6c24ff..359554d6d5521c1fd886aee3bdd8b805b88b4936 100644 (file)
@@ -1213,12 +1213,12 @@ void OsdWinVector::destroyImageRef(VectorHandleImage handle)
 }
 
 
-bool OsdWinVector::getStaticImageData(unsigned int static_id, UCHAR **userdata, u4 *length)
+bool OsdWinVector::getStaticImageData(unsigned int static_id, u1 **userdata, u4 *length)
 {
        if (sa_MAX>static_id) {
                HRSRC hrc = FindResource(GetModuleHandle(NULL), ext_pict_name[static_id], RT_RCDATA);
                *length = SizeofResource(GetModuleHandle(NULL), hrc);
-               *userdata = (UCHAR*) LockResource(LoadResource(GetModuleHandle(NULL), hrc));
+               *userdata = (u1*) LockResource(LoadResource(GetModuleHandle(NULL), hrc));
 
                return true;
        }
index 7305b3ee959b012b6a8b08003114f2d0ac8246e3..1946c85f002cd5042eea9e6822ee0ea8d7091e35 100644 (file)
@@ -75,7 +75,7 @@ protected:
        void createPicture(struct PictureInfo& pict_inf);
        void destroyDrawStyleHandle(VectorHandle index);
        VectorHandle createDrawStyleHandle(const DrawStyle &c);
-       bool getStaticImageData(unsigned int static_id, UCHAR **userdata, u4 *length);
+       bool getStaticImageData(unsigned int static_id, u1 **userdata, u4 *length);
 
 
        int  loadFont(bool fontchange);
index 5fcf49f9df61656c3e78f3f8bc368af15967d695..8f8e9b2294b3cfed97fa498eb5464592f22cba3c 100644 (file)
@@ -31,7 +31,7 @@ struct StreamChunk
 
 struct PLInstruction
 {
-  UCHAR instruction;
+  u1 instruction;
   u4 channelIndex;
 };
 
index f5ce5cfe2ca9939ef5e6449f59d2b0904fa20ac0..52a3c38539094034b24ff7b7d558e82f88ad58ff 100644 (file)
@@ -145,7 +145,7 @@ bool PlayerMedia::isPlayerRunning() {
        return playerRunnig;
 }
 
-int PlayerMedia::setRequestedState(UCHAR rstate) {
+int PlayerMedia::setRequestedState(u1 rstate) {
        int rt=0;
        threadLock();
        requestState=rstate;
@@ -156,15 +156,15 @@ int PlayerMedia::setRequestedState(UCHAR rstate) {
 }
 
 
-UCHAR PlayerMedia::getState() {
-       UCHAR rt=0;
+u1 PlayerMedia::getState() {
+       u1 rt=0;
        threadLock();
        rt=state;
        threadUnlock();
        return rt;
 }
 
-void PlayerMedia::setState(UCHAR s) {
+void PlayerMedia::setState(u1 s) {
        threadLock();
        state=s;
        threadUnlock();
@@ -185,8 +185,8 @@ int PlayerMedia::playNew(u4 mChannel,u8 lBytes,u8 lFrames)
   canPosition=mi.canPosition;
   if (rt == 0 && mi.canPosition) {
     //try to get the len
-    UCHAR buf[STARTBUFLEN];
-    UCHAR *bpointer=buf;
+    u1 buf[STARTBUFLEN];
+    u1 *bpointer=buf;
     u4 rtlen=0;
          logger->log("PlayerMedia", Log::DEBUG, "try to find last PTS with %lu bytes", STARTBUFLEN);
     int rb=MediaPlayer::getInstance()->getMediaBlock(mChannel,lBytes-STARTBUFLEN,STARTBUFLEN,&rtlen,&bpointer);
@@ -336,11 +336,11 @@ void PlayerMedia::sendFrontendMessage(u4 para)
 
 //method called by the playing thread to handle 
 //"commands" by the frontend
-UCHAR PlayerMedia::checkState()
+u1 PlayerMedia::checkState()
 {
        threadLock();
-       UCHAR rstate=requestState;
-       UCHAR cstate=state;
+       u1 rstate=requestState;
+       u1 cstate=state;
        int rseq=requestedSequence;
        int cseq=sequence;
        threadUnlock();
@@ -493,7 +493,7 @@ void PlayerMedia::threadMethod()
   int retrycount=0;
   while(1)
   {
-               UCHAR cstate=checkState();
+               u1 cstate=checkState();
     if (! running) {
                        break;
                }
index 3b7c01c9d7e69030d7894a5b35085bda4efeecc9..11001857d0e8e2ca9e064082052e80cc89bcad65 100644 (file)
@@ -99,17 +99,17 @@ class PlayerMedia : public Thread_TYPE, public Callback, public TimerReceiver
     
     virtual void call(void * caller);
 
-    UCHAR getState() ;
+    u1 getState() ;
 
-    const static UCHAR S_PLAY = 1;
-    const static UCHAR S_PAUSE = 2;
-    const static UCHAR S_POSITION = 3;
-    const static UCHAR S_DONE=5;
-    const static UCHAR S_STOP = 6;
-    const static UCHAR S_ERROR = 8;
-    const static UCHAR S_FF = 9;
-    const static UCHAR S_BACK = 10;
-    const static UCHAR S_SEEK = 11;
+    const static u1 S_PLAY = 1;
+    const static u1 S_PAUSE = 2;
+    const static u1 S_POSITION = 3;
+    const static u1 S_DONE=5;
+    const static u1 S_STOP = 6;
+    const static u1 S_ERROR = 8;
+    const static u1 S_FF = 9;
+    const static u1 S_BACK = 10;
+    const static u1 S_SEEK = 11;
 
 
     //message parameters for frontend messages
@@ -154,11 +154,11 @@ class PlayerMedia : public Thread_TYPE, public Callback, public TimerReceiver
     int feederState;
 
     //synchronized get/set methods for states
-    int setRequestedState(UCHAR st);
-    void setState(UCHAR st);
+    int setRequestedState(u1 st);
+    void setState(u1 st);
 
     //to be called from within the thread
-    UCHAR checkState();
+    u1 checkState();
 
                //variables used by the thread
                u4 thisWrite;
@@ -166,9 +166,9 @@ class PlayerMedia : public Thread_TYPE, public Callback, public TimerReceiver
     bool running;
     bool onStartup;  //set for the firts chunk to find the audio channel
 
-    UCHAR *threadBuffer;
-    UCHAR state;
-    UCHAR requestState;
+    u1 *threadBuffer;
+    u1 state;
+    u1 requestState;
     u8 streampos;
                u8 bytesWritten;
                u8 requestedStreampos;
index 679ad3b04f0e7bf90011ba39fc8bd19d69b55299..f7ded9b5d11962bf09bad600d6a0e8dd2efb5825 100644 (file)
@@ -226,12 +226,12 @@ void PlayerRadioLive::chunkToDemuxer()
   StreamChunk s = streamChunks.front();
   streamChunks.pop();
   //logger->debug(TAG, "About to call demuxer with {} {}", (void*)s.data, s.len);
-  /*int a =*/ demuxer->put(static_cast<UCHAR*>(s.data), s.len);
+  /*int a =*/ demuxer->put(static_cast<u1*>(s.data), s.len);
   //logger->debug(TAG, "put {} to demuxer", a);
   free(s.data);  
 }
 
-void PlayerRadioLive::switchState(UCHAR newState)
+void PlayerRadioLive::switchState(u1 newState)
 {
   logger->debug(TAG, "Switch from state {} to state {}", state, newState);
 
index aa4abe6b44514f1af12eade5cfe27d07fea699d8..39661b63698da521f5b797a12646153b409fcf72 100644 (file)
@@ -68,12 +68,12 @@ class PlayerRadioLive : public PlayerLive, public Callback, public StreamReceive
 
     // FIXME so far this just duplicates the old system + the wss
 
-    const static UCHAR CONNECTION_LOST = 1;
-    const static UCHAR STOP_PLAYBACK = 2;
-    const static UCHAR STREAM_END = 3;
-    const static UCHAR ASPECT43 = 4;
-    const static UCHAR ASPECT169 = 5;
-    const static UCHAR PREBUFFERING = 6;
+    const static u1 CONNECTION_LOST = 1;
+    const static u1 STOP_PLAYBACK = 2;
+    const static u1 STREAM_END = 3;
+    const static u1 ASPECT43 = 4;
+    const static u1 ASPECT169 = 5;
+    const static u1 PREBUFFERING = 6;
 
   private:
     MessageQueue* messageQueue;
@@ -86,18 +86,18 @@ class PlayerRadioLive : public PlayerLive, public Callback, public StreamReceive
     std::shared_ptr<ChannelList> chanList;
 
     std::queue<PLInstruction> instructions;
-    const static UCHAR I_SETCHANNEL = 1;
-    const static UCHAR I_STOP = 2;
+    const static u1 I_SETCHANNEL = 1;
+    const static u1 I_STOP = 2;
 
     std::queue<StreamChunk> streamChunks;
 
     bool initted{};
 
-    UCHAR state{S_STOP};
-    const static UCHAR S_STOP = 1;
-    const static UCHAR S_PREBUFFERING = 2;
-    const static UCHAR S_PLAY = 3;
-    void switchState(UCHAR newState);
+    u1 state{S_STOP};
+    const static u1 S_STOP = 1;
+    const static u1 S_PREBUFFERING = 2;
+    const static u1 S_PLAY = 3;
+    void switchState(u1 newState);
     bool checkError();
 
     int preBufferCount;
index d51d7225f371ac8c87604ee8a0f4da58d3b58181..cc4eca26ec5c0b58d25ac07e4e003fc2ce0b2f4d 100644 (file)
@@ -81,7 +81,7 @@ bool PlayerRadioRec::init(u8 tlengthBytes, u4 tlengthFrames, bool isPesRecording
   u4 thisRead = 0;
   int success;
 
-  UCHAR* buffer = vdr->getBlock(0, 10000, &thisRead);
+  u1* buffer = vdr->getBlock(0, 10000, &thisRead);
   if (!buffer)
   {
     logger->error(TAG, "Failed to get start block");
@@ -117,7 +117,7 @@ bool PlayerRadioRec::setLengthSeconds()
   int success;
   u8 endPTS = 0;
   u4 thisRead = 0;
-  UCHAR* buffer = vdr->getBlock(lengthBytes - 10000, 10000, &thisRead);
+  u1* buffer = vdr->getBlock(lengthBytes - 10000, 10000, &thisRead);
   if (!buffer)
   {
     logger->error(TAG, "Failed to get end block");
@@ -273,7 +273,7 @@ void PlayerRadioRec::skipBackward(u4 seconds)
 
 // ----------------------------------- Implementations called events
 
-void PlayerRadioRec::switchState(UCHAR toState, u4 jumpToFrame)
+void PlayerRadioRec::switchState(u1 toState, u4 jumpToFrame)
 {
   if (!initted) return;
 
index 0ac8b602038c22ba57d91cd3f519019c47cd7352..de53a6fc3de402bcf75b803714480a697bcc389c 100644 (file)
@@ -61,26 +61,26 @@ class PlayerRadioRec : public Callback
     void skipForward(u4 seconds);
     void skipBackward(u4 seconds);
 
-    UCHAR getState() { return state; }
+    u1 getState() { return state; }
     u4 getCurrentSeconds();
     u4 getLengthSeconds();
 
     void call(void*); // for callback interface
 
-    const static UCHAR S_PLAY = 1;
-    const static UCHAR S_PAUSE_P = 2;
-    const static UCHAR S_PAUSE_I = 3;
-    const static UCHAR S_STOP = 6;
-    const static UCHAR S_JUMP = 7;
+    const static u1 S_PLAY = 1;
+    const static u1 S_PAUSE_P = 2;
+    const static u1 S_PAUSE_I = 3;
+    const static u1 S_STOP = 6;
+    const static u1 S_JUMP = 7;
 
     // Player events
 
-    const static UCHAR CONNECTION_LOST = 1;
-    const static UCHAR STOP_PLAYBACK = 2;
-    const static UCHAR STREAM_END = 3;
+    const static u1 CONNECTION_LOST = 1;
+    const static u1 STOP_PLAYBACK = 2;
+    const static u1 STREAM_END = 3;
 
   private:
-    void switchState(UCHAR newState, u4 jumpToFrame=0);
+    void switchState(u1 newState, u4 jumpToFrame=0);
     void threadMethod();
 
     void doConnectionLost();
@@ -114,7 +114,7 @@ class PlayerRadioRec : public Callback
     u4 currentFrameNumber{};
     static const u4 blockSize{10000};
     static const u4 startupBlockSize{20000};
-    UCHAR state{S_STOP};
+    u1 state{S_STOP};
 };
 
 #endif
index b3571c3a5c869e3123372aa16f242d8573f2e842..32db4a113b339d9965bf935ad4f7e38445e81096 100644 (file)
@@ -246,7 +246,7 @@ void PlayerVideoLive::call(void* caller)
     logger->debug(TAG, "Callback from demuxer");
 
     int parx,pary;
-    UCHAR dxCurrentAspect = demuxer->getAspectRatio(&parx, &pary);
+    u1 dxCurrentAspect = demuxer->getAspectRatio(&parx, &pary);
     if (dxCurrentAspect == Demuxer::ASPECT_4_3)
     {
       if (video->getTVsize() == Video::ASPECT16X9)
@@ -357,7 +357,7 @@ void PlayerVideoLive::chunkToDemuxer()
   StreamChunk s = streamChunks.front();
   streamChunks.pop();
 //  logger->log("PlayerVideoLive", Log::DEBUG, "About to call demuxer with %p %lu", s.data, s.len);
- /* int a =*/ demuxer->put(static_cast<UCHAR*>(s.data), toi4(s.len));
+ /* int a =*/ demuxer->put(static_cast<u1*>(s.data), toi4(s.len));
 //  logger->log("PlayerVideoLive", Log::DEBUG, "put %i to demuxer", a);
   free(s.data);
   if (pendingAudioPlay && (demuxer->getHorizontalSize() || !video->independentAVStartUp())) //Horizontal Size is zero, if not parsed
@@ -373,7 +373,7 @@ void PlayerVideoLive::chunkToDemuxer()
   }
 }
 
-void PlayerVideoLive::switchState(UCHAR newState)
+void PlayerVideoLive::switchState(u1 newState)
 {
   logger->debug(TAG, "Switch from state {} to state {}", state, newState);
 
index 42d02c8f347805665669a176e8577287fafe5e89..987c9971ccd6631f7ba0b6daef54719511018698 100644 (file)
@@ -82,12 +82,12 @@ class PlayerVideoLive : public PlayerLive, public Callback, public StreamReceive
 
     // FIXME so far this just duplicates the old system + the wss
 
-    const static UCHAR CONNECTION_LOST = 1;
-    const static UCHAR STOP_PLAYBACK = 2;
-    const static UCHAR STREAM_END = 3;
-    const static UCHAR ASPECT43 = 4;
-    const static UCHAR ASPECT169 = 5;
-    const static UCHAR PREBUFFERING = 6;
+    const static u1 CONNECTION_LOST = 1;
+    const static u1 STOP_PLAYBACK = 2;
+    const static u1 STREAM_END = 3;
+    const static u1 ASPECT43 = 4;
+    const static u1 ASPECT169 = 5;
+    const static u1 PREBUFFERING = 6;
 
   private:
     VFeed vfeed;
@@ -106,8 +106,8 @@ class PlayerVideoLive : public PlayerLive, public Callback, public StreamReceive
     VDR* vdr;
 
     std::queue<PLInstruction> instructions;
-    const static UCHAR I_SETCHANNEL = 1;
-    const static UCHAR I_STOP = 2;
+    const static u1 I_SETCHANNEL = 1;
+    const static u1 I_STOP = 2;
 
     std::queue<StreamChunk> streamChunks;
 
@@ -116,15 +116,15 @@ class PlayerVideoLive : public PlayerLive, public Callback, public StreamReceive
     std::condition_variable playerThreadCond;
     void threadMethod();
 
-    const static UCHAR S_STOP = 1;
-    const static UCHAR S_VIDEOSTARTUP = 2;
-    const static UCHAR S_PREBUFFERING = 3;
-    const static UCHAR S_PLAY = 4;
-    void switchState(UCHAR newState);
+    const static u1 S_STOP = 1;
+    const static u1 S_VIDEOSTARTUP = 2;
+    const static u1 S_PREBUFFERING = 3;
+    const static u1 S_PLAY = 4;
+    void switchState(u1 newState);
     bool checkError();
 
     bool initted{};
-    UCHAR state{S_STOP};
+    u1 state{S_STOP};
     bool subtitlesShowing{};
     bool firstStart{true};
     bool videoStartup{};
index 36188d691dee720e00fa2276b38c7036fd58c6eb..9e598dc5b3af4f38f75fbd365f8c2fdc21c63be7 100644 (file)
@@ -467,7 +467,7 @@ void PlayerVideoRec::skipBackward(int seconds)
 
 // ----------------------------------- Implementations called events
 
-void PlayerVideoRec::switchState(UCHAR toState, u4 jumpFrame)
+void PlayerVideoRec::switchState(u1 toState, u4 jumpFrame)
 {
   if (!initted) return;
 
@@ -948,7 +948,7 @@ void PlayerVideoRec::restartAtFramePI(u4 newFrame)
   u4 iframeLength;
   u4 iframeNumber;
 
-  UCHAR* buffer;
+  u1* buffer;
   u4 amountReceived;
   u4 videoLength;
 
@@ -1000,7 +1000,7 @@ void PlayerVideoRec::call(void* caller)
     }
 
     int parx,pary;
-    UCHAR dxCurrentAspect = demuxer->getAspectRatio(&parx,&pary);
+    u1 dxCurrentAspect = demuxer->getAspectRatio(&parx,&pary);
     if (dxCurrentAspect == Demuxer::ASPECT_4_3)
     {
       logger->debug(TAG, "Demuxer said video is 4:3 aspect, switching TV");
@@ -1028,7 +1028,7 @@ void PlayerVideoRec::call(void* caller)
     else
     {
       logger->debug(TAG, "Demuxer said video is something else... setting it anyway");
-         video->setAspectRatio(static_cast<UCHAR>(dxCurrentAspect), parx, pary);
+         video->setAspectRatio(static_cast<u1>(dxCurrentAspect), parx, pary);
     }
 
   }
index a8001353aa0a4ef47ab0809ebab7ab5839abcf58..d8087de0f94db467ab098a022284b4d82e9986d4 100644 (file)
@@ -80,10 +80,10 @@ class PlayerVideoRec : public Callback
     void jumpToMark(int mark);
     void jumpToFrameP(int newFrame);
 
-    UCHAR getState() { return state; }
+    u1 getState() { return state; }
     u4 getCurrentFrameNum();
     u4 getLengthFrames();
-    UCHAR getIScanRate() { return ifactor; }
+    u1 getIScanRate() { return ifactor; }
     bool* getDemuxerMpegAudioChannels();
     bool* getDemuxerAc3AudioChannels();
     bool* getDemuxerSubtitleChannels();
@@ -97,24 +97,24 @@ class PlayerVideoRec : public Callback
 
     void call(void*); // for callback interface
 
-    const static UCHAR S_PLAY = 1;
-    const static UCHAR S_PAUSE_P = 2;
-    const static UCHAR S_PAUSE_I = 3;
-    const static UCHAR S_FFWD = 4;
-    const static UCHAR S_FBWD = 5;
-    const static UCHAR S_STOP = 6;
-    const static UCHAR S_JUMP = 7;
-    const static UCHAR S_JUMP_PI = 8; // Jump to Pause_I mode
+    const static u1 S_PLAY = 1;
+    const static u1 S_PAUSE_P = 2;
+    const static u1 S_PAUSE_I = 3;
+    const static u1 S_FFWD = 4;
+    const static u1 S_FBWD = 5;
+    const static u1 S_STOP = 6;
+    const static u1 S_JUMP = 7;
+    const static u1 S_JUMP_PI = 8; // Jump to Pause_I mode
 
     // Player events
 
     // FIXME so far this just duplicates the old system + the wss
 
-    const static UCHAR CONNECTION_LOST = 1;
-    const static UCHAR STOP_PLAYBACK = 2;
-    const static UCHAR STREAM_END = 3;
-    const static UCHAR ASPECT43 = 4;
-    const static UCHAR ASPECT169 = 5;
+    const static u1 CONNECTION_LOST = 1;
+    const static u1 STOP_PLAYBACK = 2;
+    const static u1 STREAM_END = 3;
+    const static u1 ASPECT43 = 4;
+    const static u1 ASPECT169 = 5;
 
 #ifdef DEV
     void test1();
@@ -122,7 +122,7 @@ class PlayerVideoRec : public Callback
 #endif
 
   private:
-    void switchState(UCHAR newState, u4 jumpFrame=0);
+    void switchState(u1 newState, u4 jumpFrame=0);
 
     void threadMethod();
     void threadFeedPlay();
@@ -170,8 +170,8 @@ class PlayerVideoRec : public Callback
     u4 currentFrameNumber{};
     u4 blockSize{100000};
     u4 startupBlockSize{250000};
-    UCHAR state{S_STOP};
-    UCHAR ifactor{4}; // 4, 8, 16, 32
+    u1 state{S_STOP};
+    u1 ifactor{4}; // 4, 8, 16, 32
 };
 
 #endif
index 45a4e462f8dd91f23f097d731b8a391a78e1b4a6..6e39568857031437bfd0c230e17c52bd7ae9f276 100644 (file)
@@ -106,11 +106,11 @@ void RecInfo::setNumComponents(u4 tnumComponents)
   numComponents = tnumComponents;
   languages = new char*[numComponents];
   descriptions = new char*[numComponents];
-  streams = new UCHAR[numComponents];
-  types = new UCHAR[numComponents];
+  streams = new u1[numComponents];
+  types = new u1[numComponents];
 }
 
-void RecInfo::addComponent(u4 componentNum, UCHAR tstream, UCHAR ttype, char* tlanguage, char* tdescription)
+void RecInfo::addComponent(u4 componentNum, u1 tstream, u1 ttype, char* tlanguage, char* tdescription)
 {
   if (componentNum >= numComponents) return;
   streams[componentNum] = tstream;
index 3b294a3745d339484e8d5c038eb465fd7b509dd4..7c1877182001e597875ac1a60d9611bdf50a7c7d 100644 (file)
@@ -48,8 +48,8 @@ class RecInfo
        double fps;
 
     u4 numComponents;
-    UCHAR* streams;
-    UCHAR* types;
+    u1* streams;
+    u1* types;
     char** languages;
     char** descriptions;
 
@@ -62,7 +62,7 @@ class RecInfo
     u4 lifetime;
 
     void setNumComponents(u4);
-    void addComponent(u4 componentNum, UCHAR tstream, UCHAR ttype, char* tlanguage, char* tdescription);
+    void addComponent(u4 componentNum, u1 tstream, u1 ttype, char* tlanguage, char* tdescription);
     // addComponent accepts a pointer to a buffer that RecInfo will free, not the caller
     char* buildSummaryWithDetails(bool forceRefresh = false);
 
index db7109542452d5bbe083d7466fccb3f40e81831c..c1b7e558a0da51a4f9feb4ba06f05d26d4f86b24 100644 (file)
@@ -167,7 +167,7 @@ bool Recording::isRadio(bool &h264)
   if (!lengthBytes || !lengthFrames) return false;
 
   u4 thisRead;
-  UCHAR* buffer = vdr->getBlock(0ULL, 10000U, &thisRead);
+  u1* buffer = vdr->getBlock(0ULL, 10000U, &thisRead);
   if (!buffer) return false;
 
   if (!thisRead)
index a303bc3a98a3ff02685d31f62062bc84f56a0f99..3f74ccd7ecc0a94d709aa525a1c75600511a5e7b 100644 (file)
@@ -34,7 +34,7 @@
 #define BUFFERINCREASE 1024
 
 int SerializeBuffer::seek(int amount) {
-  UCHAR *np=current+amount;
+  u1 *np=current+amount;
   if (np < start || np > end) return -1;
   current=np;
   return 0;
@@ -51,7 +51,7 @@ int SerializeBuffer::checkSpace(int amount) {
        end=start+size;
        return 0;
      }
-     UCHAR *ns=new UCHAR[size+BUFFERINCREASE];
+     u1 *ns=new u1[size+BUFFERINCREASE];
      if (!ns) return -1;
      memcpy(ns,start,end-start);
      size=size+BUFFERINCREASE;
@@ -75,10 +75,10 @@ SerializeBuffer::SerializeBuffer(u4 sz,bool isMalloc,bool ai){
   autoincrease=ai;
   useMalloc=isMalloc;
   if (isMalloc) {
-    start=(UCHAR *)malloc(sz);
+    start=(u1 *)malloc(sz);
   }
   else {
-    start=new UCHAR[sz];
+    start=new u1[sz];
   }
   end=start;
   current=start;
@@ -86,7 +86,7 @@ SerializeBuffer::SerializeBuffer(u4 sz,bool isMalloc,bool ai){
   owning=true;
 }
     //constructor for SerializeBuffers with external buffers
-SerializeBuffer::SerializeBuffer(UCHAR *buffer,u4 sz,bool ow,bool isMalloc,bool ai) {
+SerializeBuffer::SerializeBuffer(u1 *buffer,u4 sz,bool ow,bool isMalloc,bool ai) {
   useMalloc=isMalloc;
   autoincrease=ai;
   owning=ow;
@@ -113,10 +113,10 @@ int SerializeBuffer::encodeShort(u2 data) {
   current+=sizeof(u2);
   return 0;
 }
-int SerializeBuffer::encodeByte(UCHAR data) {
-  if (checkSpace( (int)sizeof(UCHAR))!=0) return -1;
-  *((UCHAR *)(current))=data; 
-  current+=sizeof(UCHAR);
+int SerializeBuffer::encodeByte(u1 data) {
+  if (checkSpace( (int)sizeof(u1))!=0) return -1;
+  *((u1 *)(current))=data;
+  current+=sizeof(u1);
   return 0;
 }
 int SerializeBuffer::encodeLongLong(u8 data) {
@@ -158,10 +158,10 @@ int SerializeBuffer::decodeShort(u2 &data) {
   current+=sizeof(u2);
   return 0;
 }
-int SerializeBuffer::decodeByte(UCHAR &data) {
-  if (checkSpace( (int)sizeof(UCHAR))!=0) return -1;
-  data=*((UCHAR *)current);
-  current+=sizeof(UCHAR);
+int SerializeBuffer::decodeByte(u1 &data) {
+  if (checkSpace( (int)sizeof(u1))!=0) return -1;
+  data=*((u1 *)current);
+  current+=sizeof(u1);
   return 0;
 }
 int SerializeBuffer::decodeLongLong(u8 &data) {
@@ -190,8 +190,8 @@ int SerializeBuffer::decodeString(u4 &len, char *&strbuf) {
 }
 
 
-UCHAR * SerializeBuffer::steelBuffer() {
-  UCHAR *rt=start;
+u1 * SerializeBuffer::steelBuffer() {
+  u1 *rt=start;
   owning=false;
   autoincrease=false;
   return rt;
@@ -218,11 +218,11 @@ int Serializable::getSerializedLen() {
   return 6 + getSerializedLenImpl();
 }
 int Serializable::serialize(SerializeBuffer *b) {
-  UCHAR *ptr=b->getCurrent();
+  u1 *ptr=b->getCurrent();
   if (b->encodeShort(version) != 0) return -1;
   if (b->encodeLong(0) != 0) return -1; //dummy len
   if (serializeImpl(b) != 0) return -1;
-  UCHAR *ep=b->getCurrent();
+  u1 *ep=b->getCurrent();
   //now write the len
   int len=ep-ptr-6;
   if (len < 0) return -1 ; //internal error
@@ -237,7 +237,7 @@ int Serializable::deserialize(SerializeBuffer *b) {
   if (b->decodeShort(vers) != 0) return -1;
   u4 len=0;
   if (b->decodeLong(len) != 0) return -1;
-  UCHAR *data=b->getCurrent();
+  u1 *data=b->getCurrent();
   if (data+len > b->getEnd()) return -1;
   //TODO: set end temp. to current+len
   //for better error handling in deserializeImpl
index 2bf1dfbd24007b5c0b9518f5d4310ddb7da0f7ec..e90e9f571059370cf4c95e4bbe37297907cdefe7 100644 (file)
@@ -32,14 +32,14 @@ class SerializeBuffer {
     //constructor for send buffers
     SerializeBuffer(u4 size,bool isMalloc=false,bool autoincrease=false);
     //constructor for SerializeBuffers with external buffers
-    SerializeBuffer(UCHAR *buffer,u4 size,bool owning=false,bool isMalloc=true,bool autoincrease=false);
+    SerializeBuffer(u1 *buffer,u4 size,bool owning=false,bool isMalloc=true,bool autoincrease=false);
     ~SerializeBuffer();
     //access to bufferpointer
-    UCHAR * getStart(){ return start;}
-    UCHAR * getCurrent(){ return current;}
-    UCHAR * getEnd(){ return end;}
+    u1 * getStart(){ return start;}
+    u1 * getCurrent(){ return current;}
+    u1 * getEnd(){ return end;}
     //get the buffer and take it away from this object
-    UCHAR * steelBuffer();
+    u1 * steelBuffer();
     //seek relative to current
     int seek(int amount);
     void rewind();
@@ -50,19 +50,19 @@ class SerializeBuffer {
     int encodeLongLong(u8 data);
     int encodeShort(u2 data);
     int encodeString(const char *data);
-    int encodeByte(UCHAR data);
+    int encodeByte(u1 data);
 
     int decodeLong(u4 & data);
     int decodeLong(int & data);
     int decodeLongLong(u8 & data);
     int decodeShort(u2 & data);
     int decodeString(u4 &len,char * &data);
-    int decodeByte(UCHAR &data);
+    int decodeByte(u1 &data);
 
   private:
-    UCHAR* start;
-    UCHAR* end;
-    UCHAR* current;
+    u1* start;
+    u1* end;
+    u1* current;
     u4 size;
     bool useMalloc;
     bool owning;
index b147b7940041e41c69b133e012d8f02f341054ba..73dd5f21a3a7461c1a91456e6dab773af6f259b4 100644 (file)
@@ -38,7 +38,7 @@ void Stream::shutdown()
 
 int Stream::init(DrainTarget* tdt, int bufsize)
 {
-  outbuf = static_cast<UCHAR*>(malloc(bufsize));
+  outbuf = static_cast<u1*>(malloc(bufsize));
 
   if (!outbuf) return 0;
 
@@ -58,7 +58,7 @@ void Stream::flush()
   if (draintarget) draintarget->ResetTimeOffsets();
 }
 
-int Stream::put(const UCHAR* inbuf, int len, UCHAR type, unsigned int index)
+int Stream::put(const u1* inbuf, int len, u1 type, unsigned int index)
 {
   int ret = 0;
 
index 6715a670d364d4142811f7a97fe2cd7e91f430a1..22c4b4b0d596210c1f6af6392bb247402eebf376 100644 (file)
@@ -32,7 +32,7 @@ class Stream
     int init(DrainTarget* tdt, int bufsize);
     void shutdown();
     void flush();
-    int put(const UCHAR* inbuf, int len, UCHAR type, u4 index);
+    int put(const u1* inbuf, int len, u1 type, u4 index);
     bool drain(bool* dataavail = NULL);
 
   private:
@@ -41,7 +41,7 @@ class Stream
     std::mutex mutex;
     DrainTarget* draintarget{};
     int initted{};
-    UCHAR* outbuf;
+    u1* outbuf;
     int bufferSize;
 };
 
index edba126fc88dd23c904a3656959f9f4156f2954a..52bc3cf283484ebfb905f115e956819fbe81c6c1 100644 (file)
@@ -325,7 +325,7 @@ void Surface::drawTTChar(int ox, int oy, int x, int y, cTeletextChar c)
   endFastDraw();
 }
 
-void Surface::drawMonoBitmap(UCHAR* base, int dx, int dy, unsigned int height,
+void Surface::drawMonoBitmap(u1* base, int dx, int dy, unsigned int height,
                              unsigned int width, const DrawStyle& nextColour)
 {
   startFastDraw();
index d992d747a239046d3d5b396603e15edac82237a7..102a7cc9c8e4beddeae54f666ca337371e9cb757 100644 (file)
@@ -86,7 +86,7 @@ class Surface
     virtual void drawVertLine(int x, int y1, int y2, const DrawStyle& c) = 0;
     virtual void drawBitmap(int x, int y, const Bitmap& bm, const DisplayRegion& region) = 0;
     virtual void drawPoint(int x, int y, const DrawStyle& c, bool fastdraw = false); // This draws a point, must not be a pixel
-    virtual void drawMonoBitmap(UCHAR* base, int dx, int dy, unsigned int height, unsigned int width, const DrawStyle& nextColour);
+    virtual void drawMonoBitmap(u1* base, int dx, int dy, unsigned int height, unsigned int width, const DrawStyle& nextColour);
     virtual int updateToScreen(int sx, int sy, int w, int h, int dx, int dy) = 0;
     virtual void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b) = 0;
     virtual bool screenShot(const char* fileName) = 0;
index d895299ebdb3faef3ce4574541e0b13f2bda3cc0..be749a1bded3c9cd0ea52d90ec1048aef43fcf89 100644 (file)
@@ -198,11 +198,11 @@ void SurfaceDirectFB::drawBitmap(int x, int y, const Bitmap& bm)
     line = surface.sfc.width;
   else
     line = surface.sfc.width + (4 - remainder);
-  const std::vector<UCHAR>& bmdata = bm.rawData();
-  const std::vector<UCHAR>& Y = bm.palette.getYVector();
-  const std::vector<UCHAR>& Cr = bm.palette.getCrVector();
-  const std::vector<UCHAR>& Cb = bm.palette.getCbVector();
-  const std::vector<UCHAR>& A = bm.palette.getAVector();
+  const std::vector<u1>& bmdata = bm.rawData();
+  const std::vector<u1>& Y = bm.palette.getYVector();
+  const std::vector<u1>& Cr = bm.palette.getCrVector();
+  const std::vector<u1>& Cb = bm.palette.getCbVector();
+  const std::vector<u1>& A = bm.palette.getAVector();
   u4 b_offset = 0;
   u4 s_offset = x + y*line;
   u4 plotWidth = bmw;
@@ -216,7 +216,7 @@ void SurfaceDirectFB::drawBitmap(int x, int y, const Bitmap& bm)
     u4 i = 0;
     if (x & 1) // odd x - need to plot first column separately
     {
-      UCHAR index = bmdata[b_offset];
+      u1 index = bmdata[b_offset];
       *(surface.base[0] + s_offset) = Y[index];
       *(surface.base[1] + s_offset - 1) = Cb[index];
       *(surface.base[1] + s_offset) = Cr[index];
@@ -226,8 +226,8 @@ void SurfaceDirectFB::drawBitmap(int x, int y, const Bitmap& bm)
     // Now, plot pairs of pixels with averaged chroma values
     while (i < plotWidth - 1)
     {
-      UCHAR index1 = bmdata[b_offset + i];
-      UCHAR index2 = bmdata[b_offset + i + 1];
+      u1 index1 = bmdata[b_offset + i];
+      u1 index2 = bmdata[b_offset + i + 1];
       *(surface.base[0] + s_offset + i) = Y[index1];
       *(surface.base[0] + s_offset + i + 1) = Y[index2];
       *(surface.base[1] + s_offset + i) = (Cb[index1] + Cb[index2]) / 2;
@@ -238,7 +238,7 @@ void SurfaceDirectFB::drawBitmap(int x, int y, const Bitmap& bm)
     }
     if (i == plotWidth - 1) // One column left to do
     {
-      UCHAR index = bmdata[b_offset + i];
+      u1 index = bmdata[b_offset + i];
       *(surface.base[0] + s_offset + i) = Y[index];
       *(surface.base[1] + s_offset + i) = Cb[index];
       *(surface.base[1] + s_offset + i + 1) = Cr[index];
index d275d1bb2bdfb1dff59e5abe379e0e44386c783f..dfdd1c6d7e84585ee72f2a6c7f7012fe792e70b9 100644 (file)
@@ -366,7 +366,7 @@ void SurfaceVector::drawPoint(int x, int y, const DrawStyle& c, bool fastdraw)
   if (!fastdraw)  command_mutex.unlock();
 }
 
-void SurfaceVector::drawMonoBitmap(UCHAR* base, int dx, int dy, unsigned int height, unsigned int width, const DrawStyle& nextColour)
+void SurfaceVector::drawMonoBitmap(u1* base, int dx, int dy, unsigned int height, unsigned int width, const DrawStyle& nextColour)
 {
   command_mutex.lock();
   VectorHandleImage handle = osd->getMonoBitmapRef(base, width, height);
index c0fe24cb2e2d3c68c1423ebb7fc5ce047b3006c4..c8f71cb0a01075080d6f56a4afb28409a867a570 100644 (file)
@@ -57,7 +57,7 @@ class SurfaceVector : public Surface
     void drawVertLine(int x, int y1, int y2, const DrawStyle& c);
     void drawBitmap(int x, int y, const Bitmap& bm, const DisplayRegion& region);
     void drawPoint(int x, int y, const DrawStyle& c, bool fastdraw = false); // This draws a point, must not be a pixel
-    void drawMonoBitmap(UCHAR* base, int dx, int dy, unsigned int height, unsigned int width, const DrawStyle& nextColour);
+    void drawMonoBitmap(u1* base, int dx, int dy, unsigned int height, unsigned int width, const DrawStyle& nextColour);
     int updateToScreen(int sx, int sy, int w, int h, int dx, int dy);
 
     /* This is for system which need a locking of the drawing surface to speed up drawing */
index 603325de64239f1590247a70765de35a41dfa2d2..d562e20035a8c57c33c4f588ffc535263825dcb3 100644 (file)
@@ -83,12 +83,12 @@ void TBBoxx::setTitleBarIcon(Image& ticon)
   tbIcon = ticon;
 }
 
-void TBBoxx::setTitleBarOn(UCHAR on)
+void TBBoxx::setTitleBarOn(u1 on)
 {
   titleBarOn = on;
 }
 
-void TBBoxx::setBorderOn(UCHAR on)
+void TBBoxx::setBorderOn(u1 on)
 {
   borderOn = on;
 }
index 8c82fe0682f3b41f950b58bd1c792d67d6a75ec1..36308aa7b5b2ee2dbc7203e114ab3db60d17a27e 100644 (file)
@@ -37,8 +37,8 @@ class TBBoxx : public Boxx
     virtual ~TBBoxx();
     virtual void draw();
 
-    void setBorderOn(UCHAR on);
-    void setTitleBarOn(UCHAR on);
+    void setBorderOn(u1 on);
+    void setTitleBarOn(u1 on);
     void setTitleText(const char* title, int width=0);
 
     void setTitleBarColour(const DrawStyle& colour);
@@ -47,13 +47,13 @@ class TBBoxx : public Boxx
 
   private:
     char* titleText;
-    UCHAR borderOn;
+    u1 borderOn;
     int titleBarTextWidth;
     Image tbIcon;
 
   protected:
     DrawStyle titleBarColour;
-    UCHAR titleBarOn;
+    u1 titleBarOn;
 };
 
 #endif
index 24745529d81bb4526cd3ef8c74e2ec1fa549a911..ff36642ee7daf9aeac224ae92e0662cf10c1ea61 100644 (file)
--- a/src/tcp.h
+++ b/src/tcp.h
@@ -30,7 +30,7 @@
 
 struct MACAddress
 {
-  UCHAR mac[6];
+  u1 mac[6];
 };
 
 class LogNT;
index 66293492d45c0dc505771fa3103b4f3d5502af54..dd5b4e03c8ac1401b99a17de5f46ba4f7ae76708 100644 (file)
@@ -165,7 +165,7 @@ static u8 TxtPTSDifference(u8 pts1, u8 pts2)
     return -pts1 + pts2;
 }
 
-u4 TeletextDecoderVBIEBU::DeliverMediaSample(UCHAR* buffer, u4 *samplepos)
+u4 TeletextDecoderVBIEBU::DeliverMediaSample(u1* buffer, u4 *samplepos)
 {
    if (mediapacket.type != MPTYPE_TELETEXT)
    {
@@ -259,10 +259,10 @@ u4 TeletextDecoderVBIEBU::DeliverMediaSample(UCHAR* buffer, u4 *samplepos)
 
 }
 // This part is inspired by the vdr-plugin-osdteletext of Udo Richter and Marcel Wiesweg
-void TeletextDecoderVBIEBU::DecodeTeletext(const UCHAR* buffer, unsigned int /* field */) //needs to be exactly 42 byte long!!
+void TeletextDecoderVBIEBU::DecodeTeletext(const u1* buffer, unsigned int /* field */) //needs to be exactly 42 byte long!!
 {
-   UCHAR hdrbuf[5];
-   for (int i=0;i<5;i++) hdrbuf[i] = static_cast<UCHAR>( (unhamtab[buffer[2*i]]&0xF) | ((unhamtab[buffer[2*i+1]]&0xF)<< 4) );
+   u1 hdrbuf[5];
+   for (int i=0;i<5;i++) hdrbuf[i] = static_cast<u1>( (unhamtab[buffer[2*i]]&0xF) | ((unhamtab[buffer[2*i+1]]&0xF)<< 4) );
    int header=hdrbuf[0];
    int magazin=header & 0x7;
    int line = (header>>3) & 0x1f;
index 5e0dd27e5b317ac5de0aad206103882f56dcf9d1..f4722efeed1bab1f6be59975e854677f2126ea0c 100644 (file)
@@ -265,7 +265,7 @@ public:
 
 
     virtual void PrepareMediaSample(const MediaPacketList& mplist, u4 samplepos);
-    virtual u4 DeliverMediaSample(UCHAR* buffer, u4 *samplepos);
+    virtual u4 DeliverMediaSample(u1* buffer, u4 *samplepos);
 
     void registerTeletextView(VTeletextView* view) {txtview=view;};
     void unRegisterTeletextView(VTeletextView* view) {if (txtview==view) txtview=NULL;};
@@ -301,14 +301,14 @@ public:
 
 
 protected:
-    void DecodeTeletext(const UCHAR* buffer, unsigned int field);
+    void DecodeTeletext(const u1* buffer, unsigned int field);
     void RenderTeletextCode(bool renderfirstlineonly);
     void CleanPage();
 
     int selectedpage;
     int lang;
     int flags;
-    UCHAR curpage[25][40]; //Line DataCache
+    u1 curpage[25][40]; //Line DataCache
     cTeletextChar Page[40][25];
     char keyindigits[3];
 
index 5d6eebc1ad5ab0762f77bdbd74d99811735bcf40..c98526d6bf3f04aabf102d9c584f6fa42d388c25 100644 (file)
@@ -56,7 +56,7 @@ std::string tp2str(const std::chrono::time_point<std::chrono::system_clock>& tp)
 
 void dump(void* vdata, int remaining)
 {
-  UCHAR* data = reinterpret_cast<UCHAR*>(vdata);
+  u1* data = reinterpret_cast<u1*>(vdata);
   int pos{}, ntp, spaces;
   std::stringstream ascii;
 
index a54c86272aafdc4ae73f0577709bd8bc64957a4e..725da43ca36e42a237f0236378a0fef89e127aa5 100644 (file)
@@ -255,9 +255,9 @@ void VDPC::VDPC4::threadMethod()
     logger->debug("VDPC4", "goto waitformessage");
 
     #ifdef WIN32
-    UCHAR retval = udp4.waitforMessage(3, quitPipe);
+    u1 retval = udp4.waitforMessage(3, quitPipe);
     #else
-    UCHAR retval = udp4.waitforMessage(3, pfdsUDP4[0]);
+    u1 retval = udp4.waitforMessage(3, pfdsUDP4[0]);
     #endif
     logger->debug("VDPC4", "backfrom waitformessage");
 
@@ -360,7 +360,7 @@ void VDPC::VDPC6::threadMethod()
   {
     logger->debug("VDPC6", "goto waitformessage");
 
-    UCHAR retval = udp6.waitforMessage(3, pfdsUDP6[0]);
+    u1 retval = udp6.waitforMessage(3, pfdsUDP6[0]);
     logger->debug("VDPC6", "backfrom waitformessage");
 
     if (retval == 2) // we got a reply
index fb11e45716c3b9c879e2a8030d153bcf98c2be9d..12eae8ddbf72444fa7d6a59f29ae95186ee2cc84 100644 (file)
@@ -343,7 +343,7 @@ void VDR::threadMethod()
       }
 
       vresp = new VDR_ResponsePacket();  
-      vresp->setResponse(requestID, reinterpret_cast<UCHAR*>(userData), userDataLength);
+      vresp->setResponse(requestID, reinterpret_cast<u1*>(userData), userDataLength);
       // vresp now owns userData unless something calls vresp->getUserData()
 //      logger->debug(TAG, "Rxd a response packet, requestID={}, len={}", requestID, userDataLength);
 
@@ -387,7 +387,7 @@ void VDR::threadMethod()
       }
 
       vresp = new VDR_ResponsePacket();    
-      vresp->setStream(streamID, flag, reinterpret_cast<UCHAR*>(userData), userDataLength, channelID);
+      vresp->setStream(streamID, flag, reinterpret_cast<u1*>(userData), userDataLength, channelID);
       //logger->debug(TAG, "Rxd a stream packet, streamID={}, flag={}, len={}", streamID, flag, userDataLength);
 
       if (!edFindAndCall(vresp)) // makes ED lock, find receiver for vresp (using ed_cb_find() ) and then call (using ed_cb_call() )
@@ -639,7 +639,7 @@ bool VDR::doLogin(unsigned int* v_server_min, unsigned int* v_server_max, unsign
   if (!vrp.init(VDR_LOGIN, true, 6)) return false;
 
   MACAddress myMAC = tcp.getMAC();
-  if (!vrp.copyin(reinterpret_cast<UCHAR*>(&myMAC), 6)) return false;
+  if (!vrp.copyin(reinterpret_cast<u1*>(&myMAC), 6)) return false;
 
   VDR_ResponsePacket* vresp = RequestResponse(&vrp);
   if (vresp->noResponse()) { delete vresp; return false; }
@@ -784,14 +784,14 @@ bool VDR::getRecordingsList(RecMan* recman)
   recman->setStats(totalSpace, freeSpace, percent);
 
   u4 start;
-  UCHAR isNew;
+  u1 isNew;
   char* name;
   char* fileName;
 
   while (!vresp->end())
   {
     start = vresp->extractu4();
-    isNew = vresp->extractUCHAR();
+    isNew = vresp->extractu1();
     name = vresp->extractString();
     fileName = vresp->extractString();
     recman->addEntry(isNew, start, name, fileName);
@@ -876,7 +876,7 @@ std::shared_ptr<ChannelList> VDR::getChannelsList(u4 type)
     chan->number = vresp->extractu4();
     chan->type = vresp->extractu4();
     chan->name = vresp->extractString();
-    chan->vstreamtype = static_cast<UCHAR>(vresp->extractu4());
+    chan->vstreamtype = static_cast<u1>(vresp->extractu4());
 
     if (chan->type == type && ((chan->vstreamtype==0x1b && h264support)|| (chan->vstreamtype!=0x1b &&mpeg2support)) )
     {
@@ -960,7 +960,7 @@ int VDR::stopStreaming()
   return toReturn;
 }
 
-UCHAR* VDR::getBlock(u8 position, u4 maxAmount, u4* amountReceived)
+u1* VDR::getBlock(u8 position, u4 maxAmount, u4* amountReceived)
 {
   VDR_RequestPacket vrp;
   if (!vrp.init(VDR_GETBLOCK, true, sizeof(u8) + sizeof(u4))) return NULL;
@@ -979,7 +979,7 @@ UCHAR* VDR::getBlock(u8 position, u4 maxAmount, u4* amountReceived)
   }
 
   // Special handling for getblock
-  UCHAR* toReturn = vresp->getUserData();
+  u1* toReturn = vresp->getUserData();
   *amountReceived = vresp->getUserDataLength();
   
   delete vresp;
@@ -998,7 +998,7 @@ u8 VDR::streamRecording(char* fileName, u4* totalFrames, bool* IsPesRecording)
   
   u8 lengthBytes = vresp->extractu8();
   u4 lengthFrames = vresp->extractu4();
-  UCHAR isPesRecording = vresp->extractUCHAR();
+  u1 isPesRecording = vresp->extractu1();
   delete vresp;
 
   *totalFrames = lengthFrames;
@@ -1243,8 +1243,8 @@ RecInfo* VDR::getRecInfo(char* fileName)
     recInfo->setNumComponents(numComponents);
     for (u4 i = 0; i < numComponents; i++)
     {
-      recInfo->streams[i] = vresp->extractUCHAR();
-      recInfo->types[i] = vresp->extractUCHAR();
+      recInfo->streams[i] = vresp->extractu1();
+      recInfo->types[i] = vresp->extractu1();
       recInfo->languages[i] = vresp->extractString();
       recInfo->descriptions[i] = vresp->extractString();
     }
@@ -1333,7 +1333,7 @@ void VDR::getChannelPids(Channel* channel)
   // }
 
   channel->vpid = vresp->extractu4();
-  channel->vstreamtype = static_cast<UCHAR>(vresp->extractu4());
+  channel->vstreamtype = static_cast<u1>(vresp->extractu4());
   channel->numAPids = vresp->extractu4();
 
   for (u4 i = 0; i < channel->numAPids; i++)
@@ -1647,7 +1647,7 @@ void VDR::getScraperEventType(char * fileName, int & movieID,
        VDR_ResponsePacket* vresp = RequestResponse(&vrp);
        logger->debug(TAG, "After response");
        if (vresp->noResponse()) { delete vresp; return ; }
-       int type = vresp->extractUCHAR();
+       int type = vresp->extractu1();
        if (type == 0) //serie
        {
                seriesID = vresp->extractLONG();
@@ -1675,7 +1675,7 @@ void VDR::getScraperEventType(u4 channelid, u4 eventid, int & movieID,
        VDR_ResponsePacket* vresp = RequestResponse(&vrp);
        logger->debug(TAG, "After response");
        if (vresp->noResponse()) { delete vresp; return ; }
-       int type = vresp->extractUCHAR();
+       int type = vresp->extractu1();
        if (type == 0) //serie
        {
                seriesID = vresp->extractLONG();
@@ -1717,7 +1717,7 @@ MovieInfo *VDR::getScraperMovieInfo(int movieID)
   movieinf->originalTitle = vresp->extractStdString();
   movieinf->tagline = vresp->extractStdString();
   movieinf->overview = vresp->extractStdString();
-  movieinf->adult = vresp->extractUCHAR();
+  movieinf->adult = vresp->extractu1();
   movieinf->collectionName = vresp->extractStdString();
 
   movieinf->budget = vresp->extractLONG();
index 8a1a9b630bef2fe457cfc7acc40664128158b7c4..7b6469c0d5d7a3ff97638194e60a386ba5705cea 100644 (file)
--- 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, u4 maxAmount, u4* amountReceived);
+    u1*        getBlock(u8 position, u4 maxAmount, u4* amountReceived);
                   //get image blocks separate - we can do this in parallel
     int           stopStreaming();
     EventList*    getChannelSchedule(u4 number);
@@ -224,7 +224,7 @@ public ExternLogger
     static VDR* instance;
 
     VDR_ResponsePacket* RequestResponse(VDR_RequestPacket* request);
-    UCHAR* getBlock(u8 position, u4 maxAmount, u4* amountReceived, u4 cmd);
+    u1* getBlock(u8 position, u4 maxAmount, u4* amountReceived, u4 cmd);
     
     void connectionDied();
     bool sendKA(u4 timeStamp);
index d04ed6b704ccfe3ad3748c2dde6782b63270857d..aed5edb9e1074576fd52cbdaa0ffce5176e96478 100644 (file)
@@ -63,7 +63,7 @@ bool VDR_RequestPacket::init(u4 topcode, bool setUserDataLength, u4 userDataLeng
     userDataLength = 0; // so the below will write a zero
   }
   
-  buffer = static_cast<UCHAR*>(malloc(bufSize));
+  buffer = static_cast<u1*>(malloc(bufSize));
   if (!buffer) return false;
   
   channel = VDR::CHANNEL_REQUEST_RESPONSE;
@@ -96,7 +96,7 @@ bool VDR_RequestPacket::init(u4 topcode, bool setUserDataLength, u4 userDataLeng
   return true;
 }
 
-bool VDR_RequestPacket::copyin(const UCHAR* src, u4 len)
+bool VDR_RequestPacket::copyin(const u1* src, u4 len)
 {
   if (!checkExtend(len)) return false;
   memcpy(buffer + bufUsed, src, len);
@@ -179,7 +179,7 @@ bool VDR_RequestPacket::checkExtend(u4 by)
 {
   if (lengthSet) return true;
   if ((bufUsed + by) < bufSize) return true;
-  UCHAR* newBuf = (UCHAR*)realloc(buffer, bufSize + 512);
+  u1* newBuf = (u1*)realloc(buffer, bufSize + 512);
   if (!newBuf) return false;
   buffer = newBuf;
   bufSize += 512;
index 5936a640355a5e3ce76b5d18730d09d249fddcd3..6b7bc7eaf4adc11f1a44a84c75f69c1ab1df0694 100644 (file)
@@ -38,12 +38,12 @@ class VDR_RequestPacket
     ~VDR_RequestPacket();
     
     bool init(u4 opcode, bool setUserDataLength, u4 userDataLength);
-    bool copyin(const UCHAR* src, u4 len);
+    bool copyin(const u1* src, u4 len);
     bool addString(const char* string);
     bool addu4(u4 ul);
     bool addu8(u8 ull);
         
-    UCHAR* getPtr() { return buffer; }
+    u1* getPtr() { return buffer; }
     u4 getLen() { return bufUsed; }
     u4 getChannel() { return channel; }
     u4 getSerial() { return serialNumber; }
@@ -53,7 +53,7 @@ class VDR_RequestPacket
   private:
     static u4 serialNumberCounter;
     
-    UCHAR* buffer;
+    u1* buffer;
     u4 bufSize;
     u4 bufUsed;
     bool lengthSet;
index d75ecf74045fd4f1da17fad6563c65a3f078bbe6..ae4f1e777f8e60c1a4e0384703d77ef4a78e19ab 100644 (file)
@@ -45,7 +45,7 @@ VDR_ResponsePacket::~VDR_ResponsePacket()
   if (userData) free(userData);
 }
 
-void VDR_ResponsePacket::setResponse(u4 trequestID, UCHAR* tuserData, u4 tuserDataLength)
+void VDR_ResponsePacket::setResponse(u4 trequestID, u1* tuserData, u4 tuserDataLength)
 {
   channelID = VDR::CHANNEL_REQUEST_RESPONSE;
   requestID = trequestID;
@@ -53,7 +53,7 @@ void VDR_ResponsePacket::setResponse(u4 trequestID, UCHAR* tuserData, u4 tuserDa
   userDataLength = tuserDataLength;
 }
 
-void VDR_ResponsePacket::setStream(u4 tstreamID, u4 tflag, UCHAR* tuserData, u4 tuserDataLength, u4 tchannelID)
+void VDR_ResponsePacket::setStream(u4 tstreamID, u4 tflag, u1* tuserData, u4 tuserDataLength, u4 tchannelID)
 {
   channelID = tchannelID;
   streamID = tstreamID;
@@ -101,11 +101,11 @@ char* VDR_ResponsePacket::extractString()
   return str;
 }
 
-UCHAR VDR_ResponsePacket::extractUCHAR()
+u1 VDR_ResponsePacket::extractu1()
 {
-  if ((packetPos + sizeof(UCHAR)) > userDataLength) return 0;
-  UCHAR uc = userData[packetPos];
-  packetPos += sizeof(UCHAR);
+  if ((packetPos + sizeof(u1)) > userDataLength) return 0;
+  u1 uc = userData[packetPos];
+  packetPos += sizeof(u1);
   return uc;
 }
 
@@ -153,7 +153,7 @@ long VDR_ResponsePacket::extractLONG()
   return l;
 }
 
-UCHAR* VDR_ResponsePacket::getUserData()
+u1* VDR_ResponsePacket::getUserData()
 {
   ownBlock = false;
   return userData;
index 3f1f60bf6dd320d605290b51fa98ccac0aa488c2..3b0e8464fe3a0f2da2560b8567074a2d74d2998f 100644 (file)
@@ -39,8 +39,8 @@ class VDR_ResponsePacket
     VDR_ResponsePacket();
     ~VDR_ResponsePacket();
     
-    void setResponse(u4 requestID, UCHAR* packet, u4 packetLength);
-    void setStream(u4 streamID, u4 flag, UCHAR* packet, u4 packetLength, u4 tchannelID);
+    void setResponse(u4 requestID, u1* packet, u4 packetLength);
+    void setStream(u4 streamID, u4 flag, u1* packet, u4 packetLength, u4 tchannelID);
      
     bool noResponse() { return (userData == NULL); };
     int  serverError();
@@ -53,7 +53,7 @@ class VDR_ResponsePacket
     
     char*  extractString();
     std::string  extractStdString();
-    UCHAR  extractUCHAR();
+    u1  extractu1();
     u4  extractu4();
     u8 extractu8();
     long   extractLONG();
@@ -64,10 +64,10 @@ class VDR_ResponsePacket
     void dumpUD();
 
     // If you call this, the memory becomes yours. Free with free()
-    UCHAR* getUserData();
+    u1* getUserData();
 
   private:
-    UCHAR* userData;
+    u1* userData;
     u4 userDataLength;
     u4 packetPos;
     
index 2079b449f5163081e81d3537c0c35b5d8b6d137e..b37f0e27b13e0c3243d4f9d54576750c56817b05 100644 (file)
@@ -51,10 +51,10 @@ class VEpgSetTimer : public TBBoxx, public MessageReceiver
     // This lot is borrowed from VQuestion
     // A shame not to use it, but this view will probably get
     // a whole load more controls on it some day
-    const static UCHAR NO = 0;
-    const static UCHAR YES = 1;
+    const static u1 NO = 0;
+    const static u1 YES = 1;
 
-    UCHAR selectedOption;
+    u1 selectedOption;
 
     WButton buttonYes;
     WButton buttonNo;
index acb741fb631744ff6214a368dcc54a817fb8bc3d..a77870a6de7713b8b4acfeb0aae2b652093d2fbe 100644 (file)
@@ -50,17 +50,17 @@ class Video: public DrainTarget, public AbstractOption
     static Video* getInstance();
     //static void setInstance(Video*);
 
-    virtual int init(UCHAR format)=0;
+    virtual int init(u1 format)=0;
     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 int setFormat(u1 format)=0;
+    virtual u1 getSupportedFormats() { return COMPOSITERGB | SVIDEO;}; // if it returns zero there are no different formats
     virtual u4 supportedTVsize() { return 0; }; // if no selection is allowed
-    virtual UCHAR supportedTVFormats() { return 0; }; // if no selection is allowed
+    virtual u1 supportedTVFormats() { return 0; }; // if no selection is allowed
 
-    virtual int setConnection(UCHAR connection)=0;
-    virtual int setAspectRatio(UCHAR aspectRatio, int tparx,int tpary)=0;   // This one does the pin 8 scart widescreen switching
-    virtual int setMode(UCHAR mode)=0;
-    virtual int setTVsize(UCHAR size)=0;               // Is the TV a widescreen?
+    virtual int setConnection(u1 connection)=0;
+    virtual int setAspectRatio(u1 aspectRatio, int tparx,int tpary)=0;   // This one does the pin 8 scart widescreen switching
+    virtual int setMode(u1 mode)=0;
+    virtual int setTVsize(u1 size)=0;               // Is the TV a widescreen?
     virtual void executePendingModeChanges() {}; // This is called if you change the output mode and the device take a while for reinitialization
     virtual int setDefaultAspect()=0;
     virtual int setSource()=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, u4 length)=0;
+    virtual bool displayIFrame(const u1* buffer, u4 length)=0;
     virtual int EnterIframePlayback() {return 1;}; // Must not be implemented
 
     virtual bool supportsh264() { return false; };
@@ -110,10 +110,10 @@ class Video: public DrainTarget, public AbstractOption
 #endif
 
     int getMode()           { return mode; }
-    UCHAR getFormat()       { return format; }
+    u1 getFormat()       { return format; }
     u4 getScreenWidth()   { return screenWidth; }
     u4 getScreenHeight()  { return screenHeight; }
-    virtual UCHAR getTVsize()       { return tvsize; }
+    virtual u1 getTVsize()       { return tvsize; }
 
 
     virtual bool setVideoDisplay(VideoDisplay display);
@@ -121,25 +121,25 @@ class Video: public DrainTarget, public AbstractOption
     // u4 getFPS(); //removed
 
     // Video formats - AV_SET_VID_DISP_FMT
-    const static UCHAR NTSC = 0;
-    const static UCHAR PAL = 1;
-    const static UCHAR PAL_M = 2;
-    const static UCHAR NTSC_J = 4;
+    const static u1 NTSC = 0;
+    const static u1 PAL = 1;
+    const static u1 PAL_M = 2;
+    const static u1 NTSC_J = 4;
 
     // Video connections - AV_SET_VID_OUTPUT
-    const static UCHAR COMPOSITERGB = 1;
-    const static UCHAR SVIDEO = 2;
-    const static UCHAR HDMI = 4;
-    const static UCHAR HDMI3D = 16; //For future use
+    const static u1 COMPOSITERGB = 1;
+    const static u1 SVIDEO = 2;
+    const static u1 HDMI = 4;
+    const static u1 HDMI3D = 16; //For future use
 
     // Video aspect ratios - AV_SET_VID_RATIO
-    const static UCHAR ASPECT4X3 = 0;
-    const static UCHAR ASPECT16X9 = 1;
-    const static UCHAR ASPECT14X9 = 2; //future use
+    const static u1 ASPECT4X3 = 0;
+    const static u1 ASPECT16X9 = 1;
+    const static u1 ASPECT14X9 = 2; //future use
 
     // Video modes - AV_SET_VID_MODE
-    const static UCHAR NORMAL = 0;
-    const static UCHAR LETTERBOX = 1;
+    const static u1 NORMAL = 0;
+    const static u1 LETTERBOX = 1;
 /*
     Actual Source Aspect      Aspect IOCTL       Mode IOCTL       MODE A            MODE B
 
@@ -162,11 +162,11 @@ class Video: public DrainTarget, public AbstractOption
     To switch to MODE B, set the aspect ioctl to 16:9 and reopen the FD.
 */
 
-    const static UCHAR UNKNOWN2 = 2;
-    const static UCHAR QUARTER = 3;
-    const static UCHAR EIGHTH = 4;
-    const static UCHAR ZOOM = 5;
-    const static UCHAR UNKNOWN6 = 6;
+    const static u1 UNKNOWN2 = 2;
+    const static u1 QUARTER = 3;
+    const static u1 EIGHTH = 4;
+    const static u1 ZOOM = 5;
+    const static u1 UNKNOWN6 = 6;
 
 
 
@@ -178,12 +178,12 @@ class Video: public DrainTarget, public AbstractOption
     int initted;
     int fdVideo;
 
-    UCHAR tvsize;
-    UCHAR format;
-    UCHAR connection;
-    UCHAR aspectRatio;
+    u1 tvsize;
+    u1 format;
+    u1 connection;
+    u1 aspectRatio;
     int parx,pary;
-    UCHAR mode;
+    u1 mode;
 
     bool h264;
 
index 5dcd73c78a2a1c28dea6183881c171a9d9ba060c..8e1b41741cc959c97ce2fdec7c2f2c0b6a3996a0 100644 (file)
@@ -85,7 +85,7 @@ VideoOMX::~VideoOMX()
   instance = NULL;
 }
 
-int VideoOMX::init(UCHAR tformat)
+int VideoOMX::init(u1 tformat)
 {
   if (initted) return 0;
   initted = 1;
@@ -376,14 +376,14 @@ bool VideoOMX::addOptionsToPanes(int panenumber,Options *options,WOptionPane* pa
 
 
 
-int VideoOMX::setTVsize(UCHAR ttvsize)
+int VideoOMX::setTVsize(u1 ttvsize)
 {
   if (tvsize!=ttvsize) pendingmodechange=true;
   tvsize=ttvsize;
   return 1;
 }
 
-UCHAR VideoOMX::getTVsize()       {
+u1 VideoOMX::getTVsize()       {
        /*if (hdmi)*/
        return ASPECT16X9; // in order that aspect ratio changes are reported
        //return tvsize;
@@ -409,7 +409,7 @@ int VideoOMX::setDefaultAspect()
 
 
 
-int VideoOMX::setFormat(UCHAR tformat)
+int VideoOMX::setFormat(u1 tformat)
 {
   if (!initted) return 0;
   if ((tformat != PAL) && (tformat != NTSC)
@@ -561,7 +561,7 @@ void VideoOMX::selectVideoMode(int interlaced)
 }
 
 
-int VideoOMX::setConnection(UCHAR tconnection)
+int VideoOMX::setConnection(u1 tconnection)
 {
   if (!initted) return 0;
   if ((tconnection != COMPOSITERGB)  && (tconnection != HDMI)) return 0;
@@ -572,7 +572,7 @@ int VideoOMX::setConnection(UCHAR tconnection)
   return 1;
 }
 
-int VideoOMX::setAspectRatio(UCHAR taspectRatio, int tparx,int tpary)
+int VideoOMX::setAspectRatio(u1 taspectRatio, int tparx,int tpary)
 {
   if (!initted) return 0;
   //if ((taspectRatio != ASPECT4X3) && (taspectRatio != ASPECT16X9)) return 0;
@@ -587,7 +587,7 @@ int VideoOMX::setAspectRatio(UCHAR taspectRatio, int tparx,int tpary)
   return 1;
 }
 
-int VideoOMX::setMode(UCHAR tmode)
+int VideoOMX::setMode(u1 tmode)
 {
   if (!initted) return 0;
   if (tmode==LETTERBOX || tmode==NORMAL) mode=tmode;
@@ -2841,10 +2841,10 @@ OMX_ERRORTYPE VideoOMX::ProtOMXEmptyThisBuffer(OMX_HANDLETYPE handle, OMX_BUFFER
        return ret_val;
 }
 
-bool VideoOMX::detectIFrame(const UCHAR *buffer,unsigned int length)
+bool VideoOMX::detectIFrame(const u1 *buffer,unsigned int length)
 {
-       const UCHAR* curbuf=buffer;
-       const UCHAR* curbufend=buffer+length;
+       const u1* curbuf=buffer;
+       const u1* curbufend=buffer+length;
        unsigned int detector=0xFFFFFFFF;
        bool gotaud=false; // have seen access unit delimiter
 
@@ -2920,7 +2920,7 @@ void VideoOMX::PrepareMediaSample(const MediaPacketList& mplist, u4 /* samplepos
 
 }
 
-u4 VideoOMX::DeliverMediaSample(UCHAR* buffer, u4 *samplepos)
+u4 VideoOMX::DeliverMediaSample(u1* buffer, u4 *samplepos)
 {
        u4 consumed=0;
        while (consumed < mediapackets.size()) {
@@ -2935,7 +2935,7 @@ u4 VideoOMX::DeliverMediaSample(UCHAR* buffer, u4 *samplepos)
 }
 
 u4 VideoOMX::DeliverMediaPacket(MediaPacket packet,
-               const UCHAR* buffer,
+               const u1* buffer,
                u4 *samplepos)
 {
        if (packet.type == MPTYPE_VIDEO_H264)
@@ -3118,7 +3118,7 @@ u4 VideoOMX::DeliverMediaPacket(MediaPacket packet,
 
 
 
-bool VideoOMX::displayIFrame(const UCHAR* buffer, u4 length) {
+bool VideoOMX::displayIFrame(const u1* buffer, u4 length) {
        if (!omx_running) return false;
        if (!iframemode)
                EnterIframePlayback();
index b137557e6bff738ca39fd084e2a1dcd8077537dd..31f24fd762ce59d6b1e2ac1424b00fd80bcbd1cd 100644 (file)
@@ -66,20 +66,20 @@ class VideoOMX : public Video
     VideoOMX();
     virtual ~VideoOMX();
 
-    int init(UCHAR format);
+    int init(u1 format);
     int shutdown();
 
-    UCHAR getSupportedFormats() { return COMPOSITERGB | HDMI;};
+    u1 getSupportedFormats() { return COMPOSITERGB | HDMI;};
     u4 supportedTVsize() { return ASPECT4X3|ASPECT16X9|ASPECT14X9 ;};
-    UCHAR supportedTVFormats() { return NTSC|PAL|PAL_M|NTSC_J;};
+    u1 supportedTVFormats() { return NTSC|PAL|PAL_M|NTSC_J;};
 
-    int setFormat(UCHAR format);
-    int setConnection(UCHAR connection);
-    int setAspectRatio(UCHAR aspectRatio, int tparx,int tpary);   // This one does the pin 8 scart widescreen switching
-    int setMode(UCHAR mode);
+    int setFormat(u1 format);
+    int setConnection(u1 connection);
+    int setAspectRatio(u1 aspectRatio, int tparx,int tpary);   // This one does the pin 8 scart widescreen switching
+    int setMode(u1 mode);
     bool setVideoDisplay(VideoDisplay display);
-    int setTVsize(UCHAR size);               // Is the TV a widescreen?
-    UCHAR getTVsize();
+    int setTVsize(u1 size);               // Is the TV a widescreen?
+    u1 getTVsize();
 
     void executePendingModeChanges();
     int setDefaultAspect();
@@ -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, u4 length);
+    bool displayIFrame(const u1* 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&, u4 samplepos);
-    virtual u4 DeliverMediaSample(UCHAR* bulibaver, u4* samplepos);
+    virtual u4 DeliverMediaSample(u1* bulibaver, u4* samplepos);
 
 
        virtual bool supportsh264(){return true;};
@@ -150,7 +150,7 @@ class VideoOMX : public Video
 
           virtual bool DrainTargetBufferFull();
 
-          u4 DeliverMediaPacket(MediaPacket packet,const UCHAR* bulibaver,u4 *samplepos);
+          u4 DeliverMediaPacket(MediaPacket packet,const u1* bulibaver,u4 *samplepos);
 
 #define VPE_DECODER_OMX 1
 
@@ -187,10 +187,10 @@ class VideoOMX : public Video
           static OMX_ERRORTYPE FillBufferDone_OMX(OMX_IN OMX_HANDLETYPE hcomp, OMX_IN OMX_PTR appdata,OMX_IN OMX_BUFFERHEADERTYPE* bulibaver);
 
           u4 DeliverMediaPacketOMX(MediaPacket packet,
-                                                    const UCHAR* bulibaver,
+                                                    const u1* bulibaver,
                                                     u4 *samplepos);
 
-          bool detectIFrame(const UCHAR *buffer,unsigned int length);
+          bool detectIFrame(const u1 *buffer,unsigned int length);
 
           int PrepareInputBufsOMX();
           int DestroyInputBufsOMX();
@@ -290,7 +290,7 @@ class VideoOMX : public Video
           void updateMode();//called internally to adjust for different parameters
           void selectVideoMode(int interlaced);
 
-          UCHAR tvsystem;
+          u1 tvsystem;
           bool signalon;
           bool pendingmodechange;
           bool hdmi;
index 21a218e4c43df52af40d9a0f49d0224fd7737536..5edf7646cb818f5d1df73913c21f588d88dff2ec 100644 (file)
@@ -124,7 +124,7 @@ VideoWin::~VideoWin()
   instance = NULL;
 }
 
-int VideoWin::init(UCHAR tformat)
+int VideoWin::init(u1 tformat)
 {
   if (initted) return 0;
 
@@ -141,7 +141,7 @@ int VideoWin::init(UCHAR tformat)
 
 
 
-int VideoWin::setTVsize(UCHAR ttvsize)
+int VideoWin::setTVsize(u1 ttvsize)
 {
   pseudotvsize=ttvsize;
   return 1;
@@ -165,7 +165,7 @@ int VideoWin::shutdown()
   return 1;
 }
 
-int VideoWin::setFormat(UCHAR tformat)
+int VideoWin::setFormat(u1 tformat)
 {
   if (!initted) return 0;
   if ((tformat != PAL) && (tformat != NTSC)) return 0;
@@ -184,7 +184,7 @@ int VideoWin::setFormat(UCHAR tformat)
   return 1;
 }
 
-int VideoWin::setConnection(UCHAR tconnection)
+int VideoWin::setConnection(u1 tconnection)
 {
   if (!initted) return 0;
   if ((tconnection != COMPOSITERGB) && (tconnection != SVIDEO)) return 0;
@@ -193,7 +193,7 @@ int VideoWin::setConnection(UCHAR tconnection)
   return 1;
 }
 
-int VideoWin::setAspectRatio(UCHAR taspectRatio, int tparx,int tpary)
+int VideoWin::setAspectRatio(u1 taspectRatio, int tparx,int tpary)
 {
   if (!initted) return 0;
   parx=tparx;
@@ -204,7 +204,7 @@ int VideoWin::setAspectRatio(UCHAR taspectRatio, int tparx,int tpary)
   return 1;
 }
 
-int VideoWin::setMode(UCHAR tmode)
+int VideoWin::setMode(u1 tmode)
 {
   if (!initted) return 0;
 
@@ -1310,7 +1310,7 @@ int VideoWin::dsInitVideoFilter()
        return 1;
 }
 
-int VideoWin::setAudioStreamType(UCHAR type)
+int VideoWin::setAudioStreamType(u1 type)
 {
   aud_type=type;
   if (!initted) return 0;
@@ -1643,7 +1643,7 @@ void VideoWin::PrepareMediaSample(const MediaPacketList& mplist,
   mediapacket = mplist.front();
 }
 
-u4 VideoWin::DeliverMediaSample(UCHAR* buffer, u4 *samplepos)
+u4 VideoWin::DeliverMediaSample(u1* buffer, u4 *samplepos)
 {
   DeliverMediaPacket(mediapacket, buffer, samplepos);
   if (*samplepos == mediapacket.length) {
@@ -1654,7 +1654,7 @@ u4 VideoWin::DeliverMediaSample(UCHAR* buffer, u4 *samplepos)
 }
 
 u4 VideoWin::DeliverMediaPacket(MediaPacket packet,
-                                  const UCHAR* buffer,
+                                  const u1* buffer,
                                   u4 *samplepos)
 {
 
@@ -1929,7 +1929,7 @@ void VideoWin::SetAudioVolume(long volume)
        if (dsbasicaudio) dsbasicaudio->put_Volume(volume);
 }
 
-bool VideoWin::displayIFrame(const UCHAR* buffer, u4 length)
+bool VideoWin::displayIFrame(const u1* buffer, u4 length)
 {
        if (!iframemode) EnterIframePlayback();
        if (!isdsinited()) return false;
index d99d7ec2df827f98253938ef8ca5d4fb278555d3..86d39bff05b724e7e3ddcac331ad1d2262495a54 100644 (file)
@@ -55,21 +55,21 @@ public:
        VideoWin();
        virtual ~VideoWin();
 
-       int init(UCHAR format);
+       int init(u1 format);
        int shutdown();
 
-       int setFormat(UCHAR format);
-       UCHAR getSupportedFormats() { return 0;};
+       int setFormat(u1 format);
+       u1 getSupportedFormats() { return 0;};
        u4 supportedTVsize() { return ASPECT4X3|ASPECT16X9;};
-       UCHAR supportedTVFormats() { return 0;};
-
-       int setConnection(UCHAR connection);
-       int setAspectRatio(UCHAR aspectRatio, int tparx,int tpary);   // This one does the pin 8 scart widescreen switching
-       UCHAR getAspectRatio(){return aspectRatio;};
-       UCHAR getMode(){return mode;};
-       UCHAR getPseudoTVsize() {return pseudotvsize;};
-       int setMode(UCHAR mode);
-       int setTVsize(UCHAR size);               // Is the TV a widescreen?
+       u1 supportedTVFormats() { return 0;};
+
+       int setConnection(u1 connection);
+       int setAspectRatio(u1 aspectRatio, int tparx,int tpary);   // This one does the pin 8 scart widescreen switching
+       u1 getAspectRatio(){return aspectRatio;};
+       u1 getMode(){return mode;};
+       u1 getPseudoTVsize() {return pseudotvsize;};
+       int setMode(u1 mode);
+       int setTVsize(u1 size);               // Is the TV a widescreen?
        int setDefaultAspect();
        int setSource();
        int sync();
@@ -102,8 +102,8 @@ public:
 
        //Writing Data to Videodevice
        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 u4 DeliverMediaSample(u1* buffer, u4 *samplepos);
+       u4 DeliverMediaPacket(const MediaPacket packet, const u1* buffer, u4 *samplepos);
     virtual  bool dtsTimefix() {if (h264)return videoH264dtsfix; else return videompeg2dtsfix;}
 
        virtual bool supportsh264();
@@ -128,7 +128,7 @@ public:
 
        int getCurrentVideoMediaSample(IMediaSample** ms);
        int DeliverVideoMediaSample();
-       int setAudioStreamType(UCHAR type);
+       int setAudioStreamType(u1 type);
 
        virtual long long SetStartOffset(long long curreftime, bool *rsync);
        long long SetStartAudioOffset(long long curreftime, bool *rsync);
@@ -140,7 +140,7 @@ public:
        void turnVideoOn(){videoon=true;};
        void turnVideoOff(){videoon=false;};
 
-       virtual bool displayIFrame(const UCHAR* buffer, u4 length);
+       virtual bool displayIFrame(const u1* buffer, u4 length);
 
        const VideoDisplay & getVideoDisplay() { return vd; };
        bool isVideoOn() {return videoon;};
@@ -211,12 +211,12 @@ private:
        bool audioon;
        bool videoon;
        bool iframemode;
-       UCHAR pseudotvsize;
+       u1 pseudotvsize;
        REFERENCE_TIME lastreftimeRT;
        u8 lastreftimePTS;
        int lastaudiomode;
        int audiovolume;
-       UCHAR aud_type;
+       u1 aud_type;
        unsigned int vmrdeinterlacing; 
        VideoPresenter currentpresenter;
 #ifdef DS_DEBUG
index 1f051ea15c59046b9d04e3d10acf131b74bab96d..4c0d070041d948dc7cd9101c020ed120565aab00 100644 (file)
@@ -48,13 +48,13 @@ class VInfo : public TBBoxx, public MessageReceiver
 
   protected:
     std::string mainText;
-    UCHAR exitable;
-    UCHAR dropThrough;
-    UCHAR mainTextType;
+    u1 exitable;
+    u1 dropThrough;
+    u1 mainTextType;
     WButton okbutton;
 
-    const static UCHAR NORMAL = 1;
-    const static UCHAR ONELINER = 2;
+    const static u1 NORMAL = 1;
+    const static u1 ONELINER = 2;
 };
 
 #endif
index 33c5f46439730b2db6908ca86b4ac3b5287d348c..12424f61852f537d80066c4b4e2a75c372ff89e0 100644 (file)
@@ -138,7 +138,7 @@ class VPreader : public JpegReader {
          rt=-1;
        }
        else {
-         rt=reader->getImageChunk((u8)offset,(u4)len,&numrec,(UCHAR **)buf);
+         rt=reader->getImageChunk((u8)offset,(u4)len,&numrec,(u1 **)buf);
        }
      }
      Log::getInstance()->log("VMediaView::jpegReader", Log::DEBUG, "got n=%d,buf=%p,rt=%d",
index f566aef9503d319063c7cb89f93d3147a2b8f29a..5b4bf9a47e20075a47ee3c3d20d3f6cea54e8474 100644 (file)
@@ -115,7 +115,7 @@ int VQuestion::handleCommand(int command)
   return BoxStack::ABANDON_COMMAND;
 }
 
-void VQuestion::setDefault(UCHAR option)
+void VQuestion::setDefault(u1 option)
 {
   selectedOption = option;
 }
index 5f8916aa5cafc67b936f7423b067d9a74b18728d..dd2c8b53a3c3c0da35ede78e7191e63771f84f67 100644 (file)
@@ -32,15 +32,15 @@ class VQuestion : public TBBoxx, public MessageReceiver
   public:
     VQuestion(MessageReceiver* replyTo);
     ~VQuestion();
-    void setDefault(UCHAR option);
+    void setDefault(u1 option);
     void setMainText(const char* title);
 
     int handleCommand(int command);
     void processMessage(Message* m);
     void draw();
 
-    const static UCHAR NO = 0;
-    const static UCHAR YES = 1;
+    const static u1 NO = 0;
+    const static u1 YES = 1;
 
   private:
     MessageReceiver* replyTo;
@@ -48,7 +48,7 @@ class VQuestion : public TBBoxx, public MessageReceiver
 
     void swap();
 
-    UCHAR selectedOption{NO};
+    u1 selectedOption{NO};
 
     WButton buttonYes;
     WButton buttonNo;
index 11c512a77e8cee9cfc8d672d866be9c255790b83..33762e958f804e2d43608653682d116628f56941 100644 (file)
@@ -379,7 +379,7 @@ void VRadioRec::doBar(int action)
   w.nextSymbol = 0;
   w.setPosition(barRegion.x + 66, barRegion.y + 16);
 
-  UCHAR playerState = 0;
+  u1 playerState = 0;
 
   if (action)
   {
index c7dc2d3e9b9ea0a86b4a20aea8f9b2ae5c5cb527..d96c74e12df06953e2f2315b28a0d021728dc6fc 100644 (file)
@@ -908,7 +908,7 @@ void VVideoLiveTV::timercall(int ref)
   }
 }
 
-bool VVideoLiveTV::channelChange(UCHAR changeType, u4 newData)
+bool VVideoLiveTV::channelChange(u1 changeType, u4 newData)
 {
   u4 newChannel = 0;
   if (streamType == VDR::VIDEO)
index 1f2dc299e962429dc79e1164b4153aa95683e311..1a7c272ea20ecb312e08fab8265107669f1df69c 100644 (file)
@@ -58,17 +58,17 @@ class VVideoLiveTV : public Boxx, public MessageReceiver, public TimerReceiver,
 
     void go();
 
-    bool channelChange(UCHAR changeType, u4 newData);
+    bool channelChange(u1 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)
 
-    const static UCHAR INDEX = 1;
-    const static UCHAR NUMBER = 2;
-    const static UCHAR OFFSET = 3;
-    const static UCHAR PREVIOUS = 4;
-    const static UCHAR UP = 1;
-    const static UCHAR DOWN = 2;
+    const static u1 INDEX = 1;
+    const static u1 NUMBER = 2;
+    const static u1 OFFSET = 3;
+    const static u1 PREVIOUS = 4;
+    const static u1 UP = 1;
+    const static u1 DOWN = 2;
 
     void timercall(int ref);
 
index c560c288d0c03a40d202a0aa4a1aa64302ccd625..0e65c242bed0d5b569f1bf73f8ed56e3f6fdd61e 100644 (file)
@@ -528,7 +528,7 @@ void VVideoMedia::doBar(int action)
   w.nextSymbol = 0;
   w.setPosition(barRegion.x + 66, barRegion.y + 16);
 
-  UCHAR playerState = 0;
+  u1 playerState = 0;
 
   if (action)
   {
@@ -553,7 +553,7 @@ void VVideoMedia::doBar(int action)
   if ((playerState == PlayerMedia::S_FF) || (playerState == PlayerMedia::S_BACK))
   {
     // draw blips to show how fast the scan is
-    UCHAR scanrate = 2;//player->getIScanRate();
+    u1 scanrate = 2;//player->getIScanRate();
     if (scanrate >= 2)
     {
       char text[5];
@@ -591,7 +591,7 @@ void VVideoMedia::drawBarClocks()
 {
   if (barScanHold)
   {
-    UCHAR playerState = player->getState();
+    u1 playerState = player->getState();
     // sticky bar is set if we are in ffwd/fbwd mode
     // if player has gone to S_PLAY then kill stickyBar, and run doBar(0) which
     // will repaint all the bar (it will call this function again, but
index 4869c4f51d8d601a16f7f9e934c45c0df2bd0259..8192e3b614ab525d0750b0f894dee7565d10007f 100644 (file)
@@ -61,7 +61,7 @@ class VVideoMedia : public Boxx, public TimerReceiver, public MessageReceiver
 
     DrawStyle barBlue;
 
-    UCHAR videoMode;
+    u1 videoMode;
     void toggleChopSides();
 
     bool playing;
index 3d5a5911a8ce82c32987f0e86dc088244dbb6d03..ebeba5f688b6b4e414ee66c19011bcc0c0b56479 100644 (file)
@@ -809,7 +809,7 @@ void VVideoRec::doBar(int action_in)
   w.nextSymbol = 0;
   w.setPosition(barRegion.x + 66, barRegion.y + 16);
 
-  UCHAR playerState = 0;
+  u1 playerState = 0;
 
   if (action)
   {
@@ -833,7 +833,7 @@ void VVideoRec::doBar(int action_in)
   if ((playerState == PlayerVideoRec::S_FFWD) || (playerState == PlayerVideoRec::S_FBWD))
   {
     // draw blips to show how fast the scan is
-    UCHAR scanrate = player->getIScanRate();
+    u1 scanrate = player->getIScanRate();
     if (scanrate >= 2)
     {
       char text[5];
@@ -897,7 +897,7 @@ void VVideoRec::drawBarClocks()
 {
   if (barScanHold)
   {
-    UCHAR playerState = player->getState();
+    u1 playerState = player->getState();
     // sticky bar is set if we are in ffwd/fbwd mode
     // if player has gone to S_PLAY then kill stickyBar, and run doBar(0) which
     // will repaint all the bar (it will call this function again, but
index 580079c4872bbcae382ed1445d5e0a848826313e..8607d697240ff0b908e349a123c0b641ec7a588b 100644 (file)
@@ -31,7 +31,7 @@ void WButton::setText(const char* takeText)
   mytext = takeText;
 }
 
-void WButton::setActive(UCHAR tactive)
+void WButton::setActive(u1 tactive)
 {
   dimmed = false;
   active = tactive;
index 3b6eb5609218a701ce3092bdacf4969701405eed..023cfdc6b3be2ca63f1e268caa7a59a44b80a179 100644 (file)
@@ -30,7 +30,7 @@ class WButton : public Boxx
   public:
     WButton();
     void setText(const char* text);
-    void setActive(UCHAR tactive);
+    void setActive(u1 tactive);
     void dim();
     void draw();
     void setTag(int tag);
@@ -41,7 +41,7 @@ class WButton : public Boxx
 
   private:
     std::string mytext;
-    UCHAR active{};
+    u1 active{};
     bool dimmed{};
     int tag{};
 };
index 13befab64278a8853007cdd8706d0056f0d78d8a..bc6123ec43b77535a613d2daef4926aa4db58528 100644 (file)
@@ -255,9 +255,9 @@ void CalculateWindowSize(RECT * size,u4 size_mode) {
   }
   width=size->right-size->left-adjwidth;
   height=size->bottom-size->top-adjheight;
-  UCHAR mode=Video::PAL;
-  UCHAR aspect=Video::ASPECT4X3;
-  UCHAR tvsize=Video::ASPECT4X3;
+  u1 mode=Video::PAL;
+  u1 aspect=Video::ASPECT4X3;
+  u1 tvsize=Video::ASPECT4X3;
   Video* video = Video::getInstance();
   if (video) {
       mode=video->getMode();
index 25ad20b00be48b0ed1eeaa709a7b4650a4a7d734..c07e60b04ae0a6b324609ad07fc29ea5eb5d637f 100644 (file)
@@ -62,7 +62,7 @@ void WOptionBox::setSize(u4 w, u4 h)
   rightArrow.setPosition(w - 18, 2);
 }
 
-void WOptionBox::setActive(UCHAR tactive)
+void WOptionBox::setActive(u1 tactive)
 {
   active = tactive;
   setData();
index 2b242697d323e787c728c14c44eec603e3990484..92c16edd54661fd31487fc7177ecf28982a4a1f5 100644 (file)
@@ -40,7 +40,7 @@ class WOptionBox : public Boxx
 
     void addOption(const char* newOption);
     void setSelected(const char* selectedOption);
-    void setActive(UCHAR tactive);
+    void setActive(u1 tactive);
     void left();
     void right();
     void cycle();
@@ -55,7 +55,7 @@ class WOptionBox : public Boxx
     const static int MODE_INT = 2;
 
   private:
-    UCHAR active;
+    u1 active;
     u4 numOptions;
     char** options;
     u4 currentOption;
index 592d60067961f1555839910b7c5701cb6f3e347e..49b9633fe034eac8ad414af75b49c05af6dcb4c5 100644 (file)
@@ -65,16 +65,16 @@ void WRemoteConfig::initSelectList(bool startup)
   
   for (u4 i = 0; i < 256; i++)
   {
-    const char* vompKeyName = InputMan::getVompKeyName(static_cast<UCHAR>(i));
+    const char* vompKeyName = InputMan::getVompKeyName(static_cast<u1>(i));
     if (vompKeyName != NULL)
     {
       std::string line;
       line.reserve(150);
       line += vompKeyName;
       line += ": \t";
-      line += inputMan->getHardCodedHardwareKeyNamesForVompKey(static_cast<UCHAR>(i));
+      line += inputMan->getHardCodedHardwareKeyNamesForVompKey(static_cast<u1>(i));
       line += " \t"; // FIXME extra spaces for braindead strtok. Ditch strtok.
-      line += inputMan->getAllHardwareKeyNamesAssignedToVompKey(static_cast<UCHAR>(i));
+      line += inputMan->getAllHardwareKeyNamesAssignedToVompKey(static_cast<u1>(i));
       sl.addOption(line, reinterpret_cast<void*>(i), 0);
     }
   }
@@ -229,9 +229,9 @@ int WRemoteConfig::handleCommand(int command)
     case Input::OK:
     {
       learnmode = true;
-      // Two casts to get from void* to UCHAR. Wow. First reinterpret from void* to u4, then static to UCHAR
+      // Two casts to get from void* to u1. Wow. First reinterpret from void* to u4, then static to u1
       InputMan::getInstance()->EnterLearningMode(
-        static_cast<UCHAR>(reinterpret_cast<u4>(sl.getCurrentOptionData())));
+        static_cast<u1>(reinterpret_cast<u4>(sl.getCurrentOptionData())));
       return 1;
     }
     case Input::BACK:
index a5da06443d759dcc9dde8012c7ecba51c0aa1c02..c17976bf9045719b978f2075bd62f6e1bc5a4b82 100644 (file)
 
 #include "colour.h"
 
-UCHAR WSymbol::widths[] = { 2, 2, 4, 4, 1, 1, 3, 3, 3, 3, 3, 4, 4, 2, 2, 3, 5, 5, 4, 4, 2, 2, 5, 5, 4, 4, 5};
-UCHAR WSymbol::heights[] = { 8, 8, 12, 12, 24, 4, 18, 18, 18, 18, 18, 30, 30, 16, 16, 18, 18, 18, 16, 16, 8, 8, 16, 16, 16, 16, 26};
+u1 WSymbol::widths[] = { 2, 2, 4, 4, 1, 1, 3, 3, 3, 3, 3, 4, 4, 2, 2, 3, 5, 5, 4, 4, 2, 2, 5, 5, 4, 4, 5};
+u1 WSymbol::heights[] = { 8, 8, 12, 12, 24, 4, 18, 18, 18, 18, 18, 30, 30, 16, 16, 18, 18, 18, 16, 16, 8, 8, 16, 16, 16, 16, 26};
 
-UCHAR WSymbol::symbols[] = {
+u1 WSymbol::symbols[] = {
 
 /*
 00000000 00000011
@@ -1071,7 +1071,7 @@ void WSymbol::draw()
     offset += (widths[i]) * heights[i];
   }
 
-  UCHAR* base = symbols + offset;
+  u1* base = symbols + offset;
   int widthBytes = widths[nextSymbol];
   int widthBits = widthBytes * 8;
   int sHeight = heights[nextSymbol];
index 49754701f3940e7267c86fe1239e345b145fd7ec..d5c9bf6ae10bc09f95ec4f2c75e7b647ef9aa9f9 100644 (file)
@@ -31,42 +31,42 @@ class WSymbol : public Boxx
 
     //TODO add vector based Symbols
     void draw();
-    UCHAR nextSymbol;
+    u1 nextSymbol;
     DrawStyle nextColour;
 
     bool mouseLBDOWN(int x, int y);
 
-    const static UCHAR VOLUME = 0;
-    const static UCHAR TEST = 1;
-    const static UCHAR TEST2 = 2;
-    const static UCHAR VOLUME2 = 3;
-    const static UCHAR VOLBAR = 4;
-    const static UCHAR VOLDOT = 5;
-    const static UCHAR SKIPBACK = 6;
-    const static UCHAR SKIPFORWARD = 7;
-    const static UCHAR UP = 8;
-    const static UCHAR DOWN = 9;
-    const static UCHAR PLAY = 10;
-    const static UCHAR MUTE = 11;
-    const static UCHAR UNMUTE = 12;
-    const static UCHAR LEFTARROW = 13;
-    const static UCHAR RIGHTARROW = 14;
-    const static UCHAR PAUSE = 15;
-    const static UCHAR SKIPBACK2 = 16;
-    const static UCHAR SKIPFORWARD2 = 17;
-    const static UCHAR FBWD = 18;
-    const static UCHAR FFWD = 19;
-    const static UCHAR SMALLUP = 20;
-    const static UCHAR SMALLDOWN = 21;
-    const static UCHAR VIDEOASPECT43 = 22;
-    const static UCHAR VIDEOASPECT169 = 23;
-    const static UCHAR SINGLEAUDIO = 24;
-    const static UCHAR MULTIAUDIO = 25;
-    const static UCHAR CLOCK = 26;    
+    const static u1 VOLUME = 0;
+    const static u1 TEST = 1;
+    const static u1 TEST2 = 2;
+    const static u1 VOLUME2 = 3;
+    const static u1 VOLBAR = 4;
+    const static u1 VOLDOT = 5;
+    const static u1 SKIPBACK = 6;
+    const static u1 SKIPFORWARD = 7;
+    const static u1 UP = 8;
+    const static u1 DOWN = 9;
+    const static u1 PLAY = 10;
+    const static u1 MUTE = 11;
+    const static u1 UNMUTE = 12;
+    const static u1 LEFTARROW = 13;
+    const static u1 RIGHTARROW = 14;
+    const static u1 PAUSE = 15;
+    const static u1 SKIPBACK2 = 16;
+    const static u1 SKIPFORWARD2 = 17;
+    const static u1 FBWD = 18;
+    const static u1 FFWD = 19;
+    const static u1 SMALLUP = 20;
+    const static u1 SMALLDOWN = 21;
+    const static u1 VIDEOASPECT43 = 22;
+    const static u1 VIDEOASPECT169 = 23;
+    const static u1 SINGLEAUDIO = 24;
+    const static u1 MULTIAUDIO = 25;
+    const static u1 CLOCK = 26;
   private:
-    static UCHAR symbols[];
-    static UCHAR widths[];
-    static UCHAR heights[];
+    static u1 symbols[];
+    static u1 widths[];
+    static u1 heights[];
 };
 
 #endif