[xiph-commits] r7736 - in trunk/oggdsf: build/libOOOggWithToolsAndTests sln/oggdsf_all src/lib/codecs/speex/filters/dsfSpeexEncoder src/lib/codecs/theora/filters/dsfTheoraDecoder src/lib/codecs/theora/filters/dsfTheoraEncoder src/lib/core/ogg/libOOOgg src/tests src/tests/testMuxDemux src/tests/testOOOggMux

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Fri Sep 10 21:59:13 PDT 2004


Author: illiminable
Date: 2004-09-10 21:59:13 -0700 (Fri, 10 Sep 2004)
New Revision: 7736

Added:
   trunk/oggdsf/src/tests/testOOOggMux/
   trunk/oggdsf/src/tests/testOOOggMux/ReadMe.txt
   trunk/oggdsf/src/tests/testOOOggMux/stdafx.cpp
   trunk/oggdsf/src/tests/testOOOggMux/stdafx.h
   trunk/oggdsf/src/tests/testOOOggMux/testOOOggMux.cpp
   trunk/oggdsf/src/tests/testOOOggMux/testOOOggMux.vcproj
Modified:
   trunk/oggdsf/build/libOOOggWithToolsAndTests/libOOOggWithToolsAndTests.vdproj
   trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
   trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexEncoder/SpeexEncodeInputPin.cpp
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.h
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.cpp
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.h
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.h
   trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp
   trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.h
   trunk/oggdsf/src/tests/testMuxDemux/testMuxDemux.cpp
   trunk/oggdsf/src/tests/testMuxDemux/testMuxDemux.vcproj
Log:
* Fixed a bug in the muxer, which was miscalculating the segment table and page size
* Added a test program for it.

Modified: trunk/oggdsf/build/libOOOggWithToolsAndTests/libOOOggWithToolsAndTests.vdproj
===================================================================
--- trunk/oggdsf/build/libOOOggWithToolsAndTests/libOOOggWithToolsAndTests.vdproj	2004-09-10 19:54:55 UTC (rev 7735)
+++ trunk/oggdsf/build/libOOOggWithToolsAndTests/libOOOggWithToolsAndTests.vdproj	2004-09-11 04:59:13 UTC (rev 7736)
@@ -21,126 +21,132 @@
         }
         "Entry"
         {
-        "MsmKey" = "8:_26C0712619CB412782A4FF601E1D24E9"
+        "MsmKey" = "8:_33A59244EB2841E5B6DD26D2B0A96CA0"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_33A59244EB2841E5B6DD26D2B0A96CA0"
+        "MsmKey" = "8:_9061237CE81A4BAC9A988D1713DCE01A"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_45EEB2ABD3B945CBBE00F6347A15AEC4"
-        "OwnerKey" = "8:_15D86BBDBB4144F5959F2C5175939D6C"
+        "MsmKey" = "8:_9BF479E16E8E489CA7D9F11A166F5612"
+        "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_45EEB2ABD3B945CBBE00F6347A15AEC4"
-        "OwnerKey" = "8:_FC3DA72FCAAA4F0E8B31462D44B32FD6"
+        "MsmKey" = "8:_9EB1B54CEB1D40979ADA34E55D07BB22"
+        "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_45EEB2ABD3B945CBBE00F6347A15AEC4"
-        "OwnerKey" = "8:_DFF78663650B4CF0A485185D63D04FB5"
+        "MsmKey" = "8:_BBD7397A8E5F1E7433D3C7836DB3EE7F"
+        "OwnerKey" = "8:_15D86BBDBB4144F5959F2C5175939D6C"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_45EEB2ABD3B945CBBE00F6347A15AEC4"
-        "OwnerKey" = "8:_9EB1B54CEB1D40979ADA34E55D07BB22"
+        "MsmKey" = "8:_BBD7397A8E5F1E7433D3C7836DB3EE7F"
+        "OwnerKey" = "8:_C0BA320CDA794057812E2CF28F5EA94C"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_45EEB2ABD3B945CBBE00F6347A15AEC4"
-        "OwnerKey" = "8:_9BF479E16E8E489CA7D9F11A166F5612"
+        "MsmKey" = "8:_BBD7397A8E5F1E7433D3C7836DB3EE7F"
+        "OwnerKey" = "8:_FC3DA72FCAAA4F0E8B31462D44B32FD6"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_45EEB2ABD3B945CBBE00F6347A15AEC4"
-        "OwnerKey" = "8:_9061237CE81A4BAC9A988D1713DCE01A"
+        "MsmKey" = "8:_BBD7397A8E5F1E7433D3C7836DB3EE7F"
+        "OwnerKey" = "8:_DFF78663650B4CF0A485185D63D04FB5"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_45EEB2ABD3B945CBBE00F6347A15AEC4"
-        "OwnerKey" = "8:_33A59244EB2841E5B6DD26D2B0A96CA0"
+        "MsmKey" = "8:_BBD7397A8E5F1E7433D3C7836DB3EE7F"
+        "OwnerKey" = "8:_9EB1B54CEB1D40979ADA34E55D07BB22"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_733563A25AA646E7AA97BBD3DFD743B6"
-        "OwnerKey" = "8:_15D86BBDBB4144F5959F2C5175939D6C"
+        "MsmKey" = "8:_BBD7397A8E5F1E7433D3C7836DB3EE7F"
+        "OwnerKey" = "8:_9BF479E16E8E489CA7D9F11A166F5612"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_733563A25AA646E7AA97BBD3DFD743B6"
-        "OwnerKey" = "8:_FC3DA72FCAAA4F0E8B31462D44B32FD6"
+        "MsmKey" = "8:_BBD7397A8E5F1E7433D3C7836DB3EE7F"
+        "OwnerKey" = "8:_9061237CE81A4BAC9A988D1713DCE01A"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_733563A25AA646E7AA97BBD3DFD743B6"
-        "OwnerKey" = "8:_DFF78663650B4CF0A485185D63D04FB5"
+        "MsmKey" = "8:_BBD7397A8E5F1E7433D3C7836DB3EE7F"
+        "OwnerKey" = "8:_33A59244EB2841E5B6DD26D2B0A96CA0"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_733563A25AA646E7AA97BBD3DFD743B6"
-        "OwnerKey" = "8:_9EB1B54CEB1D40979ADA34E55D07BB22"
+        "MsmKey" = "8:_C0BA320CDA794057812E2CF28F5EA94C"
+        "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_733563A25AA646E7AA97BBD3DFD743B6"
-        "OwnerKey" = "8:_9BF479E16E8E489CA7D9F11A166F5612"
+        "MsmKey" = "8:_DCF47080823151CD8BF79A8AE0EA1C5D"
+        "OwnerKey" = "8:_15D86BBDBB4144F5959F2C5175939D6C"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_733563A25AA646E7AA97BBD3DFD743B6"
-        "OwnerKey" = "8:_9061237CE81A4BAC9A988D1713DCE01A"
+        "MsmKey" = "8:_DCF47080823151CD8BF79A8AE0EA1C5D"
+        "OwnerKey" = "8:_C0BA320CDA794057812E2CF28F5EA94C"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_733563A25AA646E7AA97BBD3DFD743B6"
-        "OwnerKey" = "8:_33A59244EB2841E5B6DD26D2B0A96CA0"
+        "MsmKey" = "8:_DCF47080823151CD8BF79A8AE0EA1C5D"
+        "OwnerKey" = "8:_FC3DA72FCAAA4F0E8B31462D44B32FD6"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_9061237CE81A4BAC9A988D1713DCE01A"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_DCF47080823151CD8BF79A8AE0EA1C5D"
+        "OwnerKey" = "8:_DFF78663650B4CF0A485185D63D04FB5"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_9BF479E16E8E489CA7D9F11A166F5612"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_DCF47080823151CD8BF79A8AE0EA1C5D"
+        "OwnerKey" = "8:_9EB1B54CEB1D40979ADA34E55D07BB22"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_9EB1B54CEB1D40979ADA34E55D07BB22"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_DCF47080823151CD8BF79A8AE0EA1C5D"
+        "OwnerKey" = "8:_9BF479E16E8E489CA7D9F11A166F5612"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
-        "MsmKey" = "8:_C0BA320CDA794057812E2CF28F5EA94C"
-        "OwnerKey" = "8:_UNDEFINED"
+        "MsmKey" = "8:_DCF47080823151CD8BF79A8AE0EA1C5D"
+        "OwnerKey" = "8:_9061237CE81A4BAC9A988D1713DCE01A"
         "MsmSig" = "8:_UNDEFINED"
         }
         "Entry"
         {
+        "MsmKey" = "8:_DCF47080823151CD8BF79A8AE0EA1C5D"
+        "OwnerKey" = "8:_33A59244EB2841E5B6DD26D2B0A96CA0"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
         "MsmKey" = "8:_DFF78663650B4CF0A485185D63D04FB5"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
@@ -247,6 +253,46 @@
         }
         "File"
         {
+            "{A582A373-4685-4296-BEFE-614B80A702C3}:_BBD7397A8E5F1E7433D3C7836DB3EE7F"
+            {
+            "SourcePath" = "8:MSVCR71D.dll"
+            "TargetName" = "8:MSVCR71D.dll"
+            "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:TRUE"
+            "IsolateTo" = "8:"
+            }
+            "{A582A373-4685-4296-BEFE-614B80A702C3}:_DCF47080823151CD8BF79A8AE0EA1C5D"
+            {
+            "SourcePath" = "8:MSVCP71D.dll"
+            "TargetName" = "8:MSVCP71D.dll"
+            "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:TRUE"
+            "IsolateTo" = "8:"
+            }
         }
         "FileType"
         {
@@ -800,40 +846,12 @@
         }
         "MergeModule"
         {
-            "{35A69C6E-5BA4-440D-803D-762B59A45393}:_45EEB2ABD3B945CBBE00F6347A15AEC4"
-            {
-            "UseDynamicProperties" = "11:TRUE"
-            "IsDependency" = "11:TRUE"
-            "SourcePath" = "8:vc_user_crt71_rtl_x86_---.msm"
-                "Properties"
-                {
-                }
-            "LanguageId" = "3:0"
-            "Exclude" = "11:FALSE"
-            "Folder" = "8:"
-            "Feature" = "8:"
-            "IsolateTo" = "8:"
-            }
-            "{35A69C6E-5BA4-440D-803D-762B59A45393}:_733563A25AA646E7AA97BBD3DFD743B6"
-            {
-            "UseDynamicProperties" = "11:TRUE"
-            "IsDependency" = "11:TRUE"
-            "SourcePath" = "8:vc_user_stl71_rtl_x86_---.msm"
-                "Properties"
-                {
-                }
-            "LanguageId" = "3:0"
-            "Exclude" = "11:FALSE"
-            "Folder" = "8:"
-            "Feature" = "8:"
-            "IsolateTo" = "8:"
-            }
         }
         "ProjectOutput"
         {
             "{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_15D86BBDBB4144F5959F2C5175939D6C"
             {
-            "SourcePath" = "8:..\\..\\src\\lib\\helper\\libillicore\\release_sse\\libilliCore.dll"
+            "SourcePath" = "8:..\\..\\src\\lib\\helper\\libilliCore\\Debug\\libilliCore.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_ADE7E20E4D77439FB3A1B61B3F803F3B"
@@ -859,37 +877,9 @@
                 {
                 }
             }
-            "{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_26C0712619CB412782A4FF601E1D24E9"
-            {
-            "SourcePath" = "8:..\\..\\src\\tools\\OOOggPacketise\\Debug\\OOOggPacketise.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:{463B5ED7-C6A3-4343-BA67-B324580BEC70}"
-            "ShowKeyOutput" = "11:TRUE"
-                "ExcludeFilters"
-                {
-                }
-            }
             "{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_33A59244EB2841E5B6DD26D2B0A96CA0"
             {
-            "SourcePath" = "8:..\\..\\src\\tools\\oooggcommentdump\\release_sse\\OOOggCommentDump.exe"
+            "SourcePath" = "8:..\\..\\src\\tools\\OOOggCommentDump\\Debug\\OOOggCommentDump.exe"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_ADE7E20E4D77439FB3A1B61B3F803F3B"
@@ -917,7 +907,7 @@
             }
             "{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_9061237CE81A4BAC9A988D1713DCE01A"
             {
-            "SourcePath" = "8:..\\..\\src\\tools\\oooggvalidate\\release_sse\\OOOggValidate.exe"
+            "SourcePath" = "8:..\\..\\src\\tools\\OOOggValidate\\Debug\\OOOggValidate.exe"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_ADE7E20E4D77439FB3A1B61B3F803F3B"
@@ -945,7 +935,7 @@
             }
             "{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_9BF479E16E8E489CA7D9F11A166F5612"
             {
-            "SourcePath" = "8:..\\..\\src\\tools\\oooggdump\\release_sse\\OOOggDump.exe"
+            "SourcePath" = "8:..\\..\\src\\tools\\OOOggDump\\Debug\\OOOggDump.exe"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_ADE7E20E4D77439FB3A1B61B3F803F3B"
@@ -973,7 +963,7 @@
             }
             "{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_9EB1B54CEB1D40979ADA34E55D07BB22"
             {
-            "SourcePath" = "8:..\\..\\src\\lib\\core\\ogg\\libooogg\\release_sse\\libOOOgg.dll"
+            "SourcePath" = "8:..\\..\\src\\lib\\core\\ogg\\libOOOgg\\Debug\\libOOOgg.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_ADE7E20E4D77439FB3A1B61B3F803F3B"
@@ -1001,7 +991,7 @@
             }
             "{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_C0BA320CDA794057812E2CF28F5EA94C"
             {
-            "SourcePath" = "8:..\\..\\src\\tests\\testcirclebuffer\\release_sse\\testCircleBuffer.exe"
+            "SourcePath" = "8:..\\..\\src\\tests\\testCircleBuffer\\Debug\\testCircleBuffer.exe"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_ADE7E20E4D77439FB3A1B61B3F803F3B"
@@ -1029,7 +1019,7 @@
             }
             "{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_DFF78663650B4CF0A485185D63D04FB5"
             {
-            "SourcePath" = "8:..\\..\\src\\tools\\oooggstat\\release_sse\\OOOggStat.exe"
+            "SourcePath" = "8:..\\..\\src\\tools\\OOOggStat\\Debug\\OOOggStat.exe"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_ADE7E20E4D77439FB3A1B61B3F803F3B"
@@ -1057,7 +1047,7 @@
             }
             "{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_E2B7419C787246EDA72E0A9CF0D1D7E4"
             {
-            "SourcePath" = "8:..\\..\\src\\tests\\testmuxdemux\\debug\\testMuxDemux.exe"
+            "SourcePath" = "8:..\\..\\src\\tests\\testMuxDemux\\Debug\\testMuxDemux.exe"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_ADE7E20E4D77439FB3A1B61B3F803F3B"
@@ -1085,7 +1075,7 @@
             }
             "{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_FC3DA72FCAAA4F0E8B31462D44B32FD6"
             {
-            "SourcePath" = "8:..\\..\\src\\lib\\core\\ogg\\libvorbiscomment\\release_sse\\libVorbisComment.dll"
+            "SourcePath" = "8:..\\..\\src\\lib\\core\\ogg\\libVorbisComment\\Debug\\libVorbisComment.dll"
             "TargetName" = "8:"
             "Tag" = "8:"
             "Folder" = "8:_ADE7E20E4D77439FB3A1B61B3F803F3B"

Modified: trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
===================================================================
--- trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln	2004-09-10 19:54:55 UTC (rev 7735)
+++ trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln	2004-09-11 04:59:13 UTC (rev 7736)
@@ -1126,6 +1126,15 @@
 		{2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4} = {2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4}
 	EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testMuxDemux", "..\..\src\tests\testMuxDemux\testMuxDemux.vcproj", "{2D6BB64D-E64A-4E99-A4E8-A235C8085432}"
+	ProjectSection(ProjectDependencies) = postProject
+		{223ACC19-608E-4E1B-A054-067F0CACB272} = {223ACC19-608E-4E1B-A054-067F0CACB272}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testOOOggMux", "..\..\src\tests\testOOOggMux\testOOOggMux.vcproj", "{C2DBE955-C193-4BEC-A2E8-AB67153CD3EF}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfiguration) = preSolution
 		Debug = Debug
@@ -2045,6 +2054,38 @@
 		{053D669F-E874-44C6-9705-8A1DEF40C4E9}.Release_SSE.Build.0 = Release|Win32
 		{053D669F-E874-44C6-9705-8A1DEF40C4E9}.Release_SSE2.ActiveCfg = Release|Win32
 		{053D669F-E874-44C6-9705-8A1DEF40C4E9}.Release_SSE2.Build.0 = Release|Win32
+		{2D6BB64D-E64A-4E99-A4E8-A235C8085432}.Debug.ActiveCfg = Debug|Win32
+		{2D6BB64D-E64A-4E99-A4E8-A235C8085432}.Debug.Build.0 = Debug|Win32
+		{2D6BB64D-E64A-4E99-A4E8-A235C8085432}.Debug Unicode.ActiveCfg = Debug|Win32
+		{2D6BB64D-E64A-4E99-A4E8-A235C8085432}.Debug Unicode.Build.0 = Debug|Win32
+		{2D6BB64D-E64A-4E99-A4E8-A235C8085432}.MakeFile.ActiveCfg = Release|Win32
+		{2D6BB64D-E64A-4E99-A4E8-A235C8085432}.MakeFile.Build.0 = Release|Win32
+		{2D6BB64D-E64A-4E99-A4E8-A235C8085432}.Release.ActiveCfg = Release|Win32
+		{2D6BB64D-E64A-4E99-A4E8-A235C8085432}.Release.Build.0 = Release|Win32
+		{2D6BB64D-E64A-4E99-A4E8-A235C8085432}.Release Unicode.ActiveCfg = Release|Win32
+		{2D6BB64D-E64A-4E99-A4E8-A235C8085432}.Release Unicode.Build.0 = Release|Win32
+		{2D6BB64D-E64A-4E99-A4E8-A235C8085432}.Release_NoDotNET.ActiveCfg = Release|Win32
+		{2D6BB64D-E64A-4E99-A4E8-A235C8085432}.Release_NoDotNET.Build.0 = Release|Win32
+		{2D6BB64D-E64A-4E99-A4E8-A235C8085432}.Release_SSE.ActiveCfg = Release|Win32
+		{2D6BB64D-E64A-4E99-A4E8-A235C8085432}.Release_SSE.Build.0 = Release|Win32
+		{2D6BB64D-E64A-4E99-A4E8-A235C8085432}.Release_SSE2.ActiveCfg = Release|Win32
+		{2D6BB64D-E64A-4E99-A4E8-A235C8085432}.Release_SSE2.Build.0 = Release|Win32
+		{C2DBE955-C193-4BEC-A2E8-AB67153CD3EF}.Debug.ActiveCfg = Debug|Win32
+		{C2DBE955-C193-4BEC-A2E8-AB67153CD3EF}.Debug.Build.0 = Debug|Win32
+		{C2DBE955-C193-4BEC-A2E8-AB67153CD3EF}.Debug Unicode.ActiveCfg = Debug|Win32
+		{C2DBE955-C193-4BEC-A2E8-AB67153CD3EF}.Debug Unicode.Build.0 = Debug|Win32
+		{C2DBE955-C193-4BEC-A2E8-AB67153CD3EF}.MakeFile.ActiveCfg = Release|Win32
+		{C2DBE955-C193-4BEC-A2E8-AB67153CD3EF}.MakeFile.Build.0 = Release|Win32
+		{C2DBE955-C193-4BEC-A2E8-AB67153CD3EF}.Release.ActiveCfg = Release|Win32
+		{C2DBE955-C193-4BEC-A2E8-AB67153CD3EF}.Release.Build.0 = Release|Win32
+		{C2DBE955-C193-4BEC-A2E8-AB67153CD3EF}.Release Unicode.ActiveCfg = Release|Win32
+		{C2DBE955-C193-4BEC-A2E8-AB67153CD3EF}.Release Unicode.Build.0 = Release|Win32
+		{C2DBE955-C193-4BEC-A2E8-AB67153CD3EF}.Release_NoDotNET.ActiveCfg = Release|Win32
+		{C2DBE955-C193-4BEC-A2E8-AB67153CD3EF}.Release_NoDotNET.Build.0 = Release|Win32
+		{C2DBE955-C193-4BEC-A2E8-AB67153CD3EF}.Release_SSE.ActiveCfg = Release|Win32
+		{C2DBE955-C193-4BEC-A2E8-AB67153CD3EF}.Release_SSE.Build.0 = Release|Win32
+		{C2DBE955-C193-4BEC-A2E8-AB67153CD3EF}.Release_SSE2.ActiveCfg = Release|Win32
+		{C2DBE955-C193-4BEC-A2E8-AB67153CD3EF}.Release_SSE2.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionItems) = postSolution
 	EndGlobalSection

Modified: trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexEncoder/SpeexEncodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexEncoder/SpeexEncodeInputPin.cpp	2004-09-10 19:54:55 UTC (rev 7735)
+++ trunk/oggdsf/src/lib/codecs/speex/filters/dsfSpeexEncoder/SpeexEncodeInputPin.cpp	2004-09-11 04:59:13 UTC (rev 7736)
@@ -52,7 +52,7 @@
 
 	//debugLog << "encodeData receives : "<<inNumBytes<<" bytes"<<endl;
 	
-	float* locFloatBuf = new float[inNumBytes/2];
+	float* locFloatBuf = new float[inNumBytes/2 + (inNumBytes % 2)];
 	short locTempShort = 0;
 	float locTempFloat = 0;
 

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp	2004-09-10 19:54:55 UTC (rev 7735)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.cpp	2004-09-11 04:59:13 UTC (rev 7736)
@@ -36,13 +36,44 @@
 TheoraDecodeInputPin::TheoraDecodeInputPin(CTransformFilter* inParentFilter, HRESULT* outHR) 
 	:	CTransformInputPin(NAME("Theora Input Pin"), inParentFilter, outHR, L"Theora In")
 {
-
+	debugLog.open("G:\\logs\\theoinput.log", ios_base::out);
 }
 TheoraDecodeInputPin::~TheoraDecodeInputPin() {
-
+	debugLog.close();
 }
 
+//STDMETHODIMP TheoraDecodeInputPin::NonDelegatingQueryInterface(REFIID riid, void **ppv) {
+//	debugLog<<"Querying interface"<<endl;
+//	if (riid == IID_IMediaSeeking) {
+//		debugLog<<"Got Seeker"<<endl;
+//		*ppv = (IMediaSeeking*)this;
+//		((IUnknown*)*ppv)->AddRef();
+//		
+//		return NOERROR;
+//	}
+//
+//	return CTransformInputPin::NonDelegatingQueryInterface(riid, ppv); 
+//}
 
+//HRESULT TheoraDecodeInputPin::BreakConnect() {
+//	CAutoLock locLock(m_pLock);
+//	debugLog<<"Break conenct"<<endl;
+//	//Need a lock ??
+//	ReleaseDelegate();
+//	return CTransformInputPin::BreakConnect();
+//}
+//HRESULT TheoraDecodeInputPin::CompleteConnect (IPin *inReceivePin) {
+//	CAutoLock locLock(m_pLock);
+//	debugLog<<"Complete conenct"<<endl;
+//	IMediaSeeking* locSeeker = NULL;
+//	inReceivePin->QueryInterface(IID_IMediaSeeking, (void**)&locSeeker);
+//	if (locSeeker == NULL) {
+//		debugLog<<"Seeker is null"<<endl;
+//	}
+//	SetDelegate(locSeeker);
+//	return CTransformInputPin::CompleteConnect(inReceivePin);
+//}
+
 //----------------------
 //OLD IMPLEMENTATION
 //----------------------

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.h	2004-09-10 19:54:55 UTC (rev 7735)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeInputPin.h	2004-09-11 04:59:13 UTC (rev 7736)
@@ -31,15 +31,28 @@
 
 #pragma once
 #include "Theoradecoderdllstuff.h"
+#include "BasicSeekable.h"
+
+#include <fstream>
+using namespace std;
 class TheoraDecodeInputPin 
 	:	public CTransformInputPin
+	//,	public BasicSeekable
 {
 public:
 
 	TheoraDecodeInputPin(CTransformFilter* inParentFilter, HRESULT* outHR);
 	virtual ~TheoraDecodeInputPin();
 
+	//COM Guff
+	//DECLARE_IUNKNOWN
+	//STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
 
+	//Overrides
+	//virtual HRESULT BreakConnect();
+	//virtual HRESULT CompleteConnect (IPin *inReceivePin);
+
+	fstream debugLog;
 };
 //----------------------
 //OLD IMPLEMENTATION

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.cpp	2004-09-10 19:54:55 UTC (rev 7735)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.cpp	2004-09-11 04:59:13 UTC (rev 7736)
@@ -37,13 +37,45 @@
 TheoraDecodeOutputPin::TheoraDecodeOutputPin(CTransformFilter* inParentFilter, HRESULT* outHR) 
 	:	CTransformOutputPin(NAME("Theora Output Pin"), inParentFilter, outHR, L"YV12 Out")
 {
-
+	debugLog.open("G:\\logs\\theooutput.log", ios_base::out);
 }
 TheoraDecodeOutputPin::~TheoraDecodeOutputPin() {
-
+	debugLog.close();
 }
 
+//STDMETHODIMP TheoraDecodeOutputPin::NonDelegatingQueryInterface(REFIID riid, void **ppv) {
+//	debugLog<<"Querying interface"<<endl;
+//	if (riid == IID_IMediaSeeking) {
+//		debugLog<<"Got seekeer"<<endl;
+//		*ppv = (IMediaSeeking*)this;
+//		((IUnknown*)*ppv)->AddRef();
+//		
+//		return NOERROR;
+//	}
+//
+//	return CTransformOutputPin::NonDelegatingQueryInterface(riid, ppv); 
+//}
 
+//HRESULT TheoraDecodeOutputPin::BreakConnect() {
+//	CAutoLock locLock(m_pLock);
+//	//Need a lock ??
+//	ReleaseDelegate();
+//	debugLog<<"Break connect"<<endl;
+//	return CTransformOutputPin::BreakConnect();
+//}
+//HRESULT TheoraDecodeOutputPin::CompleteConnect (IPin *inReceivePin) {
+//	CAutoLock locLock(m_pLock);
+//	debugLog<<"Complete connect"<<endl;
+//	IMediaSeeking* locSeeker = NULL;
+//
+//	m_pFilter->GetPin(0)->QueryInterface(IID_IMediaSeeking, (void**)&locSeeker);
+//
+//	if (locSeeker == NULL) {
+//		debugLog<<"Seeker was NULL"<<endl;
+//	}
+//	SetDelegate(locSeeker);
+//	return CTransformOutputPin::CompleteConnect(inReceivePin);
+//}
 //----------------------
 //OLD IMPLEMENTATION
 //----------------------

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.h	2004-09-10 19:54:55 UTC (rev 7735)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeOutputPin.h	2004-09-11 04:59:13 UTC (rev 7736)
@@ -31,15 +31,28 @@
 
 #pragma once
 #include "Theoradecoderdllstuff.h"
+#include "BasicSeekable.h"
 
+#include <fstream>
+using namespace std;
 class TheoraDecodeOutputPin 
 	:	public CTransformOutputPin
+	//,	public BasicSeekable
 {
 public:
+	//COnstructors
 	TheoraDecodeOutputPin(CTransformFilter* inParentFilter, HRESULT* outHR);
 	virtual ~TheoraDecodeOutputPin();
 
+	//COM Guff
+	//DECLARE_IUNKNOWN
+	//STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
 
+	//Overrides
+	//virtual HRESULT BreakConnect();
+	//virtual HRESULT CompleteConnect (IPin *inReceivePin);
+
+	fstream debugLog;
 };
 //----------------------
 //OLD IMPLEMENTATION

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp	2004-09-10 19:54:55 UTC (rev 7735)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp	2004-09-11 04:59:13 UTC (rev 7736)
@@ -39,7 +39,7 @@
 	
 
 {
-	//debugLog.open("g:\\logs\\theoencfilt.log", ios_base::out);
+	debugLog.open("g:\\logs\\theoencfilt.log", ios_base::out);
 	mYUV.y = NULL;
 	mYUV.u = NULL;
 	mYUV.v = NULL;
@@ -48,7 +48,7 @@
 
 TheoraEncodeInputPin::~TheoraEncodeInputPin(void)
 {
-	//debugLog.close();
+	debugLog.close();
 	DestroyCodec();
 	delete mYUV.y;
 	delete mYUV.u;
@@ -58,7 +58,7 @@
 
 
 HRESULT TheoraEncodeInputPin::deliverData(LONGLONG inStart, LONGLONG inEnd, unsigned char* inBuf, unsigned long inNumBytes) {
-	//debugLog <<" deliverData : "<<inStart<<" - "<<inEnd<<"  :: size = "<<inNumBytes<<endl;
+	debugLog <<" deliverData : "<<inStart<<" - "<<inEnd<<"  :: size = "<<inNumBytes<<endl;
 	//Get a pointer to a new sample stamped with our time
 	IMediaSample* locSample;
 	HRESULT locHR = mOutputPin->GetDeliveryBuffer(&locSample, &inStart, &inEnd, NULL);
@@ -90,9 +90,10 @@
 			} else {
 			}
 		}
-		//debugLog<<"deliverData : SUCCESS"<<endl;
+		debugLog<<"deliverData : SUCCESS"<<endl;
 		return S_OK;
 	} else {
+		debugLog<<"Buffer too small !!!! FATALITY !"<<endl;
 		throw 0;
 	}
 
@@ -361,12 +362,12 @@
 	//TODO::: Break this function up a bit !!
 
 	//Time stamps are granule pos not directshow times
-
+	debugLog<<"Encode data"<<endl;
 	LONGLONG locFrameStart = mUptoFrame;
 	LONGLONG locFrameEnd = 0;
 	HRESULT locHR = S_OK;
 	if (!mBegun) {
-		//debugLog<<"encodeData : First time"<<endl;
+		debugLog<<"encodeData : First time"<<endl;
 		mBegun = true;
 		
 		StampedOggPacket** locHeaders;
@@ -381,26 +382,29 @@
 	}
 
 	if (mPinInputType.subtype == MEDIASUBTYPE_YUY2) {
+		debugLog<<"About to encode YUY2 to YV12"<<endl;
 		encodeYUY2ToYV12(inBuf, inNumBytes);
 	} else {
 		//Should be more specifc.
+		debugLog<<"About to encode YV12 to YV12"<<endl;
 		encodeYV12ToYV12(inBuf, inNumBytes);
 	}
 	
 
 	StampedOggPacket* locPacket = mTheoraEncoder.encodeTheora(&mYUV);
 	if (locPacket == NULL) {
+		debugLog<<"Encode returns NULL"<<endl;
 		return S_FALSE;
 	}
 	locFrameEnd		= mUptoFrame 
 					= locPacket->endTime();
-
+	debugLog<<"Delivering..."<<endl;
 	return deliverData(locFrameStart, locFrameEnd, locPacket->packetData(), locPacket->packetSize());
 
 }
 bool TheoraEncodeInputPin::ConstructCodec() {
 
-
+	debugLog<<"Contructing codec..."<<endl;
 	theora_info_init(&mTheoraInfo);
 	
 	//Round up to multiple of 16 for theora

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.h	2004-09-10 19:54:55 UTC (rev 7735)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.h	2004-09-11 04:59:13 UTC (rev 7736)
@@ -83,7 +83,7 @@
 	unsigned long mYOffset;
 
 	//DEBUG ONLY
-	//fstream debugLog;
+	fstream debugLog;
 	//
 
 	

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp	2004-09-10 19:54:55 UTC (rev 7735)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp	2004-09-11 04:59:13 UTC (rev 7736)
@@ -113,11 +113,13 @@
 	,	mSequenceNo(0)
 	,	mPacketCount(0)
 {
+	debugLog.open("G:\\logs\\paginator.log", ios_base::out);
 	
 }
 
 OggPaginator::~OggPaginator(void)
 {
+	debugLog.close();
 }
 
 
@@ -167,6 +169,7 @@
 	//	}
 	//}
 
+	debugLog<<"Accepting packet"<<endl;
 	addPacketToPage(inOggPacket);
 
 	return true;
@@ -232,6 +235,7 @@
 
 }
 bool OggPaginator::deliverCurrentPage() {
+	debugLog<<"Delivering page"<<endl;
 	mPendingPage->header()->setSegmentTable((const unsigned char*)mSegmentTable, mSegmentTableSize);
 	mPendingPage->header()->setDataSize(mCurrentPageSize - mPendingPage->headerSize());  //This is odd
 
@@ -251,6 +255,7 @@
 
 }
 bool OggPaginator::createFreshPage() {
+	debugLog<<"Creating fresh page"<<endl;
 	mPendingPage = new OggPage;
 	mCurrentPageSize = OggPageHeader::OGG_BASE_HEADER_SIZE;
 	mPendingPageHasData = false;
@@ -273,7 +278,7 @@
 }
 bool OggPaginator::addPacketToPage(StampedOggPacket* inOggPacket) {
 
-	
+	debugLog<<"Add packet to page"<<endl;
 	mPendingPageHasData = true;
 	//while some packet left
 	//	add as much as possible
@@ -294,7 +299,9 @@
 
 	//While there is still more packet not added to the page
 	while (locPacketRemaining > 0) {
+		debugLog<<"Packet remaining = "<<locPacketRemaining<<endl;
 		locConsumed = addAsMuchPacketAsPossible(inOggPacket, locPacketStartPoint, locPacketRemaining);
+		debugLog<<"Consumed = "<<locConsumed<<endl;
 		locPacketStartPoint += locConsumed;
 		locPacketRemaining -= locConsumed;
 	}
@@ -310,15 +317,27 @@
 
 unsigned long OggPaginator::addAsMuchPacketAsPossible(StampedOggPacket* inOggPacket, unsigned long inStartAt, long inRemaining) {
 	//Take 1 so when it adds the packet it doesn't try to consume one extra segment which doesn't exist.
+
+	//The amount of space left in the page is the minimum of
+	// a) The number of segments left * 255
+	// b) The number of bytes less than the desired maximum page size.
     unsigned long locSpaceLeft =	MIN(((255 - mSegmentTableSize) * 255) - 1, mSettings->mMaxPageSize - mCurrentPageSize);
 
+	debugLog<<"Space left = "<<locSpaceLeft<<endl;
 	//Round down to nearest multiple of 255
 	//
 	//This is important when the packet gets broken because inRemaining is gt locSpace left
 	// In this case where the packet gets broken the final segment on the page must be 255.
 	locSpaceLeft -= (locSpaceLeft % 255);
+
+	//How much we add is the minimum of
+	// a) How much space is left
+	// b) The amount of packet remaining.
+
+	//If (a) is the minimum then we know that the how much we are adding is a multiple of 255.
 	unsigned long locHowMuchToAdd = MIN(locSpaceLeft, inRemaining);
 
+	debugLog<<"How much to add = "<<locHowMuchToAdd<<endl;
 	
 	//mPending page has data is useless, it was set before this function is called... need to fix that. maybe move into add part of pack into apge
 	if ((!mPendingPageHasData) && (inStartAt != 0)) {
@@ -336,13 +355,21 @@
 
 bool OggPaginator::addPartOfPacketToPage(StampedOggPacket* inOggPacket, unsigned long inStartFrom, unsigned long inLength) {
 
+	debugLog<<"Add part of packet to page"<<endl;
+
+	//Buffer the amount of the packet we are going to add.
 	unsigned char* locBuff = new unsigned char[inLength];
 	memcpy((void*)locBuff, (const void*)(inOggPacket->packetData() + inStartFrom), inLength);
 
 	//unsigned long locBytesOfPacketRemaining = inOggPacket->packetSize() - (((locNumSegsNeeded - (255 - mSegmentTableSize)) * 255);
 	//unsigned long locRemainingPacketStartsAt = inOggPacket->packetSize() - locBytesOfPacketRemaining + 1;
 	//
+
+	//Its the last part of the packet start point plus how much we are adding of it is the same
+	// as the total packet size.
 	bool locIsLastOfPacket = (inStartFrom + inLength == inOggPacket->packetSize());
+
+	//Create a new packet
 	StampedOggPacket* locPartialPacket = new StampedOggPacket(	locBuff, 
 																inLength, 
 																locIsLastOfPacket,
@@ -350,9 +377,29 @@
 																inOggPacket->startTime(), 
 																inOggPacket->endTime(), 
 																inOggPacket->mStampType);
+
+	//Add the packet to the page.
 	mPendingPage->addPacket(locPartialPacket);
-	unsigned long locNumSegsNeeded = (inLength / 255) + 1;
-	for (unsigned long i = 0; i < locNumSegsNeeded - 1; i++) {
+
+	//CASES
+	//========
+	//length                 segs           segs if not end
+	//  0                     1                   N/A
+	//  1                     1                   N/A
+	// 255                    2                    1
+	// 256                    2
+	// 510                    3                    2
+	//  n                     (n / 255) + 1
+
+	//Now do the segment table bookkeeping.
+	unsigned long locNumSegsNeeded = (inLength / 255);
+
+	debugLog<<"Amount to add = "<<inLength<<endl;
+	debugLog<<"Segs needed = "<<locNumSegsNeeded<<endl;
+
+	//Always do one less than the total... the last segment is a special case
+	//We fill all but the last segemnt with 255
+	for (unsigned long i = 0; i < locNumSegsNeeded; i++) {
 		mSegmentTable[mSegmentTableSize] = 255;
 		mSegmentTableSize++;
 	}
@@ -360,12 +407,35 @@
 	//If it's not the last of the packet, it will be a multiple of 255, hence we don't put a terminating 0 on.
 	//If it is the last of the packet this last segment will be between 0 and 254 inclusive.
 	if (locIsLastOfPacket) {
+		//Its the last part of the packet... so we need one extra segemnt... to hold the last part.
+		// The last part will be between 0-254
+		debugLog<<"Is last of packet... adding terminator "<<(unsigned long)(inLength % 255)<<endl;
 		mSegmentTable[mSegmentTableSize] = (unsigned char)(inLength % 255);
 		mSegmentTableSize++;
+
+		//This is used in a calculation below.
+		locNumSegsNeeded++;
+	} else {
+		//If it's not the last part of the packet it should be a multiple of 255. the calling function needs to ensure this.
+		//Since if it was the last part of the packet we've already added all the segments, then we do nothing.
+
+		//ASSERT((inLength % 255) == 0);
+		//if ((inLength % 255) != 0) {
+		//	debugLog<<"ASSERTION FAILED !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"<<endl;
+		//}
+		//mSegmentTable[mSegmentTableSize] = (unsigned char)(255);
+		//mSegmentTableSize++;
+		//locNumSegsNeeded++;
 	}
+		
+
+	debugLog<<"Seg table is "<<(unsigned long)mSegmentTableSize<<endl;
+
 	mCurrentPageSize += (locNumSegsNeeded + inLength);
+
+	debugLog<<"Page is now "<<mCurrentPageSize<<endl;
 	if (locIsLastOfPacket) {
-		
+		debugLog<<"Setting time for end of page"<<endl;
 		mPendingPage->header()->setGranulePos(inOggPacket->endTime());
 	}
 

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.h
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.h	2004-09-10 19:54:55 UTC (rev 7735)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.h	2004-09-11 04:59:13 UTC (rev 7736)
@@ -39,6 +39,9 @@
 #include "IOggCallback.h"
 #include "StampedOggPacket.h"
 
+#include <fstream>
+using namespace std;
+
 class LIBOOOGG_API OggPaginator
 	:	public IStampedOggPacketSink
 {
@@ -74,5 +77,7 @@
 	IOggCallback* mPageCallback;
 	OggPaginatorSettings* mSettings;
 	OggPage* mPendingPage;
+
+	fstream debugLog;
 	
 };

Modified: trunk/oggdsf/src/tests/testMuxDemux/testMuxDemux.cpp
===================================================================
--- trunk/oggdsf/src/tests/testMuxDemux/testMuxDemux.cpp	2004-09-10 19:54:55 UTC (rev 7735)
+++ trunk/oggdsf/src/tests/testMuxDemux/testMuxDemux.cpp	2004-09-11 04:59:13 UTC (rev 7736)
@@ -41,8 +41,42 @@
 
 #include <fstream>
 
+const BUFF_SIZE = 8092;
 
-const BUFF_SIZE = 8092;
+int testPagination(string inOutputFileName) {
+	int NUM_PACKS = 100;
+	int PACK_BUFF_SIZE = 100000;
+	unsigned char* locBuff = NULL;
+
+	OggPaginatorSettings sets;
+	sets.mMaxPageSize = 8192;
+	sets.mMinPageSize = 4096;
+	sets.mSerialNo = 8877;
+	sets.mTargetPageSize = 4096;
+
+	OggPageFileWriter* writer = new OggPageFileWriter(inOutputFileName);
+
+	OggPaginator pager;
+	pager.setParameters(&sets);
+	pager.setPageCallback(writer);
+	
+	StampedOggPacket* pack = NULL;
+	
+	for (int i=0; i < NUM_PACKS; i++) {
+		locBuff = new unsigned char[	PACK_BUFF_SIZE];
+		memset((void*)locBuff, 99, PACK_BUFF_SIZE);
+
+		locBuff[0] = 88;
+		locBuff[PACK_BUFF_SIZE-1] = 77;
+		pack = new StampedOggPacket(locBuff, PACK_BUFF_SIZE, false, false, i, i, StampedOggPacket::OGG_BOTH);
+		pager.acceptStampedOggPacket(pack);
+
+
+	}
+	return 0;
+}
+
+
 int testPageWriter(string inReadFile, string inWriteFile) {
 	//Reads a file, demuxes it at page level and then writes it out again
 	OggDataBuffer testOggBuff;
@@ -69,19 +103,20 @@
 int __cdecl _tmain(int argc, _TCHAR* argv[])
 {
 
-	if (argc != 3) {
-		cout<<"Usage : testMuxDemux <inputFilename> <outputFilename>"<<endl;
-		return 1;
-	} else {
+	//if (argc != 3) {
+	//	cout<<"Usage : testMuxDemux <inputFilename> <outputFilename>"<<endl;
+	//	return 1;
+	//} else {
 		cout<<"Testing libOOOgg Mux and Demux..."<<endl;
 		cout<<"================================="<<endl;
 		unsigned long numTests = 0;
 
-		cout<<numTests<<" : "<<"Testing page level demux chained to page file writer..."<<endl;
-		testPageWriter(argv[1], argv[2]);
-		cout<<numTests<<" : "<<"Complete."<<endl;
+		testPagination("G:\\logs\\dumpage.out");
+		//cout<<numTests<<" : "<<"Testing page level demux chained to page file writer..."<<endl;
+		//testPageWriter(argv[1], argv[2]);
+		//cout<<numTests<<" : "<<"Complete."<<endl;
 		return 0;
-	}
+	//}
 }
 
 

Modified: trunk/oggdsf/src/tests/testMuxDemux/testMuxDemux.vcproj
===================================================================
--- trunk/oggdsf/src/tests/testMuxDemux/testMuxDemux.vcproj	2004-09-10 19:54:55 UTC (rev 7735)
+++ trunk/oggdsf/src/tests/testMuxDemux/testMuxDemux.vcproj	2004-09-11 04:59:13 UTC (rev 7736)
@@ -27,7 +27,8 @@
 				UsePrecompiledHeader="3"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="4"/>
+				DebugInformationFormat="4"
+				CallingConvention="2"/>
 			<Tool
 				Name="VCCustomBuildTool"/>
 			<Tool

Added: trunk/oggdsf/src/tests/testOOOggMux/ReadMe.txt
===================================================================
--- trunk/oggdsf/src/tests/testOOOggMux/ReadMe.txt	2004-09-10 19:54:55 UTC (rev 7735)
+++ trunk/oggdsf/src/tests/testOOOggMux/ReadMe.txt	2004-09-11 04:59:13 UTC (rev 7736)
@@ -0,0 +1,32 @@
+========================================================================
+    CONSOLE APPLICATION : testOOOggMux Project Overview
+========================================================================
+
+AppWizard has created this testOOOggMux application for you.  
+This file contains a summary of what you will find in each of the files that
+make up your testOOOggMux application.
+
+
+testOOOggMux.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.
+
+testOOOggMux.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 testOOOggMux.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/testOOOggMux/stdafx.cpp
===================================================================
--- trunk/oggdsf/src/tests/testOOOggMux/stdafx.cpp	2004-09-10 19:54:55 UTC (rev 7735)
+++ trunk/oggdsf/src/tests/testOOOggMux/stdafx.cpp	2004-09-11 04:59:13 UTC (rev 7736)
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+// testOOOggMux.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/testOOOggMux/stdafx.h
===================================================================
--- trunk/oggdsf/src/tests/testOOOggMux/stdafx.h	2004-09-10 19:54:55 UTC (rev 7735)
+++ trunk/oggdsf/src/tests/testOOOggMux/stdafx.h	2004-09-11 04:59:13 UTC (rev 7736)
@@ -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/testOOOggMux/testOOOggMux.cpp
===================================================================
--- trunk/oggdsf/src/tests/testOOOggMux/testOOOggMux.cpp	2004-09-10 19:54:55 UTC (rev 7735)
+++ trunk/oggdsf/src/tests/testOOOggMux/testOOOggMux.cpp	2004-09-11 04:59:13 UTC (rev 7736)
@@ -0,0 +1,67 @@
+// testOOOggMux.cpp : Defines the entry point for the console application.
+//
+
+#include "stdafx.h"
+
+#include <libOOOgg.h>
+#include <dllstuff.h>
+
+#include <iostream>
+#include <fstream>
+
+unsigned long bytePos;
+
+//This will be called by the callback
+bool pageCB(OggPage* inOggPage) {
+	cout<<"Page Location : "<<bytePos;
+	bytePos += inOggPage->pageSize();
+	cout<<" to "<<bytePos<<endl;
+	OggPacket* locPack = NULL;
+	cout << inOggPage->header()->toString();
+	cout << "Num Packets : " << inOggPage->numPackets() << endl;;
+	for (unsigned long i = 0; i < inOggPage->numPackets(); i++) {
+		locPack = inOggPage->getPacket(i);
+		cout << "------ Packet  " << i << " (" << locPack->packetSize() << " bytes) -------";
+		
+		if (locPack->isContinuation()) {
+			cout<<"  ** CONT **";
+		}
+		if (locPack->isTruncated()) {
+			cout<<" ** TRUNC **";
+		}
+		cout<<endl;
+		cout << locPack->toPackDumpString();
+	}
+	
+	return true;
+}
+
+
+int __cdecl _tmain(int argc, _TCHAR* argv[])
+{
+	//This program just dumps the pages out of a file in ogg format.
+	// Currently does not error checking. Check your command line carefully !
+	// USAGE :: OggDump <OggFile>
+	//
+
+	bytePos = 0;
+
+	
+	
+	
+
+		
+		const unsigned short BUFF_SIZE = 8092;
+		char* locBuff = new char[BUFF_SIZE];
+		while (!testFile.eof()) {
+			testFile.read(locBuff, BUFF_SIZE);
+			unsigned long locBytesRead = testFile.gcount();
+    		testOggBuff.feed((const unsigned char*)locBuff, locBytesRead);
+		}
+
+		delete locBuff;
+	}
+
+	return 0;
+}
+

Added: trunk/oggdsf/src/tests/testOOOggMux/testOOOggMux.vcproj
===================================================================
--- trunk/oggdsf/src/tests/testOOOggMux/testOOOggMux.vcproj	2004-09-10 19:54:55 UTC (rev 7735)
+++ trunk/oggdsf/src/tests/testOOOggMux/testOOOggMux.vcproj	2004-09-11 04:59:13 UTC (rev 7736)
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="testOOOggMux"
+	ProjectGUID="{C2DBE955-C193-4BEC-A2E8-AB67153CD3EF}"
+	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)/testOOOggMux.exe"
+				LinkIncremental="2"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/testOOOggMux.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)/testOOOggMux.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=".\testOOOggMux.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>



More information about the commits mailing list