[xiph-commits] r7372 - in trunk/oggdsf: build/oggcodecs docs

illiminable at dactyl.lonelymoon.com illiminable
Tue Jul 27 11:27:33 PDT 2004


src/lib/codecs/flac/filters/dsfFLACDecoder
src/lib/codecs/flac/filters/dsfFLACEncoder
src/lib/codecs/flac/libs/libflac/src/libFLAC
src/lib/core/directshow/dsfOggDemux src/lib/core/ogg/libOOOgg
src/lib/core/ogg/libOOOggSeek src/tools/OOOggValidate
Message-ID: <20040727182733.D1C769AAAB at dactyl.lonelymoon.com>

Author: illiminable
Date: Tue Jul 27 11:27:33 2004
New Revision: 7372

Modified:
trunk/oggdsf/build/oggcodecs/oggcodecs.vdproj
trunk/oggdsf/docs/TODO.txt
trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeFilter.cpp
trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeFilter.h
trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeInputPin.cpp
trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeInputPin.h
trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeOutputPin.cpp
trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACdecoderdllstuff.h
trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/FLACEncodeFilter.h
trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/FLACEncodeInputPin.h
trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/FLACEncodeOutputPin.cpp
trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/flacencoderdllstuff.h
trunk/oggdsf/src/lib/codecs/flac/libs/libflac/src/libFLAC/stream_decoder.c
trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FLACStream.cpp
trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/oggdllstuff.h
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageHeader.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp
trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.cpp
trunk/oggdsf/src/tools/OOOggValidate/OggStreamValidationState.cpp
trunk/oggdsf/src/tools/OOOggValidate/OggStreamValidationState.h
trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.cpp
trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.h
Log:
* More updates to the demuxer and validation program.
* Fixes to flac decode filter.
* Fixes to seek table.

Modified: trunk/oggdsf/build/oggcodecs/oggcodecs.vdproj
===================================================================
--- trunk/oggdsf/build/oggcodecs/oggcodecs.vdproj	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/build/oggcodecs/oggcodecs.vdproj	2004-07-27 18:27:31 UTC (rev 7372)
@@ -57,12 +57,6 @@
}
"Entry"
{
-        "MsmKey" = "8:_233DB0F10348445CA474EAEE7774055B"
-        "OwnerKey" = "8:_E4B8E67DA0E54BB3BB025BFCF536BF3B"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
"MsmKey" = "8:_2BCA6A72916D5849383EDFD6B61B8E1D"
"OwnerKey" = "8:_79FF0B1DD62A45B4AC907B30008DA5D2"
"MsmSig" = "8:_UNDEFINED"
@@ -118,90 +112,102 @@
"Entry"
{
"MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_8B196B598C8B4033B13B43E0E7A63185"
+        "OwnerKey" = "8:_C6ED1B8B0AAC495E9D25CDE58FC9E711"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_7F96FF7D00B84764BBB42C4AA1EEAF39"
+        "OwnerKey" = "8:_DCF4ED7597F8492AA49DC521111ED0F5"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_EE4A127518E84295835DA5640EBB17B2"
+        "OwnerKey" = "8:_8F970C0B2593413CA2A3BBF5F2600387"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
+        "OwnerKey" = "8:_5EB08DD30B564283AA9C9F27D80CF9E4"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
"OwnerKey" = "8:_EB09F87C612C40BCA34AC87060CFEFF1"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_E1E372FA955046E6928BF533EA0AE6C3"
+        "OwnerKey" = "8:_8B196B598C8B4033B13B43E0E7A63185"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_DCF4ED7597F8492AA49DC521111ED0F5"
+        "OwnerKey" = "8:_7F96FF7D00B84764BBB42C4AA1EEAF39"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_DAE083F8E57A4B28B67607B3FB4826E5"
+        "OwnerKey" = "8:_0D0DD40A31F842C68B09BE0CBDE1996B"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_D2048C8B212841C88E42F6ADDCA8B0A2"
+        "OwnerKey" = "8:_EE4A127518E84295835DA5640EBB17B2"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_AC8962A7F212481095173AB7C8C89025"
+        "OwnerKey" = "8:_E1E372FA955046E6928BF533EA0AE6C3"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_8F970C0B2593413CA2A3BBF5F2600387"
+        "OwnerKey" = "8:_DAE083F8E57A4B28B67607B3FB4826E5"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_8976C400668B453CB941859C4F3C6E27"
+        "OwnerKey" = "8:_D2048C8B212841C88E42F6ADDCA8B0A2"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_79FF0B1DD62A45B4AC907B30008DA5D2"
+        "OwnerKey" = "8:_AC8962A7F212481095173AB7C8C89025"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_65015192414F476999A68339F89BEA57"
+        "OwnerKey" = "8:_8976C400668B453CB941859C4F3C6E27"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
-        "OwnerKey" = "8:_5EB08DD30B564283AA9C9F27D80CF9E4"
+        "OwnerKey" = "8:_79FF0B1DD62A45B4AC907B30008DA5D2"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
+        "OwnerKey" = "8:_65015192414F476999A68339F89BEA57"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
"OwnerKey" = "8:_58F56CD02F64413B9459F3E151760A57"
"MsmSig" = "8:_UNDEFINED"
}
@@ -292,60 +298,78 @@
"Entry"
{
"MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
-        "OwnerKey" = "8:_8B196B598C8B4033B13B43E0E7A63185"
+        "OwnerKey" = "8:_C6ED1B8B0AAC495E9D25CDE58FC9E711"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
-        "OwnerKey" = "8:_7F96FF7D00B84764BBB42C4AA1EEAF39"
+        "OwnerKey" = "8:_DCF4ED7597F8492AA49DC521111ED0F5"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
-        "OwnerKey" = "8:_FD547F0196C24DFBB9CAFCCEC06561BC"
+        "OwnerKey" = "8:_8F970C0B2593413CA2A3BBF5F2600387"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
-        "OwnerKey" = "8:_EFEA71FFF2864107815DBDECCCCA1178"
+        "OwnerKey" = "8:_5EB08DD30B564283AA9C9F27D80CF9E4"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
-        "OwnerKey" = "8:_EE4A127518E84295835DA5640EBB17B2"
+        "OwnerKey" = "8:_EB09F87C612C40BCA34AC87060CFEFF1"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
-        "OwnerKey" = "8:_EB09F87C612C40BCA34AC87060CFEFF1"
+        "OwnerKey" = "8:_8B196B598C8B4033B13B43E0E7A63185"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
-        "OwnerKey" = "8:_E1E372FA955046E6928BF533EA0AE6C3"
+        "OwnerKey" = "8:_7F96FF7D00B84764BBB42C4AA1EEAF39"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
-        "OwnerKey" = "8:_DD3F37DC11D54B5996F597343A185E03"
+        "OwnerKey" = "8:_FD547F0196C24DFBB9CAFCCEC06561BC"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
-        "OwnerKey" = "8:_DCF4ED7597F8492AA49DC521111ED0F5"
+        "OwnerKey" = "8:_EFEA71FFF2864107815DBDECCCCA1178"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
+        "OwnerKey" = "8:_EE4A127518E84295835DA5640EBB17B2"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
+        "OwnerKey" = "8:_E1E372FA955046E6928BF533EA0AE6C3"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
+        "OwnerKey" = "8:_DD3F37DC11D54B5996F597343A185E03"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
"OwnerKey" = "8:_DB60960DC12343B89500B86D5AB10D02"
"MsmSig" = "8:_UNDEFINED"
}
@@ -382,12 +406,6 @@
"Entry"
{
"MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
-        "OwnerKey" = "8:_8F970C0B2593413CA2A3BBF5F2600387"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
-        "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
"OwnerKey" = "8:_8D9A2E4C592D4118B80A4AE8394D8963"
"MsmSig" = "8:_UNDEFINED"
}
@@ -448,12 +466,6 @@
"Entry"
{
"MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
-        "OwnerKey" = "8:_5EB08DD30B564283AA9C9F27D80CF9E4"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
-        "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
"OwnerKey" = "8:_58F56CD02F64413B9459F3E151760A57"
"MsmSig" = "8:_UNDEFINED"
}
@@ -592,169 +604,181 @@
"Entry"
{
"MsmKey" = "8:_91763CD4DC02EBA9D077B963E618A278"
-        "OwnerKey" = "8:_79FF0B1DD62A45B4AC907B30008DA5D2"
+        "OwnerKey" = "8:_2BCA6A72916D5849383EDFD6B61B8E1D"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_91763CD4DC02EBA9D077B963E618A278"
-        "OwnerKey" = "8:_8B196B598C8B4033B13B43E0E7A63185"
+        "OwnerKey" = "8:_7F96FF7D00B84764BBB42C4AA1EEAF39"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_91763CD4DC02EBA9D077B963E618A278"
-        "OwnerKey" = "8:_7F96FF7D00B84764BBB42C4AA1EEAF39"
+        "OwnerKey" = "8:_36F567FA964BFBEAAC7524D44D4A26C7"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_91763CD4DC02EBA9D077B963E618A278"
-        "OwnerKey" = "8:_36F567FA964BFBEAAC7524D44D4A26C7"
+        "OwnerKey" = "8:_10DB6866DFED66BBB0880F2999B25EA1"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_91763CD4DC02EBA9D077B963E618A278"
-        "OwnerKey" = "8:_2BCA6A72916D5849383EDFD6B61B8E1D"
+        "OwnerKey" = "8:_EE4A127518E84295835DA5640EBB17B2"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_91763CD4DC02EBA9D077B963E618A278"
-        "OwnerKey" = "8:_10DB6866DFED66BBB0880F2999B25EA1"
+        "OwnerKey" = "8:_DAE083F8E57A4B28B67607B3FB4826E5"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_91763CD4DC02EBA9D077B963E618A278"
-        "OwnerKey" = "8:_EE4A127518E84295835DA5640EBB17B2"
+        "OwnerKey" = "8:_8B196B598C8B4033B13B43E0E7A63185"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_91763CD4DC02EBA9D077B963E618A278"
-        "OwnerKey" = "8:_DAE083F8E57A4B28B67607B3FB4826E5"
+        "OwnerKey" = "8:_79FF0B1DD62A45B4AC907B30008DA5D2"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_A5AAB8CB90C548F1820BC101A765616C"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_A4A2F7E0DFB044F9BC25104794AC5A0C"
+        "OwnerKey" = "8:_6F3796EC49CD4C9CBDDD077F059CA73B"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_AC8962A7F212481095173AB7C8C89025"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_A4A2F7E0DFB044F9BC25104794AC5A0C"
+        "OwnerKey" = "8:_36F567FA964BFBEAAC7524D44D4A26C7"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_AFF84F5FBA224F8A8D4BB3ACA539DC8B"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_A4A2F7E0DFB044F9BC25104794AC5A0C"
+        "OwnerKey" = "8:_10DB6866DFED66BBB0880F2999B25EA1"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_B2784574F1B848EABBE013669B46808C"
-        "OwnerKey" = "8:_DB60960DC12343B89500B86D5AB10D02"
+        "MsmKey" = "8:_A4A2F7E0DFB044F9BC25104794AC5A0C"
+        "OwnerKey" = "8:_EE4A127518E84295835DA5640EBB17B2"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_D2048C8B212841C88E42F6ADDCA8B0A2"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_A4A2F7E0DFB044F9BC25104794AC5A0C"
+        "OwnerKey" = "8:_DAE083F8E57A4B28B67607B3FB4826E5"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_D9BE90D398094F15B881B22369C3A231"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_A4A2F7E0DFB044F9BC25104794AC5A0C"
+        "OwnerKey" = "8:_8B196B598C8B4033B13B43E0E7A63185"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_DAE083F8E57A4B28B67607B3FB4826E5"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_A4A2F7E0DFB044F9BC25104794AC5A0C"
+        "OwnerKey" = "8:_7F96FF7D00B84764BBB42C4AA1EEAF39"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_DB60960DC12343B89500B86D5AB10D02"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_A4A2F7E0DFB044F9BC25104794AC5A0C"
+        "OwnerKey" = "8:_91763CD4DC02EBA9D077B963E618A278"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_DCF4ED7597F8492AA49DC521111ED0F5"
+        "MsmKey" = "8:_A4A2F7E0DFB044F9BC25104794AC5A0C"
+        "OwnerKey" = "8:_2BCA6A72916D5849383EDFD6B61B8E1D"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_A4A2F7E0DFB044F9BC25104794AC5A0C"
+        "OwnerKey" = "8:_79FF0B1DD62A45B4AC907B30008DA5D2"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_A5AAB8CB90C548F1820BC101A765616C"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_DD3F37DC11D54B5996F597343A185E03"
+        "MsmKey" = "8:_AC8962A7F212481095173AB7C8C89025"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_E19E6FA89F3A4FEEBA28405C19EAE0FD"
-        "OwnerKey" = "8:_6F3796EC49CD4C9CBDDD077F059CA73B"
+        "MsmKey" = "8:_AFF84F5FBA224F8A8D4BB3ACA539DC8B"
+        "OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_E19E6FA89F3A4FEEBA28405C19EAE0FD"
-        "OwnerKey" = "8:_8B196B598C8B4033B13B43E0E7A63185"
+        "MsmKey" = "8:_B0239CDEE5BC4306A85E0796386C1251"
+        "OwnerKey" = "8:_E4B8E67DA0E54BB3BB025BFCF536BF3B"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_E19E6FA89F3A4FEEBA28405C19EAE0FD"
-        "OwnerKey" = "8:_36F567FA964BFBEAAC7524D44D4A26C7"
+        "MsmKey" = "8:_B2784574F1B848EABBE013669B46808C"
+        "OwnerKey" = "8:_DB60960DC12343B89500B86D5AB10D02"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_E19E6FA89F3A4FEEBA28405C19EAE0FD"
-        "OwnerKey" = "8:_7F96FF7D00B84764BBB42C4AA1EEAF39"
+        "MsmKey" = "8:_C6ED1B8B0AAC495E9D25CDE58FC9E711"
+        "OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_E19E6FA89F3A4FEEBA28405C19EAE0FD"
-        "OwnerKey" = "8:_10DB6866DFED66BBB0880F2999B25EA1"
+        "MsmKey" = "8:_D2048C8B212841C88E42F6ADDCA8B0A2"
+        "OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_E19E6FA89F3A4FEEBA28405C19EAE0FD"
-        "OwnerKey" = "8:_EE4A127518E84295835DA5640EBB17B2"
+        "MsmKey" = "8:_D9BE90D398094F15B881B22369C3A231"
+        "OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_E19E6FA89F3A4FEEBA28405C19EAE0FD"
-        "OwnerKey" = "8:_DAE083F8E57A4B28B67607B3FB4826E5"
+        "MsmKey" = "8:_DAE083F8E57A4B28B67607B3FB4826E5"
+        "OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_E19E6FA89F3A4FEEBA28405C19EAE0FD"
-        "OwnerKey" = "8:_91763CD4DC02EBA9D077B963E618A278"
+        "MsmKey" = "8:_DB60960DC12343B89500B86D5AB10D02"
+        "OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_E19E6FA89F3A4FEEBA28405C19EAE0FD"
-        "OwnerKey" = "8:_2BCA6A72916D5849383EDFD6B61B8E1D"
+        "MsmKey" = "8:_DCF4ED7597F8492AA49DC521111ED0F5"
+        "OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
-        "MsmKey" = "8:_E19E6FA89F3A4FEEBA28405C19EAE0FD"
-        "OwnerKey" = "8:_79FF0B1DD62A45B4AC907B30008DA5D2"
+        "MsmKey" = "8:_DD3F37DC11D54B5996F597343A185E03"
+        "OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@@ -862,7 +886,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
-            "AssemblyAsmDisplayName" = "8:libDSPlayDotNET, Version=1.0.1666.34214, Culture=neutral"
+            "AssemblyAsmDisplayName" = "8:libDSPlayDotNET, Version=1.0.1667.29723, Culture=neutral"
"ScatterAssemblies"
{
"_10DB6866DFED66BBB0880F2999B25EA1"
@@ -913,7 +937,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
-            "AssemblyAsmDisplayName" = "8:libCMMLTagsDotNET, Version=1.0.1666.34199, Culture=neutral"
+            "AssemblyAsmDisplayName" = "8:libCMMLTagsDotNET, Version=1.0.1667.29701, Culture=neutral"
"ScatterAssemblies"
{
"_2BCA6A72916D5849383EDFD6B61B8E1D"
@@ -964,7 +988,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
-            "AssemblyAsmDisplayName" = "8:libVorbisCommentDotNET, Version=1.0.1666.33929, Culture=neutral"
+            "AssemblyAsmDisplayName" = "8:libVorbisCommentDotNET, Version=1.0.1669.28790, Culture=neutral"
"ScatterAssemblies"
{
"_36F567FA964BFBEAAC7524D44D4A26C7"
@@ -1095,7 +1119,7 @@
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
-            "AssemblyAsmDisplayName" = "8:libiWrapper, Version=1.0.1666.33923, Culture=neutral"
+            "AssemblyAsmDisplayName" = "8:libiWrapper, Version=1.0.1667.28024, Culture=neutral"
"ScatterAssemblies"
{
"_91763CD4DC02EBA9D077B963E618A278"
@@ -1218,7 +1242,7 @@
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:oggcodecs"
"ProductCode" = "8:{EF61A700-92D2-4817-8244-5F788156D2F0}"
-        "PackageCode" = "8:{C6B230AA-7283-4848-820A-7D41AC54325D}"
+        "PackageCode" = "8:{4A7843BE-6D3F-491B-8F1E-5857F93E38BE}"
"UpgradeCode" = "8:{1A644FEB-7597-4FAB-AADE-C2C7C64C5984}"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
@@ -2591,30 +2615,30 @@
}
"MergeModule"
{
-            "{35A69C6E-5BA4-440D-803D-762B59A45393}:_233DB0F10348445CA474EAEE7774055B"
+            "{35A69C6E-5BA4-440D-803D-762B59A45393}:_A4A2F7E0DFB044F9BC25104794AC5A0C"
{
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:TRUE"
-            "SourcePath" = "8:vc_user_crt71_rtl_x86_---.msm"
+            "SourcePath" = "8:dotnetfxredist_x86.msm"
"Properties"
{
}
-            "LanguageId" = "3:0"
-            "Exclude" = "11:FALSE"
+            "LanguageId" = "3:1033"
+            "Exclude" = "11:TRUE"
"Folder" = "8:"
"Feature" = "8:"
"IsolateTo" = "8:"
}
-            "{35A69C6E-5BA4-440D-803D-762B59A45393}:_E19E6FA89F3A4FEEBA28405C19EAE0FD"
+            "{35A69C6E-5BA4-440D-803D-762B59A45393}:_B0239CDEE5BC4306A85E0796386C1251"
{
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:TRUE"
-            "SourcePath" = "8:dotnetfxredist_x86.msm"
+            "SourcePath" = "8:vc_user_crt71_rtl_x86_---.msm"
"Properties"
{
}
-            "LanguageId" = "3:1033"
-            "Exclude" = "11:TRUE"
+            "LanguageId" = "3:0"
+            "Exclude" = "11:FALSE"
"Folder" = "8:"
"Feature" = "8:"
"IsolateTo" = "8:"
@@ -3406,6 +3430,34 @@
{
}
}
+            "{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_C6ED1B8B0AAC495E9D25CDE58FC9E711"
+            {
+            "SourcePath" = "8:..\\..\\src\\tools\\OOOggValidate\\Debug\\OOOggValidate.exe"
+            "TargetName" = "8:"
+            "Tag" = "8:"
+            "Folder" = "8:_371AD289B6DB4693BDF7568485051F1E"
+            "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}:_D2048C8B212841C88E42F6ADDCA8B0A2"
{
"SourcePath" = "8:..\\..\\src\\lib\\core\\directshow\\dsfSubtitleVMR9\\Debug\\dsfSubtitleVMR9.dll"

Modified: trunk/oggdsf/docs/TODO.txt
===================================================================
--- trunk/oggdsf/docs/TODO.txt	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/docs/TODO.txt	2004-07-27 18:27:31 UTC (rev 7372)
@@ -1,9 +1,8 @@
BUGS
====
* Figure out why the graph hangs at the end of lpayback sometimes. see debugging.txt
-* Fix flac decoder
+
* Fix wmp 9 issues, probably by rewriting the decoder :(
-* Add seeking to annodex

* I don't think non-renderer filters should expose the seeking interface.
* Fix up the seeking interface to provide choice of seek method.
@@ -11,18 +10,31 @@
# Seeking very close to the end of speex or vorbis files, causes all audio to cease, requiring stop/play to resolve. Particularly noticable in small files, seems roughly 5 secs from end where this occurs.
# There is no way to alter the audio encoding parameters, vorbis defaults to quality 0.3

-# Duration is wrong for all files except speex, vorbis and theora... doesn't affect playback
+
# When transcoding theora, if a media decoder (WMV usually) doesn't advertise its framerate, output may be time distorted
# Created files are not yet gauranteed to be correct. No produced encoded files should be distributed.
# I think there may be a little memory leak in the encoders... nothing too serious, but if you try and encode really large files it may be a problem.
# Theora will not playback with Windows Media Player 9 or 10, but vorbis and speex are just fine, but will in previous WMP's and other DS players like BSPlayer
-# Theora and annodex playback requires directX 9.
-# CMML decoding requires MSXML3.dll to be present. (it was installed with IE6)
+
+
# DON'T try to stop a FLAC stream. It crashes. Running to the end is ok.
# FLAC will make media player do the error sound or crash on exit
# Only plays FLAC with 16 bit 2 channel 44100Hz settings. Still hardcoded.
# Only plays Ogg encapsulated FLAC. Won't play normal FLAC files.

+NOT BUG
+=======
+# Theora and annodex playback requires directX 9.
+# CMML decoding requires MSXML3.dll to be present. (it was installed with IE6)
+
+
+PARITALLY DONE
+==============
+* Fix flac decoder
+* Add seeking to annodex
+# Duration is wrong for all files except speex, vorbis and theora... doesn't affect playback
+
+
NEXT FEATURES
=============
* CMML Application interface

Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeFilter.cpp	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeFilter.cpp	2004-07-27 18:27:31 UTC (rev 7372)
@@ -51,6 +51,7 @@

FLACDecodeFilter::FLACDecodeFilter(void)
:	AbstractAudioDecodeFilter(NAME("FLAC Audio Decoder"), CLSID_FLACDecodeFilter, FLAC)
+	,	mFLACFormatBlock(NULL)
{
bool locWasConstructed = ConstructPins();
}
@@ -58,7 +59,7 @@
FLACDecodeFilter::~FLACDecodeFilter(void)
{
DestroyPins();
-	//delete mSpeexFormatInfo;
+	delete mFLACFormatBlock;
}

bool FLACDecodeFilter::ConstructPins()
@@ -81,4 +82,15 @@
*pHr = E_OUTOFMEMORY;
}
return pNewObject;
-}
\ No newline at end of file
+}
+
+sFLACFormatBlock* FLACDecodeFilter::getFLACFormatBlock()
+{
+	return mFLACFormatBlock;
+}
+void FLACDecodeFilter::setFLACFormatBlock(sFLACFormatBlock* inFormatBlock)
+{
+	delete mFLACFormatBlock;
+	mFLACFormatBlock = new sFLACFormatBlock;
+	*mFLACFormatBlock = *inFormatBlock;
+}
\ No newline at end of file

Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeFilter.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeFilter.h	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeFilter.h	2004-07-27 18:27:31 UTC (rev 7372)
@@ -48,6 +48,11 @@
//VIRTUAL FUNCTIONS - AbstractAudioDecodeFilter
virtual bool ConstructPins();

+	//Should really be here
+
+	void FLACDecodeFilter::setFLACFormatBlock(sFLACFormatBlock* inFormatBlock) ;
+	sFLACFormatBlock* FLACDecodeFilter::getFLACFormatBlock();
protected:
+	sFLACFormatBlock* mFLACFormatBlock;

};

Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeInputPin.cpp	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeInputPin.cpp	2004-07-27 18:27:31 UTC (rev 7372)
@@ -36,6 +36,7 @@
:	AbstractAudioDecodeInputPin(inParentFilter, inFilterLock, inOutputPin, NAME("FLACDecodeInputPin"), L"FLAC In", inAcceptMediaType)
,	mGotMetaData(false)
,	mCodecLock(NULL)
+
//,	mNumPacksBuffered(0)
{
debugLog.open("G:\\logs\\flacfilter.log", ios_base::out);
@@ -47,6 +48,7 @@
{
debugLog.close();
delete mCodecLock;
+
}

STDMETHODIMP FLACDecodeInputPin::NonDelegatingQueryInterface(REFIID riid, void **ppv)
@@ -346,7 +348,11 @@
//RESOLVED::: Bit better.

if (inMediaType->subtype == MEDIASUBTYPE_FLAC) {
-		//Do something here
+
+		//Keep the format block
+
+		((FLACDecodeFilter*)mParentFilter)->setFLACFormatBlock((sFLACFormatBlock*)inMediaType->pbFormat);
+
} else {
throw 0;
}

Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeInputPin.h	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeInputPin.h	2004-07-27 18:27:31 UTC (rev 7372)
@@ -72,7 +72,7 @@

protected:
bool mGotMetaData;
-
+
//debug only
fstream debugLog;
//

Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeOutputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeOutputPin.cpp	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACDecodeOutputPin.cpp	2004-07-27 18:27:31 UTC (rev 7372)
@@ -53,10 +53,12 @@
}

bool FLACDecodeOutputPin::FillWaveFormatExBuffer(WAVEFORMATEX* inFormatBuffer) {
+	FLACDecodeFilter* locFilter = (FLACDecodeFilter*)mParentFilter;
+
inFormatBuffer->wFormatTag = WAVE_FORMAT_PCM;
-	inFormatBuffer->nChannels = 2;
-    inFormatBuffer->nSamplesPerSec =  44100;
-	inFormatBuffer->wBitsPerSample = 16;
+	inFormatBuffer->nChannels = locFilter->getFLACFormatBlock()->numChannels;
+    inFormatBuffer->nSamplesPerSec =  locFilter->getFLACFormatBlock()->sampleRate;
+	inFormatBuffer->wBitsPerSample = locFilter->getFLACFormatBlock()->numBitsPerSample;
inFormatBuffer->nBlockAlign = (inFormatBuffer->nChannels) * (inFormatBuffer->wBitsPerSample >> 3);
inFormatBuffer->nAvgBytesPerSec = ((inFormatBuffer->nChannels) * (inFormatBuffer->wBitsPerSample >> 3)) * inFormatBuffer->nSamplesPerSec;
inFormatBuffer->cbSize = 0;

Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACdecoderdllstuff.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACdecoderdllstuff.h	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACDecoder/FLACdecoderdllstuff.h	2004-07-27 18:27:31 UTC (rev 7372)
@@ -38,6 +38,14 @@
#pragma message("<---- Importing from Abstract Library...")
#define ABS_AUDIO_DEC_API __declspec(dllimport)
#endif
+
+struct sFLACFormatBlock {
+	unsigned short numChannels;
+	unsigned long numBitsPerSample;
+	unsigned long sampleRate;
+
+};
+
#include "AbstractAudioDecodeFilter.h"
#include "AbstractAudioDecodeInputPin.h"
#include "AbstractAudioDecodeOutputPin.h"

Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/FLACEncodeFilter.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/FLACEncodeFilter.h	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/FLACEncodeFilter.h	2004-07-27 18:27:31 UTC (rev 7372)
@@ -53,7 +53,9 @@
//PURE VIRTUAL IMPLEMENTATION
virtual bool ConstructPins();

+	//TODO::: This shouldn'y be here... use the getter setters.
+	sFLACFormatBlock mFLACFormatBlock;
protected:
-	sFLACFormatBlock mFLACFormatBlock;

+
};

Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/FLACEncodeInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/FLACEncodeInputPin.h	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/FLACEncodeInputPin.h	2004-07-27 18:27:31 UTC (rev 7372)
@@ -70,6 +70,7 @@
virtual STDMETHODIMP EndOfStream(void);
protected:
HRESULT mHR;
+
//bool mBegun;
//SpeexDecodeOutputPin* mOutputPin;
//__int64 mUptoFrame;

Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/FLACEncodeOutputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/FLACEncodeOutputPin.cpp	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/FLACEncodeOutputPin.cpp	2004-07-27 18:27:31 UTC (rev 7372)
@@ -43,6 +43,8 @@

bool FLACEncodeOutputPin::FillFormatBuffer(BYTE* inFormatBuffer) {
FLACEncodeFilter* locParentFilter = (FLACEncodeFilter*)mParentFilter;
+
+	//TODO::: This is not needed... put in a get and set
memcpy((void*)inFormatBuffer, (const void*) &(locParentFilter->mFLACFormatBlock), sizeof(sFLACFormatBlock));
return true;
}

Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/flacencoderdllstuff.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/flacencoderdllstuff.h	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfFLACEncoder/flacencoderdllstuff.h	2004-07-27 18:27:31 UTC (rev 7372)
@@ -40,15 +40,6 @@
#define ABS_AUDIO_DEC_API __declspec(dllimport)
#endif

-//struct sSpeexFormatBlock {
-//	unsigned long speexVersion;
-//	unsigned long samplesPerSec;
-//	unsigned long minBitsPerSec;
-//	unsigned long avgBitsPerSec;
-//	unsigned long maxBitsPerSec;
-//	unsigned long numChannels;
-//
-//};
struct sFLACFormatBlock {
unsigned short numChannels;
unsigned long numBitsPerSample;

Modified: trunk/oggdsf/src/lib/codecs/flac/libs/libflac/src/libFLAC/stream_decoder.c
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/libs/libflac/src/libFLAC/stream_decoder.c	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/lib/codecs/flac/libs/libflac/src/libFLAC/stream_decoder.c	2004-07-27 18:27:31 UTC (rev 7372)
@@ -551,7 +551,7 @@
}
decoder->protected_->state = FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC;
//Insert by ZEN:::
-	decoder->private_->samples_decoded = 0;
+	//decoder->private_->samples_decoded = 0;

return true;
}

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FLACStream.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FLACStream.cpp	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FLACStream.cpp	2004-07-27 18:27:31 UTC (rev 7372)
@@ -63,12 +63,17 @@
}

bool FLACStream::createFormatBlock() {
-	const unsigned char FLAC_CHANNEL_MASK = 7;  //00000111
+	const unsigned char FLAC_CHANNEL_MASK = 14;  //00001110
+	const unsigned char FLAC_BPS_START_MASK = 1; //00000001
+	const unsigned char FLAC_BPS_END_MASK = 240;  //11110000
mFLACFormatBlock = new sFLACFormatBlock;
//Fix the format block data... use header version and other version.
//mFLACFormatBlock->FLACVersion = FLACMath::charArrToULong(mCodecHeaders->getPacket(1)->packetData() + 28);
-	mFLACFormatBlock->numChannels = (mCodecHeaders->getPacket(1)->packetData()[16]) & FLAC_CHANNEL_MASK;
-	mFLACFormatBlock->samplesPerSec = (FLACMath::charArrToULong(mCodecHeaders->getPacket(1)->packetData() + 14)) >> 12;
+	mFLACFormatBlock->numChannels = (((mCodecHeaders->getPacket(1)->packetData()[16]) & FLAC_CHANNEL_MASK) >> 1) + 1;
+	mFLACFormatBlock->sampleRate = (FLACMath::charArrToULong(mCodecHeaders->getPacket(1)->packetData() + 14)) >> 12;
+
+	mFLACFormatBlock->numBitsPerSample =	(((mCodecHeaders->getPacket(1)->packetData()[16] & FLAC_BPS_START_MASK) << 4)	|
+											((mCodecHeaders->getPacket(1)->packetData()[17] & FLAC_BPS_END_MASK) >> 4)) + 1;
return true;
}
BYTE* FLACStream::getFormatBlock() {
@@ -123,5 +128,5 @@
}

LONGLONG FLACStream::getCurrentPos() {
-	return (mLastEndGranulePos * UNITS) / mFLACFormatBlock->samplesPerSec;
+	return (mLastEndGranulePos * UNITS) / mFLACFormatBlock->sampleRate;
}
\ No newline at end of file

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/oggdllstuff.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/oggdllstuff.h	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/oggdllstuff.h	2004-07-27 18:27:31 UTC (rev 7372)
@@ -132,8 +132,10 @@
};

struct sFLACFormatBlock {
-	unsigned char numChannels;
-	unsigned long samplesPerSec;
+	unsigned short numChannels;
+	unsigned long numBitsPerSample;
+	unsigned long sampleRate;
+
};

struct sTheoraFormatBlock {

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageHeader.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageHeader.cpp	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageHeader.cpp	2004-07-27 18:27:31 UTC (rev 7372)
@@ -245,7 +245,10 @@
void OggPageHeader::setSegmentTable(const unsigned char* inPtr, unsigned char inNumSegs) {
unsigned char* locSegTable = new unsigned char[inNumSegs];
memcpy((void*)locSegTable, (const void*)inPtr, inNumSegs);
+	delete mSegmentTable;
+	mSegmentTable = locSegTable;
mNumPageSegments = inNumSegs;
+	setHeaderSize(OggPageHeader::OGG_BASE_HEADER_SIZE + inNumSegs);
}
void OggPageHeader::setSegmentTable(unsigned char* inPtr) {
delete mSegmentTable;

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp	2004-07-27 18:27:31 UTC (rev 7372)
@@ -88,15 +88,30 @@
//mTheoraFormatBlock->frameRateDenominator = FLACMath::charArrToULong(locIdentHeader + 26);
} else if ((strncmp((char*)inOggPage->getPacket(0)->packetData(),  "fLaC", 4) == 0)) {
//mPacketCount--;
-			mNumHeaders = 2;
+			mNumHeaders = 1;
mSerialNoToTrack = inOggPage->header()->StreamSerialNo();
isFLAC = true;
-		} else if (isFLAC && (mSerialNoToTrack == inOggPage->header()->StreamSerialNo())) {
-			//Catch the second flac packet.
-			mSampleRate = FLACMath::charArrToULong(inOggPage->getPacket(0)->packetData() + 14) >> 12;
-			mFoundStreamInfo = true;
-		}else {
-			mFoundStreamInfo = true;
+		} else if (isFLAC && (mSerialNoToTrack == inOggPage->header()->StreamSerialNo()) ) {
+			//Loop any other packets
+
+			const int FLAC_LAST_HEADERS_FLAG = 128;
+			const int FLAC_HEADER_MASK = 127;
+			const int FLAC_STREAM_INFO_ID = 0;
+
+			//Note ::: Secondary condition in for statement.
+            for (int i = 0; i < inOggPage->numPackets(), !mFoundStreamInfo; i++) {
+				mNumHeaders++;
+				if ((inOggPage->getPacket(i)->packetData()[0] & FLAC_HEADER_MASK) == FLAC_STREAM_INFO_ID) {
+                    //Catch the stream info packet.
+                    mSampleRate = FLACMath::charArrToULong(inOggPage->getPacket(0)->packetData() + 14) >> 12;
+					//mFoundStreamInfo = true;
+				}
+				if ((inOggPage->getPacket(i)->packetData()[0] & FLAC_LAST_HEADERS_FLAG)) {
+					mFoundStreamInfo = true;
+				}
+			}
+		} else {
+			mFoundStreamInfo = true;		//Why do this ?
mEnabled = false;
mSampleRate = 1;


Modified: trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.cpp
===================================================================
--- trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.cpp	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/tools/OOOggValidate/OOOggValidate.cpp	2004-07-27 18:27:31 UTC (rev 7372)
@@ -5,187 +5,10 @@
#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_DATA_AFTER_VALID_STREAM,
-
-	OVE_SEQUENCE_NO_REPEATED,
-	OVE_SEQUENCE_NO_DECREASED
-};

-OggValidationState gValidationState;
-bool isValid = true;
-void error_write(short int inErrNo, OggPage* inOggPage, OggStreamValidationState* inStreamState) {
-
-	string locErrorString = "";
-	switch (inErrNo) {
-		case OVE_OK:
-			//Do nothing
-			return;
-			break;
-		case OVE_STRUCTURE_VERSION_NOT_ZERO:
-			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.";
-			break;
-		case OVE_MORE_THEN_ONE_EOS:
-			locErrorString = "More than one EOS page in stream.";
-			break;
-		case OVE_BOS_PAGE_NOT_AT_START:
-			locErrorString = "BOS found not as first page in stream.";
-			break;
-		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;
-
-
-
-		//Process errors
-		case OggDataBuffer::PROCESS_FAILED_TO_SET_HEADER:
-			locErrorString = "Lost Sync.";
-			break;
-		default:
-			locErrorString = "Unnamed Error";
-			break;
-
-	}
-
-	if (inStreamState != NULL) {
-        inStreamState->mErrorCount++;
-	}
-
-	cout << "ERROR "<<(int)inErrNo<<":  "<<locErrorString<<endl;
-
-}
-
-bool pageCB(OggPage* inOggPage) {
-	//Validate the page header
-
-
-	OggStreamValidationState* locStreamState = gValidationState.getStreamBySerialNo(inOggPage->header()->StreamSerialNo());
-
-	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;
-	}
-
-
-	//----------------------------------------------------------------------
-	//Verify structure version is 0 (RFC 3533 Sec. 6.1)
-	if (locHeader->StructureVersion() != 0) {
-		error_write(OVE_STRUCTURE_VERSION_NOT_ZERO, inOggPage, locStreamState);
-		isValid = false;
-	}
-	//----------------------------------------------------------------------
-	//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);
-			isValid = false;
-		}
-		//Check if this is the second or more BOS page.
-		if (locStreamState->mSeenBOS) {
-			error_write(OVE_MORE_THEN_ONE_BOS,inOggPage, locStreamState);
-			isValid = false;
-		}
-
-		locStreamState->mSeenBOS = true;
-
-	}
-
-	//----------------------------------------------------------------------
-	//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);
-			isValid = false;
-		}
-		//Check if this is the second or more BOS page.
-		if (locStreamState->mSeenEOS) {
-			error_write(OVE_MORE_THEN_ONE_EOS, inOggPage, locStreamState);
-			isValid = false;
-		}
-
-		locStreamState->mSeenEOS = true;
-	}
-
-	//----------------------------------------------------------------------
-	//Verify Granule pos
-	if (locHeader->GranulePos() != -1) {
-		//Check if the granule pos decreased.
-		if (locHeader->GranulePos() < locStreamState->mGranulePosUpto) {
-			error_write(OVE_GRANULE_POS_DECREASED, inOggPage, locStreamState);
-			isValid = false;
-		}
-
-
-		locStreamState->mGranulePosUpto = locHeader->GranulePos();
-
-	} else {
-		//No packets end here
-	}
-
-
-	//----------------------------------------------------------------------
-
-	//Verify sequence No
-	if (locHeader->PageSequenceNo() == locStreamState->mSequenceNoUpto) {
-		//error_write(OVE_SEQUENCE_NO_REPEATED, inOggPage, locStreamState);
-		//isValid = false;
-	} else if (locHeader->PageSequenceNo() < locStreamState->mSequenceNoUpto) {
-		error_write(OVE_SEQUENCE_NO_DECREASED, inOggPage, locStreamState);
-		isValid = false;
-	} else {
-		locStreamState->mSequenceNoUpto = locHeader->PageSequenceNo();
-	}
-	//----------------------------------------------------------------------
-
-	//----------------------------------------------------------------------
-	//----------------------------------------------------------------------
-	//----------------------------------------------------------------------
-
-
-	return isValid;;
-}
-
-
int __cdecl _tmain(int argc, _TCHAR* argv[])
{
//This program just dumps the pages out of a file in ogg format.
@@ -200,11 +23,13 @@
if (argc < 2) {
cout<<"Usage : OOOggValidate <filename>"<<endl;
} else {
+		OggValidationState testValidator;
OggDataBuffer testOggBuff;
-		OggCallbackRego* locCBRego = new OggCallbackRego(&pageCB);
-		const BUFF_SIZE = 8092;
-		testOggBuff.registerPageCallback(locCBRego);
+		testOggBuff.registerVirtualCallback(&testValidator);

+
+		const BUFF_SIZE = 8092;
+
fstream testFile;
testFile.open(argv[1], ios_base::in | ios_base::binary);
char* locBuff = new char[BUFF_SIZE];
@@ -214,37 +39,39 @@
unsigned long locBytesRead = testFile.gcount();
locResult = testOggBuff.feed((const unsigned char*)locBuff, locBytesRead);
switch(locResult) {
-				case OVE_OK:
+				case OggValidationState::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 OggValidationState::OVE_STRUCTURE_VERSION_NOT_ZERO:
+					testValidator.error_write(OggValidationState::OVE_STRUCTURE_VERSION_NOT_ZERO, NULL , NULL);
+					return OggValidationState::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 OggValidationState::OVE_MORE_THAN_ONE_BOS:
+					testValidator.error_write(OggValidationState::OVE_MORE_THAN_ONE_BOS, NULL, NULL);
+					return OggValidationState::OVE_MORE_THAN_ONE_BOS;

-				case OVE_MORE_THEN_ONE_EOS:
-					error_write(OVE_MORE_THEN_ONE_EOS, NULL, NULL);
-					return OVE_MORE_THEN_ONE_EOS;
+				case OggValidationState::OVE_MORE_THAN_ONE_EOS:
+					testValidator.error_write(OggValidationState::OVE_MORE_THAN_ONE_EOS, NULL, NULL);
+					return OggValidationState::OVE_MORE_THAN_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 OggValidationState::OVE_BOS_PAGE_NOT_AT_START:
+					testValidator.error_write(OggValidationState::OVE_BOS_PAGE_NOT_AT_START, NULL, NULL);
+					return OggValidationState::OVE_BOS_PAGE_NOT_AT_START;

-				case OVE_EOS_BEFORE_BOS:
-					error_write(OVE_EOS_BEFORE_BOS, NULL, NULL);
-					return OVE_EOS_BEFORE_BOS;
+				case OggValidationState::OVE_EOS_BEFORE_BOS:
+					testValidator.error_write(OggValidationState::OVE_EOS_BEFORE_BOS, NULL, NULL);
+					return OggValidationState::OVE_EOS_BEFORE_BOS;
default:
-					error_write(locResult, NULL, NULL);
+					testValidator.error_write(locResult, NULL, NULL);
return locResult;

}
}

-		if (isValid) {
+		if (testValidator.isValid()) {
cout<<"File was valid."<<endl;
+		} else {
+			cout<<"File is invalid."<<endl;
}
delete locBuff;
}

Modified: trunk/oggdsf/src/tools/OOOggValidate/OggStreamValidationState.cpp
===================================================================
--- trunk/oggdsf/src/tools/OOOggValidate/OggStreamValidationState.cpp	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/tools/OOOggValidate/OggStreamValidationState.cpp	2004-07-27 18:27:31 UTC (rev 7372)
@@ -10,6 +10,7 @@
,	mSeenAnything(false)
,	mErrorCount(0)
,	mWarningCount(0)
+	,	mState(VS_SEEN_NOTHING)
{
}


Modified: trunk/oggdsf/src/tools/OOOggValidate/OggStreamValidationState.h
===================================================================
--- trunk/oggdsf/src/tools/OOOggValidate/OggStreamValidationState.h	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/tools/OOOggValidate/OggStreamValidationState.h	2004-07-27 18:27:31 UTC (rev 7372)
@@ -6,12 +6,13 @@
OggStreamValidationState(void);
~OggStreamValidationState(void);

-	enum eValidationState {
+	enum eOggStreamValidationState {
VS_FULLY_VALID,

VS_SEEN_NOTHING,
VS_SEEN_BOS,
VS_SEEN_EOS,
+		VS_WAITING_FOR_CONTINUATION,
VS_INVALID

};
@@ -26,6 +27,6 @@
unsigned long mErrorCount;
unsigned long mWarningCount;

-	eValidationState mState;
+	eOggStreamValidationState mState;

};

Modified: trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.cpp
===================================================================
--- trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.cpp	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.cpp	2004-07-27 18:27:31 UTC (rev 7372)
@@ -2,6 +2,11 @@
#include ".\oggvalidationstate.h"

OggValidationState::OggValidationState(void)
+	:	mNumBOS(0)
+	,	mNumEOS(0)
+	,	mExpectingBOS(false)
+	,	mIsValid(false)
+	,	mState(FVS_SEEN_NOTHING)

{
}
@@ -40,4 +45,303 @@
return NULL;
}

-}
\ No newline at end of file
+}
+
+bool OggValidationState::notify(bool isBOS, bool isEOS) {
+	bool locOK = true;
+	if (mState == FVS_SEEN_NOTHING) {
+		mState = FVS_AWAITING_BOS;
+		//throw 0;
+	}
+
+	mIsValid = false;
+
+	if (isBOS) {
+		mNumBOS++;
+		if (mState == FVS_AWAITING_BOS) {
+			//Valid case.
+
+		} else {
+			//Unexpected BOS page.
+			mState = FVS_INVALID;
+			locOK = false;
+		}
+
+		if (mNumBOS == mNumEOS) {
+			//Start of chain
+		}
+	}
+
+	if (isEOS) {
+		mNumEOS++;
+		if (mState == FVS_AWAITING_BOS || mState == FVS_AWAITING_EOS) {
+
+			if (mNumBOS == mNumEOS) {
+				//Valid case. Chain.
+				//If this EOS balanced the eos = bos then we can accept bos pages again.
+				mState = FVS_AWAITING_BOS;
+
+
+				if (mStreams.size() != 0) {
+					mIsValid = true;
+					for (int i = 0; i < mStreams.size(); i++) {
+						mIsValid &= (mStreams[i]->mState == OggStreamValidationState::VS_FULLY_VALID);
+					}
+				}
+			} else {
+				mState = FVS_AWAITING_EOS;
+			}
+		} else {
+			mState = FVS_INVALID;
+			locOK = false;
+		}
+
+		//Check for entire stream validity
+
+
+	}
+
+	if (!isBOS && !isEOS) {
+		//This is used because BOS pages must follow each other, after a non BOS page, no more BOS
+		// pages can occur until all currently open streams have seen an EOS.
+		if (mState == FVS_AWAITING_BOS || mState == FVS_AWAITING_EOS) {
+			//Valid case.
+			//This happens the first non-bos, non-eos page, when in awaiting BOS state.
+
+			mState = FVS_AWAITING_EOS;
+		} else {
+
+			mState = FVS_INVALID;
+			locOK = false;
+		}
+	}
+
+	return mIsValid;
+
+}
+
+bool OggValidationState::isValid() {
+	return mIsValid;
+}
+bool OggValidationState::acceptOggPage(OggPage* inOggPage) {
+	//Validate the page header
+
+
+	OggStreamValidationState* locStreamState = getStreamBySerialNo(inOggPage->header()->StreamSerialNo());
+
+	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);
+		mIsValid = false;
+		locStreamState->mState = OggStreamValidationState::VS_INVALID;
+		//Should return ?
+	}
+
+	const int UNUSED_HEADER_MASK =  248; //11111000
+	const int OGG_FLAG_CONTINUATION = 1;
+	if ((locHeader->HeaderFlags() & UNUSED_HEADER_MASK) != 0) {
+		//Unused header bits are set.
+		error_write(OVE_UNUSED_HEADER_BITS_SET, inOggPage, locStreamState);
+		mIsValid = false;
+		locStreamState->mState = OggStreamValidationState::VS_INVALID;
+	}
+
+	if (locStreamState->mState == OggStreamValidationState::VS_WAITING_FOR_CONTINUATION) {
+		//Last page had an incomplete packet, so expecting a continuation flag on this page
+		if ((locHeader->HeaderFlags() & OGG_FLAG_CONTINUATION) != 0) {
+			//Valid case.
+
+			//Got the continuation we were expecting.
+			locStreamState->mState = OggStreamValidationState::VS_SEEN_BOS;
+		} else {
+			//There should have been a continuation flag here.
+			error_write(OVE_CONTINUATION_FLAG_EXPECTED, inOggPage, locStreamState);
+			mIsValid = false;
+			locStreamState->mState = OggStreamValidationState::VS_INVALID;
+		}
+	} else {
+		if ((locHeader->HeaderFlags() & OGG_FLAG_CONTINUATION) != 0) {
+			//We have a continuation flag we weren't expecting.
+			error_write(OVE_UNEXPECTED_CONTINUATION_FLAG, inOggPage, locStreamState);
+			mIsValid = false;
+			locStreamState->mState = OggStreamValidationState::VS_INVALID;
+
+		}
+	}
+
+
+	//----------------------------------------------------------------------
+	//Verify structure version is 0 (RFC 3533 Sec. 6.1)
+	if (locHeader->StructureVersion() != 0) {
+		error_write(OVE_STRUCTURE_VERSION_NOT_ZERO, inOggPage, locStreamState);
+		mIsValid = false;
+	}
+	//----------------------------------------------------------------------
+	//Verify BOS integrity.
+
+	if (locHeader->isBOS()) {
+		//Add a BOS to the tally.
+
+
+		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);
+			mIsValid = false;
+		}
+		//Check if this is the second or more BOS page.
+		if (locStreamState->mSeenBOS) {
+			error_write(OVE_MORE_THAN_ONE_BOS,inOggPage, locStreamState);
+			mIsValid = false;
+		}
+
+		locStreamState->mSeenBOS = true;
+
+	}
+
+	//----------------------------------------------------------------------
+	//Verify EOS integrity
+	if (locHeader->isEOS()) {
+		//Add a BOS to the tally.
+
+
+		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);
+			mIsValid = false;
+		}
+		//Check if this is the second or more BOS page.
+		if (locStreamState->mSeenEOS) {
+			error_write(OVE_MORE_THAN_ONE_EOS, inOggPage, locStreamState);
+			mIsValid = false;
+		}
+
+		locStreamState->mSeenEOS = true;
+	}
+
+	//----------------------------------------------------------------------
+	//Verify Granule pos
+	if (locHeader->GranulePos() != -1) {
+		//Check if the granule pos decreased.
+		if (locHeader->GranulePos() < locStreamState->mGranulePosUpto) {
+			error_write(OVE_GRANULE_POS_DECREASED, inOggPage, locStreamState);
+			mIsValid = false;
+		}
+
+
+		locStreamState->mGranulePosUpto = locHeader->GranulePos();
+
+	} else {
+		//No packets end here
+	}
+
+
+	//----------------------------------------------------------------------
+
+	//Verify sequence No
+	if (locHeader->PageSequenceNo() == locStreamState->mSequenceNoUpto) {
+		//error_write(OVE_SEQUENCE_NO_REPEATED, inOggPage, locStreamState);
+		//mIsValid = false;
+	} else if (locHeader->PageSequenceNo() < locStreamState->mSequenceNoUpto) {
+		error_write(OVE_SEQUENCE_NO_DECREASED, inOggPage, locStreamState);
+		mIsValid = false;
+	} else {
+		locStreamState->mSequenceNoUpto = locHeader->PageSequenceNo();
+	}
+	//----------------------------------------------------------------------
+
+	//----------------------------------------------------------------------
+
+	//Check for incomplete last packet
+	if (inOggPage->numPackets() > 0) {
+		if (inOggPage->getPacket(inOggPage->numPackets() - 1)->isComplete() == false)  {
+			//Valid case
+			//If the last packet is incomplete.
+			if (OggStreamValidationState::VS_SEEN_BOS) {
+				locStreamState->mState = OggStreamValidationState::VS_WAITING_FOR_CONTINUATION;
+			} else {
+				//Does this mean anythign ?
+			}
+		}
+	}
+	//----------------------------------------------------------------------
+	//----------------------------------------------------------------------
+
+
+	notify(inOggPage->header()->isBOS(), inOggPage->header()->isEOS());
+	return true;
+}
+
+OggValidationState::eOggValidationState OggValidationState::validationState() {
+	return mState;
+}
+void OggValidationState::error_write(short int inErrNo, OggPage* inOggPage, OggStreamValidationState* inStreamState) {
+
+	string locErrorString = "";
+	switch (inErrNo) {
+		case OVE_OK:
+			//Do nothing
+			return;
+			break;
+		case OVE_STRUCTURE_VERSION_NOT_ZERO:
+			locErrorString = (int)inOggPage->header()->StructureVersion();
+			locErrorString = "Structure version(" + locErrorString +") is not 0, (RFC 3533 Sec. 6.1)";
+			break;
+		case OVE_MORE_THAN_ONE_BOS:
+			locErrorString = "More than one BOS page in stream.";
+			break;
+		case OVE_MORE_THAN_ONE_EOS:
+			locErrorString = "More than one EOS page in stream.";
+			break;
+		case OVE_BOS_PAGE_NOT_AT_START:
+			locErrorString = "BOS found not as first page in stream.";
+			break;
+		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;
+		case OVE_UNUSED_HEADER_BITS_SET:
+			locErrorString = "One or more unused header flags (XXXXXebc) are set.";
+			break;
+		case OVE_CONTINUATION_FLAG_EXPECTED:
+			locErrorString = "Page did not set continuation flag after incomplete packet.";
+			break;
+		case OVE_UNEXPECTED_CONTINUATION_FLAG:
+			locErrorString = "Continuation flag with no previous incomplete packet.";
+			break;
+
+		//Process errors
+		case OggDataBuffer::PROCESS_FAILED_TO_SET_HEADER:
+			locErrorString = "Lost Sync.";
+			break;
+		default:
+			locErrorString = "Unnamed Error";
+			break;
+
+	}
+
+	if (inStreamState != NULL) {
+        inStreamState->mErrorCount++;
+	}
+
+	cout << "ERROR "<<(int)inErrNo<<":  "<<locErrorString<<endl;
+
+}
+
+

Modified: trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.h
===================================================================
--- trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.h	2004-07-27 18:26:05 UTC (rev 7371)
+++ trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.h	2004-07-27 18:27:31 UTC (rev 7372)
@@ -2,17 +2,66 @@
#include <vector>
using namespace std;

+#include "libOOOgg.h"
#include "OggStreamValidationState.h"
class OggValidationState
+	:	public IOggCallback
{
public:
OggValidationState(void);
-	~OggValidationState(void);
+	virtual ~OggValidationState(void);
+	enum eOggValidationErrors {
+		OVE_OK,

+		OVE_STRUCTURE_VERSION_NOT_ZERO,
+
+		OVE_GRANULE_POS_DECREASED,
+
+		OVE_MORE_THAN_ONE_BOS,
+		OVE_BOS_PAGE_NOT_AT_START,
+
+		OVE_MORE_THAN_ONE_EOS,
+		OVE_EOS_BEFORE_BOS,
+
+		OVE_DATA_AFTER_VALID_STREAM,
+
+		OVE_SEQUENCE_NO_REPEATED,
+		OVE_SEQUENCE_NO_DECREASED,
+
+		OVE_UNUSED_HEADER_BITS_SET,
+		OVE_CONTINUATION_FLAG_EXPECTED,
+		OVE_UNEXPECTED_CONTINUATION_FLAG,
+
+		OVE_BOS_
+	};
+	enum eOggValidationState {
+		FVS_OK,
+		FVS_SEEN_NOTHING,
+		FVS_AWAITING_BOS,
+		FVS_AWAITING_EOS,
+		FVS_INVALID
+	};
+
+
+
+	//IOggCallback
+	virtual bool acceptOggPage(OggPage* inOggPage);
+
OggStreamValidationState* getStream(unsigned long inIndex);
OggStreamValidationState* getStreamBySerialNo(unsigned long inSerialNo);
unsigned long numStreams();
vector<OggStreamValidationState*> mStreams;
+
+	bool notify(bool inIsBOS, bool inIsEOS);
+	void error_write(short int inErrNo, OggPage* inOggPage, OggStreamValidationState* inStreamState);
+
+	eOggValidationState validationState();
+
+	bool isValid();
protected:
-
+	bool mExpectingBOS;
+	unsigned long mNumBOS;
+	unsigned long mNumEOS;
+	bool mIsValid;
+	eOggValidationState mState;
};



More information about the commits mailing list