]> git.vomp.tv Git - vompclient.git/commitdiff
Define new (un)signed integer types. Begin transition.
authorChris Tallon <chris@vomp.tv>
Sun, 14 Aug 2022 16:22:56 +0000 (16:22 +0000)
committerChris Tallon <chris@vomp.tv>
Sun, 14 Aug 2022 16:22:56 +0000 (16:22 +0000)
Remove obsolete getCommandLineServer()

src/channel.h
src/defines.h
src/playervideolive.cc
src/winmain.cc

index 1825400098043a7674982738312d8d2885773d5e..84280dec55eb378e06ef3a83d3727b0cffb1ab02 100644 (file)
 
 typedef struct _apid
 {
-  ULONG pid;
+  u4 pid;
   char desc[10];
-  ULONG type;
-  ULONG data1;
-  ULONG data2;
+  u4 type;
+  u4 data1;
+  u4 data2;
 } apid;
 
 typedef std::vector<apid> APidList;
@@ -44,19 +44,19 @@ class Channel
     void loadPids();
 
     int index{-1};
-    ULONG number{};
-    ULONG type{};
+    u4 number{};
+    u4 type{};
     UCHAR vstreamtype{2}; //Mpeg2
     std::string name;
 
-    ULONG vpid{};
-    ULONG numAPids{};
+    u4 vpid{};
+    u4 numAPids{};
     APidList apids;
-    ULONG numDPids{};
+    u4 numDPids{};
     APidList dpids;
-    ULONG numSPids{};
+    u4 numSPids{};
     APidList spids;
-    ULONG tpid{};
+    u4 tpid{};
 };
 
 #endif
index fb003f771f2dd619b890ffa53caf1fa8db73aef3..f140035118a128ec726e51b0d82222dfeb9b87b2 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright 2004-2020 Chris Tallon
+    Copyright 2004-2022 Chris Tallon
 
     This file is part of VOMP.
 
@@ -26,6 +26,22 @@ typedef unsigned int UINT;
 typedef unsigned long ULONG;
 typedef unsigned long long ULLONG;
 
+#include <stdint.h>
+
+typedef int8_t i1;
+typedef int16_t i2;
+typedef int32_t i4;
+typedef int64_t i8;
+typedef uint8_t u1;
+typedef uint16_t u2;
+typedef uint32_t u4;
+typedef uint64_t u8;
+
+#define toi4(arg) static_cast<i4>(arg)
+#define tou4(arg) static_cast<u4>(arg)
+
+
+
 #define OPTIONTYPE_TEXT 1
 #define OPTIONTYPE_INT 2
 
@@ -36,13 +52,8 @@ typedef unsigned long long ULLONG;
 
 long long getTimeMS();
 
-#include <string>
-
-
 int getClockRealTime(struct timespec *tp);
 
-const std::string& getCommandLineServer();
-
 //#define WINDOWS_LEGACY
 
 #ifdef WIN32
index 47d8915fd51957bdea14e80cabb62de3caac70d4..8c46d92b8b6f877a759286fd2ea70c19f44ea6b0 100644 (file)
@@ -85,7 +85,7 @@ int PlayerVideoLive::init()
     //demux_audio_size*=2;
   }
 
-  int text_fak = video->getTeletextBufferFaktor();
+  u4 text_fak = tou4(video->getTeletextBufferFaktor());
 
   if (!demuxer->init(this, audio, video, teletext, demux_video_size, demux_audio_size, 65536 * text_fak, 25./*unimportant*/, subtitles))
   {
@@ -357,9 +357,9 @@ 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), s.len);
+ /* int a =*/ demuxer->put(static_cast<UCHAR*>(s.data), toi4(s.len));
 //  logger->log("PlayerVideoLive", Log::DEBUG, "put %i to demuxer", a);
-  free(s.data);  
+  free(s.data);
   if (pendingAudioPlay && (demuxer->getHorizontalSize() || !video->independentAVStartUp())) //Horizontal Size is zero, if not parsed
   {
     video->sync();
@@ -731,7 +731,7 @@ void PlayerVideoLive::threadMethod()
           h264 = (chan->vstreamtype == 0x1b);
           demuxer->seth264(h264);
           video->seth264mode(h264);
-          demuxer->setVID(chan->vpid);
+          demuxer->setVID(toi4(chan->vpid));
           video->seth264mode(h264);
 
           bool dolby = false;
@@ -746,7 +746,7 @@ void PlayerVideoLive::threadMethod()
             while (j < chan->numDPids)
             {
               int newpref = control->getLangPref(false, chan->dpids[j].desc);
-              if (Audio::getInstance()->streamTypeSupported(chan->dpids[j].type) && (prefered < 0 || newpref < prefered))
+              if (Audio::getInstance()->streamTypeSupported(toi4(chan->dpids[j].type)) && (prefered < 0 || newpref < prefered))
               {
                 selected = j;
                 dolby=true;
index cdbcb64959d0f20af535646558e6239bea8adffe..35a15caa016d61ea29c5b013600d52167f440404 100644 (file)
@@ -50,7 +50,6 @@ int debugEnabled = 0;
 Log* logger;
 InputWin* inputWin;
 Control* control;
-std::string commandLineServer; // NCONFIG
 
 bool wnd_fullscreen=false;
 bool wnd_topmost=false;
@@ -732,11 +731,6 @@ void shutdown(int code)
 
 // -------------------------------------------------------------------------------------------------------------------
 
-const std::string& getCommandLineServer()
-{
-  return commandLineServer;
-}
-
 
 #endif