[xiph-commits] r8755 - in trunk/oggdsf/src:
lib/helper/libTemporalURI tests/testOOOggChef tools/CMMLDump
ozone at motherfish-iii.xiph.org
ozone at motherfish-iii.xiph.org
Fri Jan 14 01:03:15 PST 2005
Author: ozone
Date: 2005-01-14 01:03:14 -0800 (Fri, 14 Jan 2005)
New Revision: 8755
Modified:
trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.cpp
trunk/oggdsf/src/lib/helper/libTemporalURI/libTemporalURI.h
trunk/oggdsf/src/lib/helper/libTemporalURI/stdafx.h
trunk/oggdsf/src/tests/testOOOggChef/stdafx.h
trunk/oggdsf/src/tests/testOOOggChef/testOOOggChef.cpp
trunk/oggdsf/src/tools/CMMLDump/stdafx.h
Log:
oggdsf:
* Portability fixes
* Fix testOOOggChef so it actually works
Modified: trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.cpp
===================================================================
--- trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.cpp 2005-01-14 09:02:04 UTC (rev 8754)
+++ trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.cpp 2005-01-14 09:03:14 UTC (rev 8755)
@@ -1,4 +1,4 @@
-#include "StdAfx.h"
+#include "stdafx.h"
#include "C_TimeStamp.h"
C_TimeStamp::C_TimeStamp(void)
@@ -294,4 +294,4 @@
}
-}
\ No newline at end of file
+}
Modified: trunk/oggdsf/src/lib/helper/libTemporalURI/libTemporalURI.h
===================================================================
--- trunk/oggdsf/src/lib/helper/libTemporalURI/libTemporalURI.h 2005-01-14 09:02:04 UTC (rev 8754)
+++ trunk/oggdsf/src/lib/helper/libTemporalURI/libTemporalURI.h 2005-01-14 09:03:14 UTC (rev 8755)
@@ -4,8 +4,13 @@
// that uses this DLL. This way any other project whose source files include this file see
// LIBTEMPORALURI_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
-#ifdef LIBTEMPORALURI_EXPORTS
-#define LIBTEMPORALURI_API __declspec(dllexport)
+#ifdef WIN32
+# ifdef LIBTEMPORALURI_EXPORTS
+# define LIBTEMPORALURI_API __declspec(dllexport)
+# else
+# define LIBTEMPORALURI_API __declspec(dllimport)
+# endif
#else
-#define LIBTEMPORALURI_API __declspec(dllimport)
+# define LIBTEMPORALURI_API
#endif
+
Modified: trunk/oggdsf/src/lib/helper/libTemporalURI/stdafx.h
===================================================================
--- trunk/oggdsf/src/lib/helper/libTemporalURI/stdafx.h 2005-01-14 09:02:04 UTC (rev 8754)
+++ trunk/oggdsf/src/lib/helper/libTemporalURI/stdafx.h 2005-01-14 09:03:14 UTC (rev 8755)
@@ -8,6 +8,8 @@
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
-#include <windows.h>
+#ifdef WIN32
+# include <windows.h>
+#endif
// TODO: reference additional headers your program requires here
Modified: trunk/oggdsf/src/tests/testOOOggChef/stdafx.h
===================================================================
--- trunk/oggdsf/src/tests/testOOOggChef/stdafx.h 2005-01-14 09:02:04 UTC (rev 8754)
+++ trunk/oggdsf/src/tests/testOOOggChef/stdafx.h 2005-01-14 09:03:14 UTC (rev 8755)
@@ -7,6 +7,8 @@
#include <iostream>
-#include <tchar.h>
+#ifdef WIN32
+# include <tchar.h>
+#endif
// TODO: reference additional headers your program requires here
Modified: trunk/oggdsf/src/tests/testOOOggChef/testOOOggChef.cpp
===================================================================
--- trunk/oggdsf/src/tests/testOOOggChef/testOOOggChef.cpp 2005-01-14 09:02:04 UTC (rev 8754)
+++ trunk/oggdsf/src/tests/testOOOggChef/testOOOggChef.cpp 2005-01-14 09:03:14 UTC (rev 8755)
@@ -10,7 +10,11 @@
#include <libCMMLParse/CMMLParser.h>
#include <libCMMLParse/CMMLTagUtils.h>
+#ifdef WIN32
int __cdecl _tmain(int argc, _TCHAR* argv[])
+#else /* assume POSIX */
+int main(int argc, char* argv[])
+#endif
{
C_CMMLDoc *locCMMLDoc = new C_CMMLDoc;
@@ -27,11 +31,13 @@
C_TimeStamp locTimeStamp;
string locTimeString = argv[2];
- LOOG_INT64 locTime = locTimeStamp.parseTimeStamp(locTimeString);
+ if (!locTimeStamp.parseTimeStamp(locTimeString)) {
+ cerr << "Couldn't convert time stamp to DirectSeconds" << endl;
+ return 2;
+ }
+ LOOG_INT64 locTime = locTimeStamp.toHunNanos();
cout << "Time in DirectSeconds: " << locTime << endl;
- locTime = 150000000;
-
// Reconstruct the CMML document from the given time offset
// n.b. No error checking done to see whether the <cmml> and <clip> tags exist, so
Modified: trunk/oggdsf/src/tools/CMMLDump/stdafx.h
===================================================================
--- trunk/oggdsf/src/tools/CMMLDump/stdafx.h 2005-01-14 09:02:04 UTC (rev 8754)
+++ trunk/oggdsf/src/tools/CMMLDump/stdafx.h 2005-01-14 09:03:14 UTC (rev 8755)
@@ -7,6 +7,8 @@
#include <iostream>
-#include <tchar.h>
+#ifdef WIN32
+# include <tchar.h>
+#endif
// TODO: reference additional headers your program requires here
More information about the commits
mailing list