[xiph-commits] r7332 - in trunk/oggdsf:

illiminable at dactyl.lonelymoon.com illiminable
Sun Jul 25 10:35:29 PDT 2004


build/libOOOggWithToolsAndTests sln/libOOOggWithToolsAndTests
src/tools/OOOggValidate
Message-ID: <20040725173529.840269AAAB at dactyl.lonelymoon.com>

Author: illiminable
Date: Sun Jul 25 10:35:29 2004
New Revision: 7332

Modified:
trunk/oggdsf/build/libOOOggWithToolsAndTests/libOOOggWithToolsAndTests.vdproj
trunk/oggdsf/sln/libOOOggWithToolsAndTests/libOOOggWithToolsAndTests.sln
trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.cpp
trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.vcproj
trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.h
Log:
* Starting testing on validation tool

Modified: trunk/oggdsf/build/libOOOggWithToolsAndTests/libOOOggWithToolsAndTests.vdproj
===================================================================
--- trunk/oggdsf/build/libOOOggWithToolsAndTests/libOOOggWithToolsAndTests.vdproj	2004-07-25 17:06:44 UTC (rev 7331)
+++ trunk/oggdsf/build/libOOOggWithToolsAndTests/libOOOggWithToolsAndTests.vdproj	2004-07-25 17:35:28 UTC (rev 7332)
@@ -15,6 +15,12 @@
{
"Entry"
{
+        "MsmKey" = "8:_9061237CE81A4BAC9A988D1713DCE01A"
+        "OwnerKey" = "8:_UNDEFINED"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
"MsmKey" = "8:_9BF479E16E8E489CA7D9F11A166F5612"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@@ -28,7 +34,7 @@
"Entry"
{
"MsmKey" = "8:_BBD7397A8E5F1E7433D3C7836DB3EE7F"
-        "OwnerKey" = "8:_9EB1B54CEB1D40979ADA34E55D07BB22"
+        "OwnerKey" = "8:_9061237CE81A4BAC9A988D1713DCE01A"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@@ -40,13 +46,19 @@
"Entry"
{
"MsmKey" = "8:_BBD7397A8E5F1E7433D3C7836DB3EE7F"
+        "OwnerKey" = "8:_9EB1B54CEB1D40979ADA34E55D07BB22"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_BBD7397A8E5F1E7433D3C7836DB3EE7F"
"OwnerKey" = "8:_9BF479E16E8E489CA7D9F11A166F5612"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_DCF47080823151CD8BF79A8AE0EA1C5D"
-        "OwnerKey" = "8:_9EB1B54CEB1D40979ADA34E55D07BB22"
+        "OwnerKey" = "8:_9061237CE81A4BAC9A988D1713DCE01A"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@@ -58,6 +70,12 @@
"Entry"
{
"MsmKey" = "8:_DCF47080823151CD8BF79A8AE0EA1C5D"
+        "OwnerKey" = "8:_9EB1B54CEB1D40979ADA34E55D07BB22"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_DCF47080823151CD8BF79A8AE0EA1C5D"
"OwnerKey" = "8:_9BF479E16E8E489CA7D9F11A166F5612"
"MsmSig" = "8:_UNDEFINED"
}
@@ -221,18 +239,18 @@
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:libOOOggWithToolsAndTests"
"ProductCode" = "8:{E213AA75-8F79-4E6E-A8AE-A131AA8B4058}"
-        "PackageCode" = "8:{72ED2554-0A9E-4347-B8D2-B9399055CDBC}"
+        "PackageCode" = "8:{F715599B-15C0-4FB2-A8FF-A61AC3488477}"
"UpgradeCode" = "8:{EC58A5EB-BA29-4AA6-B91D-26DFDB021492}"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:FALSE"
"DetectNewerInstalledVersion" = "11:TRUE"
"ProductVersion" = "8:1.0.0"
-        "Manufacturer" = "8:Default Company Name"
+        "Manufacturer" = "8:illiminable"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
"Title" = "8:libOOOggWithToolsAndTests"
"Subject" = "8:"
-        "ARPCONTACT" = "8:Default Company Name"
+        "ARPCONTACT" = "8:Zentaro Kavanagh"
"Keywords" = "8:"
"ARPCOMMENTS" = "8:"
"ARPURLINFOABOUT" = "8:"
@@ -721,6 +739,34 @@
}
"ProjectOutput"
{
+            "{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_9061237CE81A4BAC9A988D1713DCE01A"
+            {
+            "SourcePath" = "8:..\\..\\src\\tools\\oooggvalidate\\debug\\OOOggValidate.exe"
+            "TargetName" = "8:"
+            "Tag" = "8:"
+            "Folder" = "8:_ADE7E20E4D77439FB3A1B61B3F803F3B"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "IsolateTo" = "8:"
+            "ProjectOutputGroupRegister" = "3:1"
+            "OutputConfiguration" = "8:"
+            "OutputGroupCanonicalName" = "8:Built"
+            "OutputProjectGuid" = "8:{B5BF942B-4864-414C-9855-65E5CC923401}"
+            "ShowKeyOutput" = "11:TRUE"
+                "ExcludeFilters"
+                {
+                }
+            }
"{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_9BF479E16E8E489CA7D9F11A166F5612"
{
"SourcePath" = "8:..\\..\\src\\tools\\OOOggDump\\Debug\\OOOggDump.exe"

Modified: trunk/oggdsf/sln/libOOOggWithToolsAndTests/libOOOggWithToolsAndTests.sln
===================================================================
--- trunk/oggdsf/sln/libOOOggWithToolsAndTests/libOOOggWithToolsAndTests.sln	2004-07-25 17:06:44 UTC (rev 7331)
+++ trunk/oggdsf/sln/libOOOggWithToolsAndTests/libOOOggWithToolsAndTests.sln	2004-07-25 17:35:28 UTC (rev 7332)
@@ -19,6 +19,7 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OOOggValidate", "..\..\src\tools\OOOggValidate\OOOggValidate.vcproj", "{B5BF942B-4864-414C-9855-65E5CC923401}"
ProjectSection(ProjectDependencies) = postProject
+		{223ACC19-608E-4E1B-A054-067F0CACB272} = {223ACC19-608E-4E1B-A054-067F0CACB272}
EndProjectSection
EndProject
Global

Modified: trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.cpp
===================================================================
--- trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.cpp	2004-07-25 17:06:44 UTC (rev 7331)
+++ trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.cpp	2004-07-25 17:35:28 UTC (rev 7332)
@@ -4,10 +4,22 @@
#include "stdafx.h"
#include "OggValidationState.h"
#include "libOOOgg.h"
+#include "libOOOgg.h"
enum eOggValidationErrors {
OVE_OK,
+
OVE_STRUCTURE_VERSION_NOT_ZERO,

+	OVE_GRANULE_POS_DECREASED,
+
+	OVE_MORE_THEN_ONE_BOS,
+	OVE_BOS_PAGE_NOT_AT_START,
+
+	OVE_MORE_THEN_ONE_EOS,
+	OVE_EOS_BEFORE_BOS,
+
+	OVE_SEQUENCE_NO_REPEATED,
+	OVE_SEQUENCE_NO_DECREASED
};

OggValidationState gValidationState;
@@ -20,12 +32,11 @@
return;
break;
case OVE_STRUCTURE_VERSION_NOT_ZERO:
-			locErrorString = "Structure version("<<(int)inOggPage->header()->StructureVersion()<<") is not 0, (RFC 3533 Sec. 6.1)";
-			inStreamState->mErrorCount++;
+			locErrorString = (int)inOggPage->header()->StructureVersion();
+			locErrorString = "Structure version(" + locErrorString +") is not 0, (RFC 3533 Sec. 6.1)";
break;
case OVE_MORE_THEN_ONE_BOS:
locErrorString = "More than one BOS page in stream.";
-			inStreamState->mErrorCount++;
break;
case OVE_MORE_THEN_ONE_EOS:
locErrorString = "More than one EOS page in stream.";
@@ -34,11 +45,16 @@
locErrorString = "BOS found not as first page in stream.";
break;
case OVE_EOS_BEFORE_BOS:
-			locErrorString - "EOS page found before BOS page";
+			locErrorString = "EOS page found before BOS page";
break;
+		default:
+			locErrorString = "Unnamed Error";
+			break;

}

+	inStreamState->mErrorCount++;
+
cout << "ERROR "<<(int)inErrNo<<":  "<<locErrorString<<endl;

}
@@ -59,7 +75,7 @@
//----------------------------------------------------------------------
//Verify structure version is 0 (RFC 3533 Sec. 6.1)
if (locHeader->StructureVersion() != 0) {
-		error_write(OVE_STRUCTURE_VERSION_NOT_ZERO, inOggPage);
+		error_write(OVE_STRUCTURE_VERSION_NOT_ZERO, inOggPage, locStreamState);
isValid = false;
}
//----------------------------------------------------------------------
@@ -68,12 +84,12 @@
if (locHeader->isBOS()) {
//Check is BOS is first page in stream
if (locStreamState->mSeenAnything == true) {
-			error_write(OVE_BOS_PAGE_NOT_AT_START, locStreamState);
+			error_write(OVE_BOS_PAGE_NOT_AT_START,inOggPage,  locStreamState);
isValid = false;
}
//Check if this is the second or more BOS page.
if (locStreamState->mSeenBOS) {
-			error_write(OVE_MORE_THEN_ONE_BOS, locStreamState);
+			error_write(OVE_MORE_THEN_ONE_BOS,inOggPage, locStreamState);
isValid = false;
}

@@ -86,12 +102,12 @@
if (locHeader->isEOS()) {
//Check is BOS has been seen before this EOS
if (locStreamState->mSeenBOS == false) {
-			error_write(OVE_EOS_BEFORE_BOS, locStreamState);
+			error_write(OVE_EOS_BEFORE_BOS,inOggPage, locStreamState);
isValid = false;
}
//Check if this is the second or more BOS page.
if (locStreamState->mSeenEOS) {
-			error_write(OVE_MORE_THEN_ONE_EOS, locStreamState);
+			error_write(OVE_MORE_THEN_ONE_EOS, inOggPage, locStreamState);
isValid = false;
}

@@ -103,7 +119,7 @@
if (locHeader->GranulePos() != -1) {
//Check if the granule pos decreased.
if (locHeader->GranulePos() < locStreamState->mGranulePosUpto) {
-			error_write(OVE_GRANULE_POS_DECREASED, locStreamState);
+			error_write(OVE_GRANULE_POS_DECREASED, inOggPage, locStreamState);
isValid = false;
}

@@ -119,10 +135,10 @@

//Verify sequence No
if (locHeader->PageSequenceNo() == locStreamState->mSequenceNoUpto) {
-		error_write(OVE_SEQUENCE_NO_REPEATED, locStreamState);
+		error_write(OVE_SEQUENCE_NO_REPEATED, inOggPage, locStreamState);
isValid = false;
} else if (locHeader->PageSequenceNo() < locStreamState->mSequenceNoUpto) {
-		error_write(OVE_SEQUENCE_NO_DECREASED, locStreamState);
+		error_write(OVE_SEQUENCE_NO_DECREASED, inOggPage, locStreamState);
isValid = false;
} else {
locStreamState->mSequenceNoUpto = locHeader->PageSequenceNo();
@@ -144,7 +160,7 @@
// Currently does not error checking. Check your command line carefully !
// USAGE :: OOOggValidate <OggFile>
//
-	bytePos = 0;
+	//bytePos = 0;
if (argc < 2) {
cout<<"Usage : OOOggValidate <filename>"<<endl;
} else {
@@ -156,10 +172,36 @@
fstream testFile;
testFile.open(argv[1], ios_base::in | ios_base::binary);
char* locBuff = new char[BUFF_SIZE];
+		OggDataBuffer::eFeedResult locResult;
while (!testFile.eof()) {
testFile.read(locBuff, BUFF_SIZE);
unsigned long locBytesRead = testFile.gcount();
-    		testOggBuff.feed(locBuff, locBytesRead);
+    		locResult = testOggBuff.feed(locBuff, locBytesRead);
+			switch(locResult) {
+				case OVE_OK:
+					break;
+
+				case OVE_STRUCTURE_VERSION_NOT_ZERO:
+					error_write(OVE_STRUCTURE_VERSION_NOT_ZERO, NULL , NULL);
+					return OVE_STRUCTURE_VERSION_NOT_ZERO;
+
+				case OVE_MORE_THEN_ONE_BOS:
+					error_write(OVE_MORE_THEN_ONE_BOS, NULL, NULL);
+					return OVE_MORE_THEN_ONE_BOS;
+
+				case OVE_MORE_THEN_ONE_EOS:
+					error_write(OVE_MORE_THEN_ONE_EOS, NULL, NULL);
+					return OVE_MORE_THEN_ONE_EOS;
+
+				case OVE_BOS_PAGE_NOT_AT_START:
+					error_write(OVE_BOS_PAGE_NOT_AT_START, NULL, NULL);
+					return OVE_BOS_PAGE_NOT_AT_START;
+
+				case OVE_EOS_BEFORE_BOS:
+					error_write(OVE_EOS_BEFORE_BOS, NULL, NULL);
+					return OVE_EOS_BEFORE_BOS;
+
+			}
}

delete locBuff;

Modified: trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.vcproj
===================================================================
--- trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.vcproj	2004-07-25 17:06:44 UTC (rev 7331)
+++ trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.vcproj	2004-07-25 17:35:28 UTC (rev 7332)
@@ -27,7 +27,8 @@
UsePrecompiledHeader="3"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
+				DebugInformationFormat="4"
+				CallingConvention="2"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool

Modified: trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.h
===================================================================
--- trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.h	2004-07-25 17:06:44 UTC (rev 7331)
+++ trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.h	2004-07-25 17:35:28 UTC (rev 7332)
@@ -1,6 +1,8 @@
#pragma once
#include <vector>
using namespace std;
+
+#include "OggStreamValidationState.h"
class OggValidationState
{
public:



More information about the commits mailing list