[xiph-commits] r8593 - trunk/oggdsf/src/lib/helper/libOOOggChef

ozone at motherfish-iii.xiph.org ozone at motherfish-iii.xiph.org
Mon Jan 3 09:06:28 PST 2005


Author: ozone
Date: 2005-01-03 09:06:28 -0800 (Mon, 03 Jan 2005)
New Revision: 8593

Modified:
   trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.cpp
   trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.h
Log:
oggdsf:
 * Remove some unnecessary member variables in AnnodexRecomposer


Modified: trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.cpp
===================================================================
--- trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.cpp	2005-01-03 17:03:19 UTC (rev 8592)
+++ trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.cpp	2005-01-03 17:06:28 UTC (rev 8593)
@@ -22,7 +22,6 @@
 	:	mFilename(inFilename)
 	,	mDemuxState(SEEN_NOTHING)
 	,	mDemuxParserState(LOOK_FOR_HEADERS)
-	,	mRequestedTime(0)
 	,	mBufferWriter(inBufferWriter)
 	,	mBufferWriterUserData(inBufferWriterUserData)
 {
@@ -46,8 +45,8 @@
 	static const size_t BUFF_SIZE = 8192;
 
 	// Open the file and prepare the OggDataBuffer to receive pages
-	fstream mFile;
-	mFile.open(mFilename.c_str(), ios_base::in | ios_base::binary);
+	fstream locFile;
+	locFile.open(mFilename.c_str(), ios_base::in | ios_base::binary);
 
 	// Build a seek table from the file, so we can find out the end location of
 	// the stream headers, and the byte position of the user's requested start
@@ -87,8 +86,8 @@
 			// projects)
 			unsigned long locBytesToRead =
 				MIN(locStartOfBodyOffset - locBytesRead, BUFF_SIZE);
-			mFile.read(locBuffer, locBytesToRead);
-			unsigned long locBytesReadThisIteration = mFile.gcount();
+			locFile.read(locBuffer, locBytesToRead);
+			unsigned long locBytesReadThisIteration = locFile.gcount();
 			if (locBytesReadThisIteration <= 0) {
 				break;
 			}
@@ -103,13 +102,13 @@
 		locSeekTable->getStartPos(locRequestedStartTime).second;
 
 	// Re-open the file, to avoid any fallout from reading the headers
-	mFile.clear();
-	mFile.seekg(locRequestedStartTimeOffset);
+	locFile.clear();
+	locFile.seekg(locRequestedStartTimeOffset);
 
 #ifdef DEBUG
 	mDebugFile << "locRequestedStartTime: " << locRequestedStartTime << endl;
 	mDebugFile << "locRequestedStartTimeOffset: " << locRequestedStartTimeOffset << endl;
-	mDebugFile << "Current position: " << mFile.tellg() << endl;
+	mDebugFile << "Current position: " << locFile.tellg() << endl;
 #endif
 
 	mDemuxParserState = LOOK_FOR_BODY;
@@ -120,8 +119,8 @@
 		char *locBuffer = new char[BUFF_SIZE];
 		for (;;)
 		{
-			mFile.read(locBuffer, BUFF_SIZE);
-			unsigned long locBytesReadThisIteration = mFile.gcount();
+			locFile.read(locBuffer, BUFF_SIZE);
+			unsigned long locBytesReadThisIteration = locFile.gcount();
 			if (locBytesReadThisIteration <= 0) {
 				break;
 			}
@@ -130,7 +129,7 @@
 	}
 
 	// Tidy up
-	mFile.close();
+	locFile.close();
 
 #ifdef DEBUG
 	mDebugFile << "----------------" << endl;

Modified: trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.h
===================================================================
--- trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.h	2005-01-03 17:03:19 UTC (rev 8592)
+++ trunk/oggdsf/src/lib/helper/libOOOggChef/AnnodexRecomposer.h	2005-01-03 17:06:28 UTC (rev 8593)
@@ -51,12 +51,9 @@
 	fstream mDebugFile;
 
 	string mFilename;
-	fstream mFile;
 
 	unsigned long mAnnodexSerialNumber;
 
-	LOOG_INT64 mRequestedTime;  // Deprecate
-
 	eDemuxState mDemuxState;
 	eDemuxParserState mDemuxParserState;
 



More information about the commits mailing list