[Sumover-dev] [svn commit] r4172 - in vic/branches/mpeg4: codec codec/p64 render video

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Thu Jun 12 13:22:58 BST 2008


Author: piers
Date: Thu Jun 12 13:22:57 2008
New Revision: 4172

Modified:
   vic/branches/mpeg4/codec/encoder-mpeg4.cpp
   vic/branches/mpeg4/codec/ffmpeg_codec.cpp
   vic/branches/mpeg4/codec/p64/p64.cpp
   vic/branches/mpeg4/config.h
   vic/branches/mpeg4/render/vw.cpp
   vic/branches/mpeg4/video/grabber-win32.cpp

Log:
Intial updates for compliation under mingw


Modified: vic/branches/mpeg4/codec/encoder-mpeg4.cpp
==============================================================================
--- vic/branches/mpeg4/codec/encoder-mpeg4.cpp	(original)
+++ vic/branches/mpeg4/codec/encoder-mpeg4.cpp	Thu Jun 12 13:22:57 2008
@@ -7,6 +7,7 @@
 #include "inet.h"
 #include "net.h"
 #include "rtp.h"
+#include "debug.h"
 #include "vic_tcl.h"
 #include "transmitter.h"
 #include "pktbuf-rtp.h"

Modified: vic/branches/mpeg4/codec/ffmpeg_codec.cpp
==============================================================================
--- vic/branches/mpeg4/codec/ffmpeg_codec.cpp	(original)
+++ vic/branches/mpeg4/codec/ffmpeg_codec.cpp	Thu Jun 12 13:22:57 2008
@@ -4,9 +4,10 @@
 #include <string.h>
 #include <iostream>
 #include <math.h>
-#include "config.h"
+#include "debug.h"
 #include "ffmpeg_codec.h"
 
+extern int getpid();
 
 FFMpegCodec::FFMpegCodec()
 {

Modified: vic/branches/mpeg4/codec/p64/p64.cpp
==============================================================================
--- vic/branches/mpeg4/codec/p64/p64.cpp	(original)
+++ vic/branches/mpeg4/codec/p64/p64.cpp	Thu Jun 12 13:22:57 2008
@@ -64,6 +64,7 @@
 
 #ifdef WIN32
 //#include <winsock.h>
+typedef int intptr_t;
 #else
 #include <sys/param.h>
 #include <sys/file.h>

Modified: vic/branches/mpeg4/config.h
==============================================================================
--- vic/branches/mpeg4/config.h	(original)
+++ vic/branches/mpeg4/config.h	Thu Jun 12 13:22:57 2008
@@ -38,11 +38,13 @@
 
 #if defined(sgi) || defined(__bsdi__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
 #include <sys/types.h>
+
 #ifndef uint16_t
 typedef unsigned char  uint8_t;
 typedef unsigned short uint16_t;
 typedef unsigned int   uint32_t;
 #endif
+
 #elif defined(sun)
 
 #include <sys/types.h>
@@ -56,18 +58,27 @@
 #elif defined(linux)
 
 #include <sys/bitypes.h>
-#else
+
+#else /* ie non of the above - e.g. WIN32 */
+
 #ifdef ultrix
 #include <sys/types.h>
 #endif
-typedef char int8_t;
-typedef short int16_t;
-typedef int   int32_t;
+
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+typedef char 		int8_t;
+typedef short 		int16_t;
+typedef unsigned short	uint16_t;
+typedef int   		int32_t;
+#endif 
+//<sys/types.h>
 typedef unsigned char	u_int8_t;
 typedef unsigned short	u_int16_t;
-typedef unsigned short	uint16_t;
 typedef unsigned int	u_int32_t;
-#endif /*linux*/
+
+#endif /* end of checks for stdint */
 
 #if defined(sun) || defined(_AIX)
 #if defined(__cplusplus)

Modified: vic/branches/mpeg4/render/vw.cpp
==============================================================================
--- vic/branches/mpeg4/render/vw.cpp	(original)
+++ vic/branches/mpeg4/render/vw.cpp	Thu Jun 12 13:22:57 2008
@@ -108,9 +108,9 @@
 
 #include <dvp.h>
 
-char *ddrawErrorString(HRESULT rc);
+const char *ddrawErrorString(HRESULT rc);
 
-static totalPixelsDrawn = 0.0;
+static double totalPixelsDrawn = 0.0;
 
 DDrawVideoImage::MonitorList DDrawVideoImage::monitors_;
 HWND DDrawVideoImage::appMainWindow_;
@@ -996,12 +996,16 @@
 
 void DDrawImageMonitor::releaseSurface()
 {
+#ifdef _MSC_VER
     __try {
+#endif
 	ULONG oldRefCount = imageSurface_->Release();
 //	debug_msg("oldRefCount=%d\n", oldRefCount);
+#ifdef _MSC_VER
     } 
     __except(exceptionFilter(GetExceptionInformation())) {
     }
+#endif
     imageSurface_ = 0;
 }
 
@@ -1313,12 +1317,15 @@
     {
 	DDrawImageMonitor *m = *it;
 
+#ifdef _MSC_VER
 	__try {
-	    
+#endif
 	    m->putimage(hWnd, sx, sy, x, y, w, h);
+#ifdef _MSC_VER
 	} 
 	__except(exceptionFilter(GetExceptionInformation())) {
 	}	    
+#endif
     }
 }
 
@@ -1679,16 +1686,16 @@
 
 #ifdef USE_DDRAW
 
-char *ddrawErrorString(HRESULT rc)
+const char *ddrawErrorString(HRESULT rc)
 {
-	char *mesg;
+	const char *mesg;
 	switch (rc)
 	{
     case DD_OK:
         mesg = "DD_OK";
         break;
     case DDERR_ALREADYINITIALIZED:
-        mesg = "DDERR_ALREADYINITIALIZED";
+        return( "DDERR_ALREADYINITIALIZED");
         break;
     case DDERR_BLTFASTCANTCLIP:
         mesg = "DDERR_BLTFASTCANTCLIP";

Modified: vic/branches/mpeg4/video/grabber-win32.cpp
==============================================================================
--- vic/branches/mpeg4/video/grabber-win32.cpp	(original)
+++ vic/branches/mpeg4/video/grabber-win32.cpp	Thu Jun 12 13:22:57 2008
@@ -33,6 +33,7 @@
 #include <windows.h>
 //#include <mmsystem.h>
 #include <vfw.h>
+#include <ctype.h>
 
 #include "grabber.h"
 #include "device-input.h"



More information about the Sumover-dev mailing list