summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/vs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/vs.cpp')
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/vs.cpp41
1 files changed, 40 insertions, 1 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/vs.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/vs.cpp
index 23566f19744..0df103037f9 100644
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/vs.cpp
+++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/vs.cpp
@@ -48,7 +48,6 @@
#include "mpeg_shared/com.h"
#include "mpeg_shared/sendpt.h"
#include "server_proto.h"
-#include "Globals.h"
ACE_RCSID(mpeg_server, vs, "$Id$")
@@ -652,6 +651,46 @@ static void WriteInfoToFile(void)
return;
}
+/*
+#define nextByte {fileptr ++; \
+ if (fread(&nb, 1, 1, fp) == 0) \
+ { \
+ ACE_OS::perror ("VS Crossed EOF or error while scanning"); \
+ return 1; \
+ } }
+
+*/
+
+#define nextByte {int val; fileptr ++; \
+ if ((val = getc(VIDEO_SINGLETON::instance ()->fp)) == EOF) \
+ {\
+ ACE_OS::perror ("Crossed EOF or error while scanning"); \
+ return 1; \
+ } nb = val;}
+
+#define computePicSize \
+ if (inpic) \
+ { \
+ if (pictype == 'I') \
+ { \
+ VIDEO_SINGLETON::instance ()->maxI = max(VIDEO_SINGLETON::instance ()->maxI, (int)(fileptr - picptr - 4)); \
+ VIDEO_SINGLETON::instance ()->minI = min(VIDEO_SINGLETON::instance ()->minI, (int)(fileptr - picptr - 4)); \
+ } \
+ else if (pictype == 'P') \
+ { \
+ VIDEO_SINGLETON::instance ()->maxP = max(VIDEO_SINGLETON::instance ()->maxP, (int)(fileptr - picptr - 4)); \
+ VIDEO_SINGLETON::instance ()->minP = min(VIDEO_SINGLETON::instance ()->minP, (int)(fileptr - picptr - 4)); \
+ } \
+ else \
+ { \
+ VIDEO_SINGLETON::instance ()->maxB = max(VIDEO_SINGLETON::instance ()->maxB, (int)(fileptr - picptr - 4)); \
+ VIDEO_SINGLETON::instance ()->minB = min(VIDEO_SINGLETON::instance ()->minB, (int)(fileptr - picptr - 4)); \
+ } \
+ VIDEO_SINGLETON::instance ()->frameTable[ftptr].type = pictype; \
+ VIDEO_SINGLETON::instance ()->frameTable[ftptr++].size = (int)(fileptr - picptr - 4); \
+ inpic = 0; \
+ }
+
static int init_MPEG1_video_file(void)
{
unsigned char nb;