[xiph-commits] r8296 - in trunk/oggdsf: build sln/oggdsf_all src/lib/core/ogg/libOOOgg src/lib/core/ogg/libVorbisCommentDotNET src/tests src/tests/testLibOOOgg src/tests/testMuxDemux src/tests/testOOOggMux src/tests/testliboggzSpeed1 src/tools/iTranscode src/tools/oggChainSplitter

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Sun Nov 28 18:22:46 PST 2004


Author: illiminable
Date: 2004-11-28 18:22:45 -0800 (Sun, 28 Nov 2004)
New Revision: 8296

Added:
   trunk/oggdsf/build/NSIS/
   trunk/oggdsf/src/tests/testLibOOOgg/
   trunk/oggdsf/src/tests/testLibOOOgg/ReadMe.txt
   trunk/oggdsf/src/tests/testLibOOOgg/stdafx.cpp
   trunk/oggdsf/src/tests/testLibOOOgg/stdafx.h
   trunk/oggdsf/src/tests/testLibOOOgg/testLibOOOgg.cpp
   trunk/oggdsf/src/tests/testLibOOOgg/testLibOOOgg.vcproj
Modified:
   trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
   trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.cpp
   trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPage.h
   trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageHeader.cpp
   trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageHeader.h
   trunk/oggdsf/src/lib/core/ogg/libVorbisCommentDotNET/libVorbisCommentDotNET.vcproj
   trunk/oggdsf/src/tests/testMuxDemux/testMuxDemux.vcproj
   trunk/oggdsf/src/tests/testOOOggMux/testOOOggMux.vcproj
   trunk/oggdsf/src/tests/testliboggzSpeed1/testliboggzSpeed1.vcproj
   trunk/oggdsf/src/tools/iTranscode/iTranscode.vcproj
   trunk/oggdsf/src/tools/oggChainSplitter/oggChainSplitter.vcproj
Log:
* Comments and tidy up in libOOOgg.
* Added skeleton for tests.

Modified: trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
===================================================================
--- trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln	2004-11-28 17:54:01 UTC (rev 8295)
+++ trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln	2004-11-29 02:22:45 UTC (rev 8296)
@@ -1218,6 +1218,10 @@
 	ProjectSection(ProjectDependencies) = postProject
 	EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testLibOOOgg", "..\..\src\tests\testLibOOOgg\testLibOOOgg.vcproj", "{6B993E86-7283-4324-B4C4-F047930FB5FF}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfiguration) = preSolution
 		Debug = Debug
@@ -2449,6 +2453,22 @@
 		{EA7091BB-9906-41DF-9738-F4858A136086}.Release_SSE.Build.0 = Release|Win32
 		{EA7091BB-9906-41DF-9738-F4858A136086}.Release_SSE2.ActiveCfg = Release|Win32
 		{EA7091BB-9906-41DF-9738-F4858A136086}.Release_SSE2.Build.0 = Release|Win32
+		{6B993E86-7283-4324-B4C4-F047930FB5FF}.Debug.ActiveCfg = Debug|Win32
+		{6B993E86-7283-4324-B4C4-F047930FB5FF}.Debug.Build.0 = Debug|Win32
+		{6B993E86-7283-4324-B4C4-F047930FB5FF}.Debug Unicode.ActiveCfg = Debug|Win32
+		{6B993E86-7283-4324-B4C4-F047930FB5FF}.Debug Unicode.Build.0 = Debug|Win32
+		{6B993E86-7283-4324-B4C4-F047930FB5FF}.MakeFile.ActiveCfg = Release|Win32
+		{6B993E86-7283-4324-B4C4-F047930FB5FF}.MakeFile.Build.0 = Release|Win32
+		{6B993E86-7283-4324-B4C4-F047930FB5FF}.Release.ActiveCfg = Release|Win32
+		{6B993E86-7283-4324-B4C4-F047930FB5FF}.Release.Build.0 = Release|Win32
+		{6B993E86-7283-4324-B4C4-F047930FB5FF}.Release Unicode.ActiveCfg = Release|Win32
+		{6B993E86-7283-4324-B4C4-F047930FB5FF}.Release Unicode.Build.0 = Release|Win32
+		{6B993E86-7283-4324-B4C4-F047930FB5FF}.Release_NoDotNET.ActiveCfg = Release|Win32
+		{6B993E86-7283-4324-B4C4-F047930FB5FF}.Release_NoDotNET.Build.0 = Release|Win32
+		{6B993E86-7283-4324-B4C4-F047930FB5FF}.Release_SSE.ActiveCfg = Release|Win32
+		{6B993E86-7283-4324-B4C4-F047930FB5FF}.Release_SSE.Build.0 = Release|Win32
+		{6B993E86-7283-4324-B4C4-F047930FB5FF}.Release_SSE2.ActiveCfg = Release|Win32
+		{6B993E86-7283-4324-B4C4-F047930FB5FF}.Release_SSE2.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionItems) = postSolution
 	EndGlobalSection

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.cpp	2004-11-28 17:54:01 UTC (rev 8295)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.cpp	2004-11-29 02:22:45 UTC (rev 8296)
@@ -34,40 +34,42 @@
 
 
 //LEAK CHECKED - 2004/10/17		-	OK.
+//LEAK FOUND - 2004/11/29  -  acceptOggPage
 OggDataBuffer::OggDataBuffer(void)
 	:	mBuffer(NULL)
 	,	mPrevGranPos(0)
+	,	mPendingPage(NULL)
+	,	mState(AWAITING_BASE_HEADER)
+	,	mNumBytesNeeded(OggPageHeader::OGG_BASE_HEADER_SIZE)
 {
 	mBuffer = new CircularBuffer(MAX_OGG_PAGE_SIZE);			//Deleted in destructor
-
 	//debugLog.open("G:\\logs\\OggDataBuffer.log", ios_base::out);
-	pendingPage = NULL;
-	mState = AWAITING_BASE_HEADER;
-	mNumBytesNeeded = OggPageHeader::OGG_BASE_HEADER_SIZE;
 }
 
 //Debug only
-OggDataBuffer::OggDataBuffer(bool x)
-	:	mBuffer(NULL)
-	,	mPrevGranPos(0)
-{
-	mBuffer = new CircularBuffer(MAX_OGG_PAGE_SIZE);			//Deleted in destructor
-
-	//debugLog.open("G:\\logs\\OggDataBufferSeek.log", ios_base::out);
-	pendingPage = NULL;
-	mState = AWAITING_BASE_HEADER;
-	mNumBytesNeeded = OggPageHeader::OGG_BASE_HEADER_SIZE;
-}
+//OggDataBuffer::OggDataBuffer(bool x)
+//	:	mBuffer(NULL)
+//	,	mPrevGranPos(0)
+//{
+//	mBuffer = new CircularBuffer(MAX_OGG_PAGE_SIZE);			//Deleted in destructor
 //
+//	//debugLog.open("G:\\logs\\OggDataBufferSeek.log", ios_base::out);
+//	pendingPage = NULL;
+//	mState = AWAITING_BASE_HEADER;
+//	mNumBytesNeeded = OggPageHeader::OGG_BASE_HEADER_SIZE;
+//}
+//
 
 OggDataBuffer::~OggDataBuffer(void)
 {
 	delete mBuffer;
+	delete pendingPage;
 	//debugLog.close();
-	delete pendingPage;
+	
 }
 
 bool OggDataBuffer::registerStaticCallback(fPageCallback inPageCallback) {
+	//Holds the static callback and nulls the virtual one.
 	mStaticCallback = inPageCallback;
 	mVirtualCallback = NULL;
 	
@@ -83,8 +85,10 @@
 //}
 
 bool OggDataBuffer::registerVirtualCallback(IOggCallback* inPageCallback) {
+	//Holds the virtual callback and nulls the static one.
 	mVirtualCallback = inPageCallback;
 	mStaticCallback = NULL;
+
 	return true;
 	
 }
@@ -92,9 +96,9 @@
 
 unsigned long OggDataBuffer::numBytesAvail() {
 	//Returns how many bytes are available in the buffer
+	unsigned long locBytesAvail = mBuffer->numBytesAvail();	
 
-	unsigned long locBytesAvail = mBuffer->numBytesAvail();				//mStream.tellp() - mStream.tellg();
-	////debugLog<<"Bytes avail = "<<locBytesAvail<<endl;
+	//debugLog<<"Bytes avail = "<<locBytesAvail<<endl;
 	return locBytesAvail;
 }
 
@@ -105,11 +109,10 @@
 //This function accepts the responsibility for the incoming page.
 OggDataBuffer::eDispatchResult OggDataBuffer::dispatch(OggPage* inOggPage) {
 	//TODO::: Who owns this pointer inOggPage ?
+
 	//debugLog<<"Dispatching page..."<<endl<<endl;
 
-
 	//Fire off the oggpage to whoever is registered to get it
-
 	if (mVirtualCallback != NULL) {
 		if (mVirtualCallback->acceptOggPage(inOggPage) == true) {		//Page given away, never used again.
 			return DISPATCH_OK;
@@ -137,33 +140,37 @@
 			//Buffer is not null and there is at least 1 byte of data.
 			
 			//debugLog<<"Fed "<<inNumBytes<<" bytes..."<<endl;
-		
 			unsigned long locNumWritten = mBuffer->write(inData, inNumBytes);
 
 			if (locNumWritten < inNumBytes) {
+				//TODO::: What does happen in this case.
+
 				//Handle this case... you lose data.
 				//Buffer is full
+				
 				//debugLog<<"Feed : Could count feed in " <<inNumBytes<<" bytes"<<endl
 				//		<<"Feed : ** "<<mBuffer->numBytesAvail()<<" avail, "<<mBuffer->spaceLeft()<<" space left."<<endl;
+
 				locNumWritten = locNumWritten;
 			}
-
 			return (eFeedResult)processBuffer();
-			
 		} else {
-			//Numbytes not equal to zero but inData point is NULL
+			//Numbytes not equal to zero but inData pointer is NULL
+
 			//debugLog<<"Feed : Fed NULL Pointer"<<endl;
 			return FEED_NULL_POINTER;
 		}
 	} else {
 		//numbytes was zero... we do nothing and it's not an error.
+		
 		//debugLog<<"Feed : Fed *zero* bytes... Not an error, do nothing, return ok."<<endl;
 		return FEED_OK;
 	}
 		
 	
 }
-OggDataBuffer::eProcessResult OggDataBuffer::processBaseHeader() {
+OggDataBuffer::eProcessResult OggDataBuffer::processBaseHeader() 
+{
 		//debugLog<<"Processing base header..."<<endl;
 		
 		//Delete the previous page
@@ -181,6 +188,8 @@
 		unsigned long locNumRead = mBuffer->read(locBuff, OggPageHeader::OGG_BASE_HEADER_SIZE);
 		
 		if (locNumRead < OggPageHeader::OGG_BASE_HEADER_SIZE) {
+			//TODO::: Handle this case... we read less than we expected.
+
 			//debugLog<<"ProcessBaseHeader : ###### Read was short."<<endl;
 			//debugLog<<"ProcessBaseHeader : ** "<<mBuffer->numBytesAvail()<<" avail, "<<mBuffer->spaceLeft()<<" space left."<<endl;
 			locNumRead = locNumRead;
@@ -203,8 +212,13 @@
 		//debugLog<<"Bytes needed for seg table = "<<mNumBytesNeeded<<endl;	
 		return PROCESS_OK;
 }
-OggDataBuffer::eProcessResult OggDataBuffer::processSegTable() {
-
+OggDataBuffer::eProcessResult OggDataBuffer::processSegTable() 
+{
+	///
+	//	Gets the number segments from from the page header, reads in that much data,
+	//	 
+	//	
+	//
 	//Assumes a valid pending page, with numPagesegments set in the header already.
 	//creates a chunk of memory size numpagesegments and stores it,.
 
@@ -223,27 +237,25 @@
 	////debugLog<<"ProcessSegTable : Reading from buffer..."<<endl;
 
 	//Read the segment table from the buffer to locBuff
-	//mStream.read((char*)locBuff, (std::streamsize)locNumSegs);
 	unsigned long locNumRead = mBuffer->read(locBuff, (unsigned long)locNumSegs);
 	
 	if (locNumRead < locNumSegs) {
+		//TODO::: Handle this case
+
 		//debugLog<<"ProcessSegTable : ##### Short read"<<endl;
 		//debugLog<<"ProcessSegTable : ** "<<mBuffer->numBytesAvail()<<" avail, "<<mBuffer->spaceLeft()<<" space left."<<endl;
-		locNumRead = locNumRead;
+		
 	}
 
 
 	//Make a new segment table from the bufferd data.
 	pendingPage->header()->setSegmentTable(locBuff);			//This function accepts responsibility for the pointer.
 	locBuff = NULL;
-
 	
 	//Set the number of bytes we want for next time - which is the size of the page data.
-	
 	mNumBytesNeeded = pendingPage->header()->calculateDataSize();
 
 	//debugLog<<"Num bytes needed for data = "<< mNumBytesNeeded<<endl;
-
 	//debugLog<<"Transition to AWAITING_DATA"<<endl;
 	
 	mState = AWAITING_DATA;
@@ -251,17 +263,15 @@
 
 }
 
-OggDataBuffer::eProcessResult OggDataBuffer::processDataSegment() {
-	
-	//debugLog<<"Processing Data Segment..."<<endl;
-	//Make a local buffer
-	
+OggDataBuffer::eProcessResult OggDataBuffer::processDataSegment() 
+{
 	unsigned long locPageDataSize = pendingPage->header()->dataSize();
 	
 	//debugLog<<"ProcessDataSegment : Page data size = "<<locPageDataSize<<endl;
 	unsigned char* locBuff = NULL;
 	//unsigned long locPacketOffset = 0;
 
+	//TODO::: Should this be const ?
 	//THis is a raw pointer into the segment table, don't delete it.
 	unsigned char* locSegTable = pendingPage->header()->SegmentTable();			//View only don't delete.
 	unsigned int locNumSegs = pendingPage->header()->NumPageSegments();
@@ -270,10 +280,9 @@
 
 
 	unsigned long locCurrPackSize = 0;
-	
-
 	bool locIsFirstPacket = true;
 	__int64 locPrevGranPos = 0;
+
 	for (unsigned long i = 0; i < locNumSegs; i++) {
 		//Packet sums the lacing values of the segment table.
 		locCurrPackSize += locSegTable[i];
@@ -292,6 +301,7 @@
 
 			Lacing values for a Packet never end with 255... if multiple of 255 have a next 0 lacing value.
 		*/
+		
 		if ( (locSegTable[i] != 255) || (locNumSegs - 1 == i) ) {
 			//If its the last lacing value or the the lacing value is not 255 (ie packet boundry)
 			
@@ -300,10 +310,12 @@
 
 			//STREAM ACCESS:::
 			//Read data from the stream into the local buffer.
-			//mStream.read((char*)(locBuff), locCurrPackSize);
+			
 			unsigned long locNumRead = mBuffer->read(locBuff, locCurrPackSize);
 			
 			if (locNumRead < locCurrPackSize) {
+				//TODO::: Handle this case.
+
 				//debugLog<<"ProcessDataSegment : ###### Short read"<<endl;
 				//debugLog<<"ProcessDataSegment : ** "<<mBuffer->numBytesAvail()<<" avail, "<<mBuffer->spaceLeft()<<" space left."<<endl;
 				locNumRead = locNumRead;
@@ -317,11 +329,14 @@
 			bool locIsContinuation = false;
 			
 			if (locIsFirstPacket) {
+				locIsFirstPacket = false;
+
+				//Remember what the granule pos was and get it from the new page.
 				locPrevGranPos = mPrevGranPos;
 				mPrevGranPos = pendingPage->header()->GranulePos();
-				locIsFirstPacket = false;
+				
 				//First packet, check if the continuation flag is set.
-				if ((pendingPage->header()->HeaderFlags() & 1) == 1) {
+				if ((pendingPage->header()->HeaderFlags() & OggPageHeader::eHeadFlags::CONTINUATION) == OggPageHeader::eHeadFlags::CONTINUATION) {
 					//Continuation flag is set.
 					locIsContinuation = true;
 				}
@@ -431,10 +446,13 @@
 				}	
 				break;
 			case eState::LOST_PAGE_SYNC:
+				//TODO::: Insert resync code here.
+
 				//debugLog<<"ProcessBuffer : State = LOST_PAGE_SYNC"<<endl;
 				return PROCESS_LOST_SYNC;
 			default:
-				//Do sometyhing ??
+				//TODO::: What are we supposed to do with this. Anything need cleaning up ?
+				
 				//debugLog<<"ProcessBuffer : Ogg Buffer Error"<<endl;
 				return PROCESS_UNKNOWN_INTERNAL_ERROR;
 				break;

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPage.h
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPage.h	2004-11-28 17:54:01 UTC (rev 8295)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPage.h	2004-11-29 02:22:45 UTC (rev 8296)
@@ -47,46 +47,37 @@
 public:
 	//Constants
 	static const unsigned long HEX_DUMP_LINE_LENGTH = 16;
-	//
 	
 	//Constructors
 	OggPage(void);
 	virtual ~OggPage(void);
-	//
 
 	//Cloning
 	OggPage* clone();
-	//
 	
 	//Size functions
 	unsigned long pageSize();
 	unsigned long headerSize();
 	unsigned long dataSize();
-	//
 
 	//IOggPackSource Implementation
 	virtual OggPacket* getPacket(unsigned long inPacketNo);
 	virtual unsigned long numPackets();
-	//
 
 	//Packet access
 	StampedOggPacket* getStampedPacket(unsigned long inPacketNo);
 	bool addPacket(StampedOggPacket* inPacket);
-	//
 	
 	//Header access
 	OggPageHeader* header();
-	//
 	
 	//Serialise
 	unsigned char* createRawPageData();
-	//
 
 protected:
 	//Member data of packets and header.
 	vector<StampedOggPacket*> mPacketList;
 	OggPageHeader* mHeader;
-	//
 
 private:
 	OggPage& operator=(const OggPage& other);  /* Don't assign me */

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageHeader.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageHeader.cpp	2004-11-28 17:54:01 UTC (rev 8295)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageHeader.cpp	2004-11-29 02:22:45 UTC (rev 8296)
@@ -103,42 +103,53 @@
 
 	//Check if the page has the correct capture pattern
 	if (strncmp((const char*)inBaseHeader, "OggS", OGG_CAPTURE_PATTERN_SIZE) == 0) {
+		mStructureVersion = inBaseHeader[STRUCTURE_VERSION];
+		mHeaderFlags = inBaseHeader[HEADER_FLAGS];
+		mGranulePos = iLE_Math::CharArrToInt64(inBaseHeader + GRANULE_POS);
+		mStreamSerialNo = iLE_Math::charArrToULong(inBaseHeader + SERIAL_NO);
+		mCRCCheckSum = iLE_Math::charArrToULong(inBaseHeader + OGG_CHECKSUM);
+		mNumPageSegments = inBaseHeader[NUM_SEGMENTS];
+		mHeaderSize = OGG_BASE_HEADER_SIZE + mNumPageSegments;
 		
-		locOffset += OGG_CAPTURE_PATTERN_SIZE;
+		mPageSize = mHeaderSize + mDataSize;
+		mPageState = BASE_HEAD_SET;
+		return true;
 
-		//Assign the structure version
-		setStructureVersion(inBaseHeader[locOffset]);
-		locOffset++;
+	}
 
-		//Assign the header flags
-		setHeaderFlags(inBaseHeader[locOffset]);
-		locOffset++;
+		////Assign the structure version
+		//setStructureVersion(inBaseHeader[locOffset]);
+		//locOffset++;
 
-		//Assign the granule pos	
-		setGranulePos((const unsigned char*)(inBaseHeader + locOffset));
-		locOffset += 8;
+		////Assign the header flags
+		//setHeaderFlags(inBaseHeader[locOffset]);
+		//locOffset++;
 
-		//Assign Serial No
-		setStreamSerialNo((const unsigned char*)(inBaseHeader + locOffset));
-		locOffset += 4;
+		////Assign the granule pos	
+		//setGranulePos((const unsigned char*)(inBaseHeader + locOffset));
+		//locOffset += 8;
 
-		//Assign Page Seq No	
-		setPageSequenceNo(inBaseHeader + locOffset);
-		locOffset += 4;
+		////Assign Serial No
+		//setStreamSerialNo((const unsigned char*)(inBaseHeader + locOffset));
+		//locOffset += 4;
 
-		//Assign CheckSum
-		setCRCChecksum(inBaseHeader + locOffset);
-		locOffset += 4;
+		////Assign Page Seq No	
+		//setPageSequenceNo(inBaseHeader + locOffset);
+		//locOffset += 4;
 
-		//Assign Num Page Segments
-		setNumPageSegments(inBaseHeader[locOffset]);
-		locOffset++;
+		////Assign CheckSum
+		//setCRCChecksum(inBaseHeader + locOffset);
+		//locOffset += 4;
 
-		//Set the size of the header
-		setHeaderSize(OGG_BASE_HEADER_SIZE + mNumPageSegments);
+		////Assign Num Page Segments
+		//setNumPageSegments(inBaseHeader[locOffset]);
+		//locOffset++;
 
-		mPageState = BASE_HEAD_SET;
+		////Set the size of the header
+		//setHeaderSize(OGG_BASE_HEADER_SIZE + mNumPageSegments);
 
+		//mPageState = BASE_HEAD_SET;
+
 				
 		return true;
 	} else {
@@ -148,7 +159,8 @@
 }
 
 
-void OggPageHeader::setPageState(ePageState inPageState) {
+void OggPageHeader::setPageState(ePageState inPageState) 
+{
 	mPageState = inPageState;
 }
 unsigned char OggPageHeader::StructureVersion() 
@@ -231,7 +243,6 @@
 }
 void OggPageHeader::setCRCChecksum(const unsigned char* inPtr)
 {
-	
 	mCRCChecksum = iLE_Math::charArrToULong(inPtr);;
 }
 
@@ -241,8 +252,11 @@
 		mNumPageSegments = inVal;
 	}
 }
-//Copies the data from the pointer it is given.
-void OggPageHeader::setSegmentTable(const unsigned char* inPtr, unsigned char inNumSegs) {
+///
+//	Copies the data from the pointer it is given.
+//	
+void OggPageHeader::setSegmentTable(const unsigned char* inPtr, unsigned char inNumSegs) 
+{
 	unsigned char* locSegTable = new unsigned char[inNumSegs];		//This is stored in the member variable and deleted in the destructor.
 	memcpy((void*)locSegTable, (const void*)inPtr, inNumSegs);
 	delete[] mSegmentTable;
@@ -273,7 +287,7 @@
 }
 bool OggPageHeader::rawData(unsigned char* outData, unsigned long inBuffSize) {
 	
-	//0-3			CapPattern						"Oggs"
+	//0-3			CapPattern						"OggS"
 	//4				Struct Ver
 	//5				Head Flags
 	//6-13			Granule Pos
@@ -282,8 +296,9 @@
 	//22-25			CheckSum
 	//26			Num Segments
 	//27...			SegmentTable
+	//
+
 	if (mHeaderSize > inBuffSize) {
-		//EXIT POINT
 		return false;
 	}
 	outData[0] = 'O';
@@ -335,7 +350,7 @@
 }
 
 
-
+//This could be unsigned short.
 void OggPageHeader::setHeaderSize(unsigned long inVal)
 {
 	mHeaderSize = inVal;

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageHeader.h
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageHeader.h	2004-11-28 17:54:01 UTC (rev 8295)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageHeader.h	2004-11-29 02:22:45 UTC (rev 8296)
@@ -75,7 +75,20 @@
 		BOS = 2,
 		EOS = 4
 	};
+
 	
+	enum eFieldOffsets {
+		CAPTURE_PATTURN = 0,
+		STRUCTURE_VERSION = 4,
+		HEADER_FLAGS = 5,
+		GRANULE_POS = 6,
+		SERIAL_NO = 14,
+		SEQUENCE_NO = 18,
+		OGG_CHECKSUM = 22,
+		NUM_SEGMENTS = 26,
+		SEGMENT_TABLE = 27
+	};
+	
 
 	bool rawData(unsigned char* outData, unsigned long inBuffSize);
 	

Modified: trunk/oggdsf/src/lib/core/ogg/libVorbisCommentDotNET/libVorbisCommentDotNET.vcproj
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libVorbisCommentDotNET/libVorbisCommentDotNET.vcproj	2004-11-28 17:54:01 UTC (rev 8295)
+++ trunk/oggdsf/src/lib/core/ogg/libVorbisCommentDotNET/libVorbisCommentDotNET.vcproj	2004-11-29 02:22:45 UTC (rev 8296)
@@ -85,7 +85,7 @@
 				AdditionalUsingDirectories="..\..\..\helper\libiWrapper\Release"
 				PreprocessorDefinitions="WIN32;NDEBUG"
 				MinimalRebuild="FALSE"
-				RuntimeLibrary="0"
+				RuntimeLibrary="2"
 				UsePrecompiledHeader="3"
 				WarningLevel="3"
 				DebugInformationFormat="3"

Added: trunk/oggdsf/src/tests/testLibOOOgg/ReadMe.txt
===================================================================
--- trunk/oggdsf/src/tests/testLibOOOgg/ReadMe.txt	2004-11-28 17:54:01 UTC (rev 8295)
+++ trunk/oggdsf/src/tests/testLibOOOgg/ReadMe.txt	2004-11-29 02:22:45 UTC (rev 8296)
@@ -0,0 +1,32 @@
+========================================================================
+    CONSOLE APPLICATION : testLibOOOgg Project Overview
+========================================================================
+
+AppWizard has created this testLibOOOgg application for you.  
+This file contains a summary of what you will find in each of the files that
+make up your testLibOOOgg application.
+
+
+testLibOOOgg.vcproj
+    This is the main project file for VC++ projects generated using an Application Wizard. 
+    It contains information about the version of Visual C++ that generated the file, and 
+    information about the platforms, configurations, and project features selected with the
+    Application Wizard.
+
+testLibOOOgg.cpp
+    This is the main application source file.
+
+/////////////////////////////////////////////////////////////////////////////
+Other standard files:
+
+StdAfx.h, StdAfx.cpp
+    These files are used to build a precompiled header (PCH) file
+    named testLibOOOgg.pch and a precompiled types file named StdAfx.obj.
+
+/////////////////////////////////////////////////////////////////////////////
+Other notes:
+
+AppWizard uses "TODO:" comments to indicate parts of the source code you
+should add to or customize.
+
+/////////////////////////////////////////////////////////////////////////////

Added: trunk/oggdsf/src/tests/testLibOOOgg/stdafx.cpp
===================================================================
--- trunk/oggdsf/src/tests/testLibOOOgg/stdafx.cpp	2004-11-28 17:54:01 UTC (rev 8295)
+++ trunk/oggdsf/src/tests/testLibOOOgg/stdafx.cpp	2004-11-29 02:22:45 UTC (rev 8296)
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+// testLibOOOgg.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file

Added: trunk/oggdsf/src/tests/testLibOOOgg/stdafx.h
===================================================================
--- trunk/oggdsf/src/tests/testLibOOOgg/stdafx.h	2004-11-28 17:54:01 UTC (rev 8295)
+++ trunk/oggdsf/src/tests/testLibOOOgg/stdafx.h	2004-11-29 02:22:45 UTC (rev 8296)
@@ -0,0 +1,12 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#pragma once
+
+
+#include <iostream>
+#include <tchar.h>
+
+// TODO: reference additional headers your program requires here

Added: trunk/oggdsf/src/tests/testLibOOOgg/testLibOOOgg.cpp
===================================================================
--- trunk/oggdsf/src/tests/testLibOOOgg/testLibOOOgg.cpp	2004-11-28 17:54:01 UTC (rev 8295)
+++ trunk/oggdsf/src/tests/testLibOOOgg/testLibOOOgg.cpp	2004-11-29 02:22:45 UTC (rev 8296)
@@ -0,0 +1,15 @@
+// testLibOOOgg.cpp : Defines the entry point for the console application.
+//
+
+#include "stdafx.h"
+#include "libOOOgg.h"
+
+#include <iostream>
+using namespace std;
+
+int _tmain(int argc, _TCHAR* argv[])
+{
+	
+	return 0;
+}
+

Added: trunk/oggdsf/src/tests/testLibOOOgg/testLibOOOgg.vcproj
===================================================================
--- trunk/oggdsf/src/tests/testLibOOOgg/testLibOOOgg.vcproj	2004-11-28 17:54:01 UTC (rev 8295)
+++ trunk/oggdsf/src/tests/testLibOOOgg/testLibOOOgg.vcproj	2004-11-29 02:22:45 UTC (rev 8296)
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="testLibOOOgg"
+	ProjectGUID="{6B993E86-7283-4324-B4C4-F047930FB5FF}"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="Debug"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="5"
+				UsePrecompiledHeader="3"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="4"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/testLibOOOgg.exe"
+				LinkIncremental="2"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/testLibOOOgg.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="Release"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="4"
+				UsePrecompiledHeader="3"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/testLibOOOgg.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\stdafx.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\testLibOOOgg.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+			<File
+				RelativePath=".\stdafx.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+		<File
+			RelativePath=".\ReadMe.txt">
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

Modified: trunk/oggdsf/src/tests/testMuxDemux/testMuxDemux.vcproj
===================================================================
--- trunk/oggdsf/src/tests/testMuxDemux/testMuxDemux.vcproj	2004-11-28 17:54:01 UTC (rev 8295)
+++ trunk/oggdsf/src/tests/testMuxDemux/testMuxDemux.vcproj	2004-11-29 02:22:45 UTC (rev 8296)
@@ -70,7 +70,7 @@
 				Name="VCCLCompilerTool"
 				AdditionalIncludeDirectories="..\..\lib\core\ogg\libOOOgg;..\..\lib\helper\libilliCore"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="3"
+				RuntimeLibrary="2"
 				UsePrecompiledHeader="3"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="TRUE"

Modified: trunk/oggdsf/src/tests/testOOOggMux/testOOOggMux.vcproj
===================================================================
--- trunk/oggdsf/src/tests/testOOOggMux/testOOOggMux.vcproj	2004-11-28 17:54:01 UTC (rev 8295)
+++ trunk/oggdsf/src/tests/testOOOggMux/testOOOggMux.vcproj	2004-11-29 02:22:45 UTC (rev 8296)
@@ -67,7 +67,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="4"
+				RuntimeLibrary="2"
 				UsePrecompiledHeader="3"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="TRUE"

Modified: trunk/oggdsf/src/tests/testliboggzSpeed1/testliboggzSpeed1.vcproj
===================================================================
--- trunk/oggdsf/src/tests/testliboggzSpeed1/testliboggzSpeed1.vcproj	2004-11-28 17:54:01 UTC (rev 8295)
+++ trunk/oggdsf/src/tests/testliboggzSpeed1/testliboggzSpeed1.vcproj	2004-11-29 02:22:45 UTC (rev 8296)
@@ -67,7 +67,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="4"
+				RuntimeLibrary="2"
 				UsePrecompiledHeader="3"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="TRUE"

Modified: trunk/oggdsf/src/tools/iTranscode/iTranscode.vcproj
===================================================================
--- trunk/oggdsf/src/tools/iTranscode/iTranscode.vcproj	2004-11-28 17:54:01 UTC (rev 8295)
+++ trunk/oggdsf/src/tools/iTranscode/iTranscode.vcproj	2004-11-29 02:22:45 UTC (rev 8296)
@@ -67,7 +67,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="4"
+				RuntimeLibrary="2"
 				UsePrecompiledHeader="3"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="TRUE"

Modified: trunk/oggdsf/src/tools/oggChainSplitter/oggChainSplitter.vcproj
===================================================================
--- trunk/oggdsf/src/tools/oggChainSplitter/oggChainSplitter.vcproj	2004-11-28 17:54:01 UTC (rev 8295)
+++ trunk/oggdsf/src/tools/oggChainSplitter/oggChainSplitter.vcproj	2004-11-29 02:22:45 UTC (rev 8296)
@@ -70,7 +70,7 @@
 				Name="VCCLCompilerTool"
 				AdditionalIncludeDirectories="..\..\lib\core\ogg\libOOOgg;..\..\lib\helper\libilliCore;..\..\lib\core\ogg\libVorbisComment"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="4"
+				RuntimeLibrary="2"
 				UsePrecompiledHeader="3"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="TRUE"



More information about the commits mailing list