[xiph-commits] r7367 - in trunk/oggdsf/src: lib/core/ogg/libOOOgg

illiminable at dactyl.lonelymoon.com illiminable
Tue Jul 27 00:34:08 PDT 2004


tests/testCircleBuffer tools/OOOggDump tools/OOOggValidate
Message-ID: <20040727073408.A64F89AAAB at dactyl.lonelymoon.com>

Author: illiminable
Date: Tue Jul 27 00:34:08 2004
New Revision: 7367

Modified:
trunk/oggdsf/src/lib/core/ogg/libOOOgg/libOOOgg.vcproj
trunk/oggdsf/src/tests/testCircleBuffer/testCircleBuffer.vcproj
trunk/oggdsf/src/tools/OOOggDump/OOOggDump.vcproj
trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.cpp
trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.vcproj
trunk/oggdsf/src/tools/OOOggValidate/OggStreamValidationState.h
trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.cpp
Log:
* Synchronise before merging into rest of projects.

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/libOOOgg.vcproj
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/libOOOgg.vcproj	2004-07-27 07:04:52 UTC (rev 7366)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/libOOOgg.vcproj	2004-07-27 07:34:06 UTC (rev 7367)
@@ -78,7 +78,7 @@
OptimizeForProcessor="2"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBOOOGG_EXPORTS"
StringPooling="TRUE"
-				RuntimeLibrary="2"
+				RuntimeLibrary="0"
BufferSecurityCheck="FALSE"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="3"

Modified: trunk/oggdsf/src/tests/testCircleBuffer/testCircleBuffer.vcproj
===================================================================
--- trunk/oggdsf/src/tests/testCircleBuffer/testCircleBuffer.vcproj	2004-07-27 07:04:52 UTC (rev 7366)
+++ trunk/oggdsf/src/tests/testCircleBuffer/testCircleBuffer.vcproj	2004-07-27 07:34:06 UTC (rev 7367)
@@ -23,7 +23,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
+				RuntimeLibrary="3"
UsePrecompiledHeader="3"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
@@ -70,11 +70,12 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\lib\core\ogg\libOOOgg"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="4"
+				RuntimeLibrary="0"
UsePrecompiledHeader="3"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
+				DebugInformationFormat="3"
+				CallingConvention="2"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool

Modified: trunk/oggdsf/src/tools/OOOggDump/OOOggDump.vcproj
===================================================================
--- trunk/oggdsf/src/tools/OOOggDump/OOOggDump.vcproj	2004-07-27 07:04:52 UTC (rev 7366)
+++ trunk/oggdsf/src/tools/OOOggDump/OOOggDump.vcproj	2004-07-27 07:34:06 UTC (rev 7367)
@@ -81,7 +81,7 @@
AdditionalIncludeDirectories="..\..\lib\core\ogg\libOOOgg;."
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
StringPooling="TRUE"
-				RuntimeLibrary="2"
+				RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="3"
WarningLevel="4"

Modified: trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.cpp
===================================================================
--- trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.cpp	2004-07-27 07:04:52 UTC (rev 7366)
+++ trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.cpp	2004-07-27 07:34:06 UTC (rev 7367)
@@ -17,6 +17,8 @@

OVE_MORE_THEN_ONE_EOS,
OVE_EOS_BEFORE_BOS,
+
+	OVE_DATA_AFTER_VALID_STREAM,

OVE_SEQUENCE_NO_REPEATED,
OVE_SEQUENCE_NO_DECREASED
@@ -48,6 +50,9 @@
case OVE_EOS_BEFORE_BOS:
locErrorString = "EOS page found before BOS page";
break;
+		case OVE_DATA_AFTER_VALID_STREAM:
+			locErrorString = "More data was received for a stream that was previously complete and valid.";
+			break;



@@ -72,14 +77,17 @@
bool pageCB(OggPage* inOggPage) {
//Validate the page header

+
OggStreamValidationState* locStreamState = gValidationState.getStreamBySerialNo(inOggPage->header()->StreamSerialNo());

-	if (locStreamState == NULL) {
-		locStreamState = new OggStreamValidationState;
-	}
-
OggPageHeader* locHeader = inOggPage->header();

+	//If this stream previously was valid, it should have no more data... so it's no longer valid.
+	if (locStreamState->mState == OggStreamValidationState::VS_FULLY_VALID) {
+		error_write(OVE_DATA_AFTER_VALID_STREAM,inOggPage,  locStreamState);
+		isValid = false;
+		locStreamState->mState = OggStreamValidationState::VS_INVALID;
+	}


//----------------------------------------------------------------------
@@ -92,6 +100,13 @@
//Verify BOS integrity.

if (locHeader->isBOS()) {
+		if (locStreamState->mState == OggStreamValidationState::VS_SEEN_NOTHING) {
+			//Valid case.
+			locStreamState->mState = OggStreamValidationState::VS_SEEN_BOS;
+		}
+
+
+
//Check is BOS is first page in stream
if (locStreamState->mSeenAnything == true) {
error_write(OVE_BOS_PAGE_NOT_AT_START,inOggPage,  locStreamState);
@@ -110,6 +125,13 @@
//----------------------------------------------------------------------
//Verify EOS integrity
if (locHeader->isEOS()) {
+
+		if (locStreamState->mState == OggStreamValidationState::VS_SEEN_BOS) {
+			//Valid case.
+			locStreamState->mState = OggStreamValidationState::VS_FULLY_VALID;
+		}
+
+
//Check is BOS has been seen before this EOS
if (locStreamState->mSeenBOS == false) {
error_write(OVE_EOS_BEFORE_BOS,inOggPage, locStreamState);

Modified: trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.vcproj
===================================================================
--- trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.vcproj	2004-07-27 07:04:52 UTC (rev 7366)
+++ trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.vcproj	2004-07-27 07:34:06 UTC (rev 7367)
@@ -65,16 +65,25 @@
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="1"
-			CharacterSet="2">
+			CharacterSet="2"
+			WholeProgramOptimization="TRUE">
<Tool
Name="VCCLCompilerTool"
+				Optimization="3"
+				GlobalOptimizations="TRUE"
+				InlineFunctionExpansion="2"
+				EnableIntrinsicFunctions="TRUE"
+				FavorSizeOrSpeed="1"
+				OptimizeForProcessor="3"
+				OptimizeForWindowsApplication="TRUE"
AdditionalIncludeDirectories="..\..\lib\core\ogg\libOOOgg"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="2"
+				RuntimeLibrary="0"
UsePrecompiledHeader="3"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
+				DebugInformationFormat="3"
+				CallingConvention="2"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
@@ -85,6 +94,7 @@
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
+				OptimizeForWindows98="1"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>

Modified: trunk/oggdsf/src/tools/OOOggValidate/OggStreamValidationState.h
===================================================================
--- trunk/oggdsf/src/tools/OOOggValidate/OggStreamValidationState.h	2004-07-27 07:04:52 UTC (rev 7366)
+++ trunk/oggdsf/src/tools/OOOggValidate/OggStreamValidationState.h	2004-07-27 07:34:06 UTC (rev 7367)
@@ -6,6 +6,15 @@
OggStreamValidationState(void);
~OggStreamValidationState(void);

+	enum eValidationState {
+		VS_FULLY_VALID,
+
+		VS_SEEN_NOTHING,
+		VS_SEEN_BOS,
+		VS_SEEN_EOS,
+		VS_INVALID
+
+	};
unsigned long mSerialNo;
__int64 mGranulePosUpto;
unsigned long mSequenceNoUpto;
@@ -17,4 +26,6 @@
unsigned long mErrorCount;
unsigned long mWarningCount;

+	eValidationState mState;
+
};

Modified: trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.cpp
===================================================================
--- trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.cpp	2004-07-27 07:04:52 UTC (rev 7366)
+++ trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.cpp	2004-07-27 07:34:06 UTC (rev 7367)
@@ -12,12 +12,20 @@


OggStreamValidationState* OggValidationState::getStreamBySerialNo(unsigned long inSerialNo) {
+	//Find this stream.... or make a new one.
+
for (size_t i = 0; i < mStreams.size(); i++) {
if (mStreams[i]->mSerialNo == inSerialNo) {
return mStreams[i];
}
}
-	return NULL;
+
+	OggStreamValidationState* retStream = new OggStreamValidationState;
+
+	retStream->mSerialNo = inSerialNo;
+	mStreams.push_back(retStream);
+
+	return retStream;
}
unsigned long OggValidationState::numStreams() {
return mStreams.size();



More information about the commits mailing list