[Sumover-dev] [svn commit] r3998 - vic/branches/mpeg4

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Wed May 2 22:56:16 BST 2007


Author: piers
Date: Wed May  2 22:55:39 2007
New Revision: 3998

Modified:
   vic/branches/mpeg4/main.cpp

Log:
Imported AG-vic DDRAW code and ag_init code - will change names later


Modified: vic/branches/mpeg4/main.cpp
==============================================================================
--- vic/branches/mpeg4/main.cpp	(original)
+++ vic/branches/mpeg4/main.cpp	Wed May  2 22:55:39 2007
@@ -113,6 +113,14 @@
 #include "global.h"
 #include "md5.h"
 
+#ifdef USE_PROFILING
+#include "profiler.h"
+#endif
+
+#ifdef USE_DDRAW
+#include "vw.h"
+#endif
+
 #if defined(sun) && defined(__svr4__)
 #include <sys/utsname.h>
 #define gethostname(name, len) { \
@@ -311,6 +319,12 @@
 }
 #endif
 
+#ifdef USE_DDRAW
+int use_ddraw = 1;
+#else
+int use_ddraw = 0;
+#endif
+
 extern "C" char *optarg;
 extern "C" int optind;
 
@@ -565,7 +579,11 @@
 #endif
 	EmbeddedTcl::init();
 	tcl.evalc("init_resources");
-	
+#ifdef USE_PROFILING
+	initCounters();
+	startCounter(0);
+#endif
+
 	optind=1;
 	while ((op = getopt(argc, (char**)argv, (char*)options)) != -1) {
 		switch (op) {
@@ -759,6 +777,25 @@
 #endif
 	tcl.evalc("vic_main");
 
+#ifdef USE_DDRAW
+	const char *useDDraw = tcl.attr("use_ddraw");
+	if (useDDraw != NULL)
+	{
+	    if (strcmp(useDDraw, "true") == 0)
+		use_ddraw = 1;
+	    else
+		use_ddraw = 0;
+	}
+	if (use_ddraw)
+	    DDrawVideoImage::initDirectDraw();
+#endif
+
+	/*
+	 * Initialize the stuff that may be dependent on DDraw stuff
+	 * after we initialize direct draw.
+	 */
+	tcl.evalc("init_ag");
+
 	/*
 	 * re-nice the vic process before we start processing video
 	 * so that video processing won't screw up the local audio.



More information about the Sumover-dev mailing list