[xiph-commits] r8701 - in trunk/oggdsf/src/lib: core/ogg/libOOOggSeek helper/libiWrapper helper/libilliCore player/libDSPlayDotNET

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Sun Jan 9 00:40:28 PST 2005


Author: illiminable
Date: 2005-01-09 00:40:27 -0800 (Sun, 09 Jan 2005)
New Revision: 8701

Modified:
   trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.h
   trunk/oggdsf/src/lib/helper/libiWrapper/Wrappers.h
   trunk/oggdsf/src/lib/helper/libilliCore/StringHelper.cpp
   trunk/oggdsf/src/lib/helper/libilliCore/StringHelper.h
   trunk/oggdsf/src/lib/helper/libilliCore/iBE_Math.h
   trunk/oggdsf/src/lib/helper/libilliCore/iLE_Math.h
   trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp
Log:
* Documented illiCore

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.h
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.h	2005-01-09 06:30:22 UTC (rev 8700)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.h	2005-01-09 08:40:27 UTC (rev 8701)
@@ -72,6 +72,7 @@
 	/// The duration of the file, in DirectShow time units.
 	LOOG_INT64 fileDuration();
 
+	/// Returns the size the seek table will be if serialised.
 	unsigned long serialisedSize();
 
 	/// Serialise the seek table into a memory buffer, which may be useful for e.g. caching.

Modified: trunk/oggdsf/src/lib/helper/libiWrapper/Wrappers.h
===================================================================
--- trunk/oggdsf/src/lib/helper/libiWrapper/Wrappers.h	2005-01-09 06:30:22 UTC (rev 8700)
+++ trunk/oggdsf/src/lib/helper/libiWrapper/Wrappers.h	2005-01-09 08:40:27 UTC (rev 8701)
@@ -47,14 +47,24 @@
 		public:
 			Wrappers(void);
 			~Wrappers(void);
+
+			/// Converts a .NET String to a C String. Must call releaseCStr when done.
 			static char* netStrToCStr(String* inNetString);
 			
+			/// To be called when you are done with the CString so it can be deleted internally.
 			static void releaseCStr(char* inCStr);
+
+			/// Converts an ANSI C String to a .NET String.
 			static String* CStrToNetStr(const char* inCStr);
+
+			/// Converts a wide (2 byte) string to a .NET string.
 			static String* WStrToNetStr(const wchar_t* inWStr);
+
+			/// Converts a .NET string to a wide (2 byte) string.  Must call releaseWStr when done.
 			static wchar_t* netStrToWStr(String* inNetString);
+
+			/// To be called when you are done with the C String so it can be internall deleted.
 			static void releaseWStr(wchar_t* inWStr);
-
 	};
 }
 }
\ No newline at end of file

Modified: trunk/oggdsf/src/lib/helper/libilliCore/StringHelper.cpp
===================================================================
--- trunk/oggdsf/src/lib/helper/libilliCore/StringHelper.cpp	2005-01-09 06:30:22 UTC (rev 8700)
+++ trunk/oggdsf/src/lib/helper/libilliCore/StringHelper.cpp	2005-01-09 08:40:27 UTC (rev 8701)
@@ -130,7 +130,7 @@
 
 }
 
-//These should go out to the string helper.
+
 unsigned char StringHelper::digitToHex(unsigned char inDigit) {
 	
 	unsigned char locDigit = (inDigit > 9)		?	(inDigit  - 10) + A_BASE

Modified: trunk/oggdsf/src/lib/helper/libilliCore/StringHelper.h
===================================================================
--- trunk/oggdsf/src/lib/helper/libilliCore/StringHelper.h	2005-01-09 06:30:22 UTC (rev 8700)
+++ trunk/oggdsf/src/lib/helper/libilliCore/StringHelper.h	2005-01-09 08:40:27 UTC (rev 8701)
@@ -45,15 +45,26 @@
 	static const unsigned char A_BASE = 65;			//A in ASCII
 	static const unsigned char ZERO_BASE = 48;
 
+	/// Takes an unsigned char in the range 0-15 and returns a char between '0'-'9' or 'A'-'F'
 	static unsigned char digitToHex(unsigned char inChar);
+
+	/// Takes an unsigned char 0-255 and returns a hex string of length 2.
 	static string charToHexString(unsigned char inChar);
 	
+	/// Takes an unsigned int64 and returns a string representation.
 	static string numToString(LOOG_UINT64 inNum);
+
+	/// Takes a string and returns an unsigned int64
 	static LOOG_UINT64 stringToNum(string inString);
+
+	/// Takes a string and Returns a value between 0 and 9 999 999 to represent a fraction / 10 000 000.
 	static LOOG_UINT64 stringToFractNum(string inString);
+
+	/// Converts a narrow string to a wide (2 byte) string
 	static wstring toWStr(string inString);
+
+	/// Converts a wide (2 byte) string to a narrow string.
 	static string toNarrowStr(wstring inString);
 
-	//static string numToHexString(unsigned __int64 inNum, unsigned char inWidth);
 
 };

Modified: trunk/oggdsf/src/lib/helper/libilliCore/iBE_Math.h
===================================================================
--- trunk/oggdsf/src/lib/helper/libilliCore/iBE_Math.h	2005-01-09 06:30:22 UTC (rev 8700)
+++ trunk/oggdsf/src/lib/helper/libilliCore/iBE_Math.h	2005-01-09 08:40:27 UTC (rev 8701)
@@ -36,8 +36,14 @@
 public:
 	iBE_Math(void);
 	~iBE_Math(void);
+
+	/// Reads 4 bytes (Big Endian) and returns an unsigned long.
 	static unsigned long charArrToULong(unsigned char* inCharArray);
+
+	//// Takes an unsigned long and writes 4 bytes (Big Endian) into the buffer.
 	static void ULongToCharArr(unsigned long inLong, unsigned char* outCharArray);
+
+	/// Reads 2 bytes (Big Endian) and returns an unsigned short.
 	static unsigned short charArrToUShort(unsigned char* inCharArray);
 
 };

Modified: trunk/oggdsf/src/lib/helper/libilliCore/iLE_Math.h
===================================================================
--- trunk/oggdsf/src/lib/helper/libilliCore/iLE_Math.h	2005-01-09 06:30:22 UTC (rev 8700)
+++ trunk/oggdsf/src/lib/helper/libilliCore/iLE_Math.h	2005-01-09 08:40:27 UTC (rev 8701)
@@ -37,11 +37,22 @@
 public:
 	iLE_Math(void);
 	~iLE_Math(void);
+
+	/// Reads 4 bytes (Little Endian) and returns an unsigned long
 	static unsigned long charArrToULong(const unsigned char* inCharArray);
+
+	/// Takes an unsigned long and writes 4 bytes (Little Endian) into the buffer you pass.
 	static void ULongToCharArr(unsigned long inLong, unsigned char* outCharArray);
+
+	/// Takes an unsigned short and writes 2 bytes (Little Endian) into the buffer you pass.
 	static void UShortToCharArr(unsigned short inShort, unsigned char* outCharArray);
 	
+	/// Reads 8 bytes (Little Endian) and returns an int 64.
 	static LOOG_INT64 CharArrToInt64(const unsigned char* inCharArray);
+
+	/// Takes an  int64 and writes 8 bytes (Little Endian) into the buffer you pass.
 	static void Int64ToCharArr(LOOG_INT64 inInt64, unsigned char* outCharArray);
+
+	/// Reads 2 bytes (Little Endian) and returns an unsigned short
 	static unsigned short charArrToUShort(const unsigned char* inCharArray);	
 };

Modified: trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp
===================================================================
--- trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp	2005-01-09 06:30:22 UTC (rev 8700)
+++ trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp	2005-01-09 08:40:27 UTC (rev 8701)
@@ -74,7 +74,8 @@
 	CoInitialize(NULL);
 	mCMMLProxy = new CMMLCallbackProxy;			//Need to delete this !
 	debugLog = new fstream;
-	debugLog->open("G:\\logs\\dsplay.log", ios_base::out);
+	debugLog->open("G:\\logs\\dsplay.log", ios_base::out | ios_base::app);
+	*debugLog<<"Starting new log"<<endl;
 }
 
 DSPlay::DSPlay(IntPtr inWindowHandle, Int32 inLeft, Int32 inTop, Int32 inWidth, Int32 inHeight) 
@@ -100,7 +101,8 @@
 	CoInitialize(NULL);
 	mCMMLProxy = new CMMLCallbackProxy;			//Need to delete this !
 	debugLog = new fstream;
-	debugLog->open("G:\\logs\\dsplay.log", ios_base::out);
+	debugLog->open("G:\\logs\\dsplay.log", ios_base::out | ios_base::app);
+	*debugLog<<"Starting new log"<<endl;
 }
 
 bool DSPlay::checkEvents() {
@@ -153,7 +155,7 @@
 void DSPlay::releaseInterfaces() {
 
 	mVideoRenderType = VR_NONE;
-	*debugLog<<"Releasing interfaces"<<endl;
+	*debugLog<<"********* Releasing interfaces *********"<<endl;
 	ULONG numRef = 0;
 	if (mMediaControl != NULL) {
 		numRef = 
@@ -222,7 +224,7 @@
 	}
 
 
-	*debugLog<<"After graph release>.."<<endl;
+	*debugLog<<"****** After graph release ******"<<endl;
 
 	mIsLoaded = false;
 	//TODO::: Release everything !



More information about the commits mailing list