[xiph-commits] r7940 - in trunk/oggdsf: sln/oggdsf_all
src/lib/codecs src/lib/codecs/dirac src/lib/codecs/dirac/filters
src/lib/codecs/dirac/filters/dsfDiracDecodeSource
src/lib/codecs/dirac/filters/dsfDiracEncodeFilter
src/lib/core/directshow/dsfAbstractVideoEncoder
src/lib/core/directshow/dsfOggDemux
src/lib/core/ogg/libOOOggSeek src/tools/DNPlay
illiminable at motherfish-iii.xiph.org
illiminable at motherfish-iii.xiph.org
Fri Oct 8 21:39:00 PDT 2004
Author: illiminable
Date: 2004-10-08 21:38:59 -0700 (Fri, 08 Oct 2004)
New Revision: 7940
Added:
trunk/oggdsf/src/lib/codecs/dirac/
trunk/oggdsf/src/lib/codecs/dirac/filters/
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/DiracDecodeSourceFilter.cpp
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/DiracDecodeSourceFilter.h
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/DiracDecodeSourcePin.cpp
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/DiracDecodeSourcePin.h
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/ReadMe.txt
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/dsfDiracDecodeSource.cpp
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/dsfDiracDecodeSource.h
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/dsfDiracDecodeSource.vcproj
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/stdafx.cpp
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/stdafx.h
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeFilter.cpp
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeFilter.h
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeInputPin.cpp
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeInputPin.h
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeOutputPin.cpp
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeOutputPin.h
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/ReadMe.txt
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/dsfDiracEncodeFilter.cpp
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/dsfDiracEncodeFilter.h
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/dsfDiracEncodeFilter.vcproj
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/stdafx.cpp
trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/stdafx.h
Modified:
trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeFilter.h
trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FilterFileSource.cpp
trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FilterFileSource.h
trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp
trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.h
trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/oggdllstuff.h
trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoAnxSeekTable.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.h
trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/OggSeekTable.h
trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs
trunk/oggdsf/src/tools/DNPlay/frmDNPlay.resx
Log:
* Messing with annodex player a bit to follow links.
* A few extra bits to make sure all file handles get released
* Fixed a small memory leak in the demuxer
* Add two new projects for dirac (don't try and build these out of svn... much of the source is missing from the repository for now)
Modified: trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln
===================================================================
--- trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/sln/oggdsf_all/oggdsf_all.sln 2004-10-09 04:38:59 UTC (rev 7940)
@@ -1148,6 +1148,47 @@
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DiracCommon", "..\..\src\lib\codecs\dirac\lib\libdirac\win\VS2003\DiracCommon\DiracCommon.vcproj", "{A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DiracMotionEst", "..\..\src\lib\codecs\dirac\lib\libdirac\win\VS2003\DiracMotionEst\DiracMotionEst.vcproj", "{C6A615BF-D4EB-4D50-9638-2C715E0695C6}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DiracDecoder", "..\..\src\lib\codecs\dirac\lib\libdirac\win\VS2003\DiracDecoder\DiracDecoder.vcproj", "{89EC2AEB-8284-4213-874B-29D549893FC9}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DiracEncoder", "..\..\src\lib\codecs\dirac\lib\libdirac\win\VS2003\DiracEncoder\DiracEncoder.vcproj", "{9076B578-583A-493D-96C4-776DCEC0FFBD}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EncodeDirac", "..\..\src\lib\codecs\dirac\lib\libdirac\win\VS2003\EncodeDirac\EncodeDirac.vcproj", "{547FE1E9-70EF-48D4-B45B-2FF39B39855D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21} = {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}
+ {9076B578-583A-493D-96C4-776DCEC0FFBD} = {9076B578-583A-493D-96C4-776DCEC0FFBD}
+ {C6A615BF-D4EB-4D50-9638-2C715E0695C6} = {C6A615BF-D4EB-4D50-9638-2C715E0695C6}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DecodeDirac", "..\..\src\lib\codecs\dirac\lib\libdirac\win\VS2003\DecodeDirac\DecodeDirac.vcproj", "{CCA690F8-1356-4BD5-9152-8E0A6496842D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21} = {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}
+ {89EC2AEB-8284-4213-874B-29D549893FC9} = {89EC2AEB-8284-4213-874B-29D549893FC9}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsfDiracDecodeSource", "..\..\src\lib\codecs\dirac\filters\dsfDiracDecodeSource\dsfDiracDecodeSource.vcproj", "{2DDC7218-82D9-403E-BCE8-0D535266D19D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {4CBC0173-27E6-4218-AE06-5EFDCA7B2547} = {4CBC0173-27E6-4218-AE06-5EFDCA7B2547}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsfDiracEncodeFilter", "..\..\src\lib\codecs\dirac\filters\dsfDiracEncodeFilter\dsfDiracEncodeFilter.vcproj", "{190C8AE5-75B0-4714-BC0A-4992F3524F35}"
+ ProjectSection(ProjectDependencies) = postProject
+ {A882A968-3013-4A27-B653-E18CF5C791FE} = {A882A968-3013-4A27-B653-E18CF5C791FE}
+ {4CBC0173-27E6-4218-AE06-5EFDCA7B2547} = {4CBC0173-27E6-4218-AE06-5EFDCA7B2547}
+ {AD2DC5BB-AC7B-482D-9472-19BB98A833CE} = {AD2DC5BB-AC7B-482D-9472-19BB98A833CE}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
@@ -2147,6 +2188,134 @@
{32228390-D24D-40CD-A31E-E4E1CF94C308}.Release_SSE.Build.0 = Release|Win32
{32228390-D24D-40CD-A31E-E4E1CF94C308}.Release_SSE2.ActiveCfg = Release|Win32
{32228390-D24D-40CD-A31E-E4E1CF94C308}.Release_SSE2.Build.0 = Release|Win32
+ {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}.Debug.ActiveCfg = Debug|Win32
+ {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}.Debug.Build.0 = Debug|Win32
+ {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}.Debug Unicode.ActiveCfg = Debug|Win32
+ {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}.Debug Unicode.Build.0 = Debug|Win32
+ {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}.MakeFile.ActiveCfg = Release|Win32
+ {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}.MakeFile.Build.0 = Release|Win32
+ {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}.Release.ActiveCfg = Release|Win32
+ {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}.Release.Build.0 = Release|Win32
+ {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}.Release Unicode.ActiveCfg = Release|Win32
+ {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}.Release Unicode.Build.0 = Release|Win32
+ {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}.Release_NoDotNET.ActiveCfg = Release|Win32
+ {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}.Release_NoDotNET.Build.0 = Release|Win32
+ {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}.Release_SSE.ActiveCfg = Release|Win32
+ {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}.Release_SSE.Build.0 = Release|Win32
+ {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}.Release_SSE2.ActiveCfg = Release|Win32
+ {A45B7D48-9E8D-4475-BED4-CBE3E3CCAD21}.Release_SSE2.Build.0 = Release|Win32
+ {C6A615BF-D4EB-4D50-9638-2C715E0695C6}.Debug.ActiveCfg = Debug|Win32
+ {C6A615BF-D4EB-4D50-9638-2C715E0695C6}.Debug.Build.0 = Debug|Win32
+ {C6A615BF-D4EB-4D50-9638-2C715E0695C6}.Debug Unicode.ActiveCfg = Debug|Win32
+ {C6A615BF-D4EB-4D50-9638-2C715E0695C6}.Debug Unicode.Build.0 = Debug|Win32
+ {C6A615BF-D4EB-4D50-9638-2C715E0695C6}.MakeFile.ActiveCfg = Release|Win32
+ {C6A615BF-D4EB-4D50-9638-2C715E0695C6}.MakeFile.Build.0 = Release|Win32
+ {C6A615BF-D4EB-4D50-9638-2C715E0695C6}.Release.ActiveCfg = Release|Win32
+ {C6A615BF-D4EB-4D50-9638-2C715E0695C6}.Release.Build.0 = Release|Win32
+ {C6A615BF-D4EB-4D50-9638-2C715E0695C6}.Release Unicode.ActiveCfg = Release|Win32
+ {C6A615BF-D4EB-4D50-9638-2C715E0695C6}.Release Unicode.Build.0 = Release|Win32
+ {C6A615BF-D4EB-4D50-9638-2C715E0695C6}.Release_NoDotNET.ActiveCfg = Release|Win32
+ {C6A615BF-D4EB-4D50-9638-2C715E0695C6}.Release_NoDotNET.Build.0 = Release|Win32
+ {C6A615BF-D4EB-4D50-9638-2C715E0695C6}.Release_SSE.ActiveCfg = Release|Win32
+ {C6A615BF-D4EB-4D50-9638-2C715E0695C6}.Release_SSE.Build.0 = Release|Win32
+ {C6A615BF-D4EB-4D50-9638-2C715E0695C6}.Release_SSE2.ActiveCfg = Release|Win32
+ {C6A615BF-D4EB-4D50-9638-2C715E0695C6}.Release_SSE2.Build.0 = Release|Win32
+ {89EC2AEB-8284-4213-874B-29D549893FC9}.Debug.ActiveCfg = Debug|Win32
+ {89EC2AEB-8284-4213-874B-29D549893FC9}.Debug.Build.0 = Debug|Win32
+ {89EC2AEB-8284-4213-874B-29D549893FC9}.Debug Unicode.ActiveCfg = Debug|Win32
+ {89EC2AEB-8284-4213-874B-29D549893FC9}.Debug Unicode.Build.0 = Debug|Win32
+ {89EC2AEB-8284-4213-874B-29D549893FC9}.MakeFile.ActiveCfg = Release|Win32
+ {89EC2AEB-8284-4213-874B-29D549893FC9}.MakeFile.Build.0 = Release|Win32
+ {89EC2AEB-8284-4213-874B-29D549893FC9}.Release.ActiveCfg = Release|Win32
+ {89EC2AEB-8284-4213-874B-29D549893FC9}.Release.Build.0 = Release|Win32
+ {89EC2AEB-8284-4213-874B-29D549893FC9}.Release Unicode.ActiveCfg = Release|Win32
+ {89EC2AEB-8284-4213-874B-29D549893FC9}.Release Unicode.Build.0 = Release|Win32
+ {89EC2AEB-8284-4213-874B-29D549893FC9}.Release_NoDotNET.ActiveCfg = Release|Win32
+ {89EC2AEB-8284-4213-874B-29D549893FC9}.Release_NoDotNET.Build.0 = Release|Win32
+ {89EC2AEB-8284-4213-874B-29D549893FC9}.Release_SSE.ActiveCfg = Release|Win32
+ {89EC2AEB-8284-4213-874B-29D549893FC9}.Release_SSE.Build.0 = Release|Win32
+ {89EC2AEB-8284-4213-874B-29D549893FC9}.Release_SSE2.ActiveCfg = Release|Win32
+ {89EC2AEB-8284-4213-874B-29D549893FC9}.Release_SSE2.Build.0 = Release|Win32
+ {9076B578-583A-493D-96C4-776DCEC0FFBD}.Debug.ActiveCfg = Debug|Win32
+ {9076B578-583A-493D-96C4-776DCEC0FFBD}.Debug.Build.0 = Debug|Win32
+ {9076B578-583A-493D-96C4-776DCEC0FFBD}.Debug Unicode.ActiveCfg = Debug|Win32
+ {9076B578-583A-493D-96C4-776DCEC0FFBD}.Debug Unicode.Build.0 = Debug|Win32
+ {9076B578-583A-493D-96C4-776DCEC0FFBD}.MakeFile.ActiveCfg = Release|Win32
+ {9076B578-583A-493D-96C4-776DCEC0FFBD}.MakeFile.Build.0 = Release|Win32
+ {9076B578-583A-493D-96C4-776DCEC0FFBD}.Release.ActiveCfg = Release|Win32
+ {9076B578-583A-493D-96C4-776DCEC0FFBD}.Release.Build.0 = Release|Win32
+ {9076B578-583A-493D-96C4-776DCEC0FFBD}.Release Unicode.ActiveCfg = Release|Win32
+ {9076B578-583A-493D-96C4-776DCEC0FFBD}.Release Unicode.Build.0 = Release|Win32
+ {9076B578-583A-493D-96C4-776DCEC0FFBD}.Release_NoDotNET.ActiveCfg = Release|Win32
+ {9076B578-583A-493D-96C4-776DCEC0FFBD}.Release_NoDotNET.Build.0 = Release|Win32
+ {9076B578-583A-493D-96C4-776DCEC0FFBD}.Release_SSE.ActiveCfg = Release|Win32
+ {9076B578-583A-493D-96C4-776DCEC0FFBD}.Release_SSE.Build.0 = Release|Win32
+ {9076B578-583A-493D-96C4-776DCEC0FFBD}.Release_SSE2.ActiveCfg = Release|Win32
+ {9076B578-583A-493D-96C4-776DCEC0FFBD}.Release_SSE2.Build.0 = Release|Win32
+ {547FE1E9-70EF-48D4-B45B-2FF39B39855D}.Debug.ActiveCfg = Debug|Win32
+ {547FE1E9-70EF-48D4-B45B-2FF39B39855D}.Debug.Build.0 = Debug|Win32
+ {547FE1E9-70EF-48D4-B45B-2FF39B39855D}.Debug Unicode.ActiveCfg = Debug|Win32
+ {547FE1E9-70EF-48D4-B45B-2FF39B39855D}.Debug Unicode.Build.0 = Debug|Win32
+ {547FE1E9-70EF-48D4-B45B-2FF39B39855D}.MakeFile.ActiveCfg = Release|Win32
+ {547FE1E9-70EF-48D4-B45B-2FF39B39855D}.MakeFile.Build.0 = Release|Win32
+ {547FE1E9-70EF-48D4-B45B-2FF39B39855D}.Release.ActiveCfg = Release|Win32
+ {547FE1E9-70EF-48D4-B45B-2FF39B39855D}.Release.Build.0 = Release|Win32
+ {547FE1E9-70EF-48D4-B45B-2FF39B39855D}.Release Unicode.ActiveCfg = Release|Win32
+ {547FE1E9-70EF-48D4-B45B-2FF39B39855D}.Release Unicode.Build.0 = Release|Win32
+ {547FE1E9-70EF-48D4-B45B-2FF39B39855D}.Release_NoDotNET.ActiveCfg = Release|Win32
+ {547FE1E9-70EF-48D4-B45B-2FF39B39855D}.Release_NoDotNET.Build.0 = Release|Win32
+ {547FE1E9-70EF-48D4-B45B-2FF39B39855D}.Release_SSE.ActiveCfg = Release|Win32
+ {547FE1E9-70EF-48D4-B45B-2FF39B39855D}.Release_SSE.Build.0 = Release|Win32
+ {547FE1E9-70EF-48D4-B45B-2FF39B39855D}.Release_SSE2.ActiveCfg = Release|Win32
+ {547FE1E9-70EF-48D4-B45B-2FF39B39855D}.Release_SSE2.Build.0 = Release|Win32
+ {CCA690F8-1356-4BD5-9152-8E0A6496842D}.Debug.ActiveCfg = Debug|Win32
+ {CCA690F8-1356-4BD5-9152-8E0A6496842D}.Debug.Build.0 = Debug|Win32
+ {CCA690F8-1356-4BD5-9152-8E0A6496842D}.Debug Unicode.ActiveCfg = Debug|Win32
+ {CCA690F8-1356-4BD5-9152-8E0A6496842D}.Debug Unicode.Build.0 = Debug|Win32
+ {CCA690F8-1356-4BD5-9152-8E0A6496842D}.MakeFile.ActiveCfg = Release|Win32
+ {CCA690F8-1356-4BD5-9152-8E0A6496842D}.MakeFile.Build.0 = Release|Win32
+ {CCA690F8-1356-4BD5-9152-8E0A6496842D}.Release.ActiveCfg = Release|Win32
+ {CCA690F8-1356-4BD5-9152-8E0A6496842D}.Release.Build.0 = Release|Win32
+ {CCA690F8-1356-4BD5-9152-8E0A6496842D}.Release Unicode.ActiveCfg = Release|Win32
+ {CCA690F8-1356-4BD5-9152-8E0A6496842D}.Release Unicode.Build.0 = Release|Win32
+ {CCA690F8-1356-4BD5-9152-8E0A6496842D}.Release_NoDotNET.ActiveCfg = Release|Win32
+ {CCA690F8-1356-4BD5-9152-8E0A6496842D}.Release_NoDotNET.Build.0 = Release|Win32
+ {CCA690F8-1356-4BD5-9152-8E0A6496842D}.Release_SSE.ActiveCfg = Release|Win32
+ {CCA690F8-1356-4BD5-9152-8E0A6496842D}.Release_SSE.Build.0 = Release|Win32
+ {CCA690F8-1356-4BD5-9152-8E0A6496842D}.Release_SSE2.ActiveCfg = Release|Win32
+ {CCA690F8-1356-4BD5-9152-8E0A6496842D}.Release_SSE2.Build.0 = Release|Win32
+ {2DDC7218-82D9-403E-BCE8-0D535266D19D}.Debug.ActiveCfg = Debug|Win32
+ {2DDC7218-82D9-403E-BCE8-0D535266D19D}.Debug.Build.0 = Debug|Win32
+ {2DDC7218-82D9-403E-BCE8-0D535266D19D}.Debug Unicode.ActiveCfg = Debug|Win32
+ {2DDC7218-82D9-403E-BCE8-0D535266D19D}.Debug Unicode.Build.0 = Debug|Win32
+ {2DDC7218-82D9-403E-BCE8-0D535266D19D}.MakeFile.ActiveCfg = Release|Win32
+ {2DDC7218-82D9-403E-BCE8-0D535266D19D}.MakeFile.Build.0 = Release|Win32
+ {2DDC7218-82D9-403E-BCE8-0D535266D19D}.Release.ActiveCfg = Release|Win32
+ {2DDC7218-82D9-403E-BCE8-0D535266D19D}.Release.Build.0 = Release|Win32
+ {2DDC7218-82D9-403E-BCE8-0D535266D19D}.Release Unicode.ActiveCfg = Release|Win32
+ {2DDC7218-82D9-403E-BCE8-0D535266D19D}.Release Unicode.Build.0 = Release|Win32
+ {2DDC7218-82D9-403E-BCE8-0D535266D19D}.Release_NoDotNET.ActiveCfg = Release|Win32
+ {2DDC7218-82D9-403E-BCE8-0D535266D19D}.Release_NoDotNET.Build.0 = Release|Win32
+ {2DDC7218-82D9-403E-BCE8-0D535266D19D}.Release_SSE.ActiveCfg = Release|Win32
+ {2DDC7218-82D9-403E-BCE8-0D535266D19D}.Release_SSE.Build.0 = Release|Win32
+ {2DDC7218-82D9-403E-BCE8-0D535266D19D}.Release_SSE2.ActiveCfg = Release|Win32
+ {2DDC7218-82D9-403E-BCE8-0D535266D19D}.Release_SSE2.Build.0 = Release|Win32
+ {190C8AE5-75B0-4714-BC0A-4992F3524F35}.Debug.ActiveCfg = Debug|Win32
+ {190C8AE5-75B0-4714-BC0A-4992F3524F35}.Debug.Build.0 = Debug|Win32
+ {190C8AE5-75B0-4714-BC0A-4992F3524F35}.Debug Unicode.ActiveCfg = Debug|Win32
+ {190C8AE5-75B0-4714-BC0A-4992F3524F35}.Debug Unicode.Build.0 = Debug|Win32
+ {190C8AE5-75B0-4714-BC0A-4992F3524F35}.MakeFile.ActiveCfg = Release|Win32
+ {190C8AE5-75B0-4714-BC0A-4992F3524F35}.MakeFile.Build.0 = Release|Win32
+ {190C8AE5-75B0-4714-BC0A-4992F3524F35}.Release.ActiveCfg = Release|Win32
+ {190C8AE5-75B0-4714-BC0A-4992F3524F35}.Release.Build.0 = Release|Win32
+ {190C8AE5-75B0-4714-BC0A-4992F3524F35}.Release Unicode.ActiveCfg = Release|Win32
+ {190C8AE5-75B0-4714-BC0A-4992F3524F35}.Release Unicode.Build.0 = Release|Win32
+ {190C8AE5-75B0-4714-BC0A-4992F3524F35}.Release_NoDotNET.ActiveCfg = Release|Win32
+ {190C8AE5-75B0-4714-BC0A-4992F3524F35}.Release_NoDotNET.Build.0 = Release|Win32
+ {190C8AE5-75B0-4714-BC0A-4992F3524F35}.Release_SSE.ActiveCfg = Release|Win32
+ {190C8AE5-75B0-4714-BC0A-4992F3524F35}.Release_SSE.Build.0 = Release|Win32
+ {190C8AE5-75B0-4714-BC0A-4992F3524F35}.Release_SSE2.ActiveCfg = Release|Win32
+ {190C8AE5-75B0-4714-BC0A-4992F3524F35}.Release_SSE2.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionItems) = postSolution
EndGlobalSection
Added: trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/DiracDecodeSourceFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/DiracDecodeSourceFilter.cpp 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/DiracDecodeSourceFilter.cpp 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,154 @@
+#include "StdAfx.h"
+#include ".\DiracDecodeSourceFilter.h"
+
+CFactoryTemplate g_Templates[] =
+{
+ {
+ L"DiracDecodeSourceFilter", // Name
+ &CLSID_DiracDecodeSourceFilter, // CLSID
+ DiracDecodeSourceFilter::CreateInstance, // Method to create an instance of MyComponent
+ NULL, // Initialization function
+ NULL // Set-up information (for filters)
+ }
+
+};
+
+// Generic way of determining the number of items in the template
+int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);
+
+
+CUnknown* WINAPI DiracDecodeSourceFilter::CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr)
+{
+ DiracDecodeSourceFilter *pNewObject = new DiracDecodeSourceFilter();
+ if (pNewObject == NULL) {
+ *pHr = E_OUTOFMEMORY;
+ }
+ return pNewObject;
+}
+
+DiracDecodeSourceFilter::DiracDecodeSourceFilter(void)
+ : CBaseFilter(NAME("DiracDecodeSourceFilter"), NULL, m_pLock, CLSID_DiracDecodeSourceFilter)
+{
+}
+
+DiracDecodeSourceFilter::~DiracDecodeSourceFilter(void)
+{
+}
+
+//BaseFilter Interface
+int DiracDecodeSourceFilter::GetPinCount() {
+ return 1;
+}
+CBasePin* DiracDecodeSourceFilter::GetPin(int inPinNo) {
+
+ if (inPinNo == 0) {
+ return mDiracSourcePin;
+ } else {
+ return NULL;
+ }
+}
+
+//IAMFilterMiscFlags Interface
+ULONG DiracDecodeSourceFilter::GetMiscFlags(void) {
+ return AM_FILTER_MISC_FLAGS_IS_SOURCE;
+}
+
+ //IFileSource Interface
+STDMETHODIMP DiracDecodeSourceFilter::GetCurFile(LPOLESTR* outFileName, AM_MEDIA_TYPE* outMediaType) {
+ //Return the filename and mediatype of the raw data
+
+
+ LPOLESTR x = SysAllocString(mFileName.c_str());
+ *outFileName = x;
+
+ return S_OK;
+}
+
+//ANX::: Seek table will need modifying to handle this.
+STDMETHODIMP DiracDecodeSourceFilter::Load(LPCOLESTR inFileName, const AM_MEDIA_TYPE* inMediaType) {
+ //Initialise the file here and setup all the streams
+ CAutoLock locLock(m_pLock);
+ mFileName = inFileName;
+
+
+
+ return S_OK;
+}
+
+STDMETHODIMP DiracDecodeSourceFilter::NonDelegatingQueryInterface(REFIID riid, void **ppv)
+{
+
+ return CBaseFilter::NonDelegatingQueryInterface(riid, ppv);
+}
+
+
+//IMEdiaStreaming
+STDMETHODIMP DiracDecodeSourceFilter::Run(REFERENCE_TIME tStart) {
+ const REFERENCE_TIME A_LONG_TIME = UNITS * 1000;
+ CAutoLock locLock(m_pLock);
+ //debugLog<<"Run : time = "<<tStart<<endl;
+ //DeliverNewSegment(tStart, tStart + A_LONG_TIME, 1.0);
+ return CBaseFilter::Run(tStart);
+
+
+}
+STDMETHODIMP DiracDecodeSourceFilter::Pause(void) {
+ CAutoLock locLock(m_pLock);
+ //debugLog << "** Pause called **"<<endl;
+ if (m_State == State_Stopped) {
+ //debugLog << "Was in stopped state... starting thread"<<endl;
+ if (ThreadExists() == FALSE) {
+ Create();
+ }
+ CallWorker(THREAD_RUN);
+ }
+ //debugLog<<"Was NOT is stopped state, not doing much at all..."<<endl;
+
+ HRESULT locHR = CBaseFilter::Pause();
+
+ return locHR;
+
+}
+STDMETHODIMP DiracDecodeSourceFilter::Stop(void) {
+ CAutoLock locLock(m_pLock);
+ //debugLog<<"** Stop Called ** "<<endl;
+ CallWorker(THREAD_EXIT);
+ Close();
+ //DeliverBeginFlush();
+ //DeliverEndFlush();
+ return CBaseFilter::Stop();
+}
+
+HRESULT DiracDecodeSourceFilter::DataProcessLoop() {
+
+ return S_OK;
+}
+
+//CAMThread Stuff
+DWORD DiracDecodeSourceFilter::ThreadProc(void) {
+ //debugLog << "Thread Proc Called..."<<endl;
+ while(true) {
+ DWORD locThreadCommand = GetRequest();
+ //debugLog << "Command = "<<locThreadCommand<<endl;
+ switch(locThreadCommand) {
+ case THREAD_EXIT:
+ //debugLog << "EXIT ** "<<endl;
+ Reply(S_OK);
+ return S_OK;
+
+ //case THREAD_PAUSE:
+ // // we are paused already
+ // Reply(S_OK);
+ // break;
+
+ case THREAD_RUN:
+ //debugLog << "RUN ** "<<endl;
+ Reply(S_OK);
+ DataProcessLoop();
+ break;
+ }
+
+
+ }
+ return S_OK;
+}
\ No newline at end of file
Added: trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/DiracDecodeSourceFilter.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/DiracDecodeSourceFilter.h 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/DiracDecodeSourceFilter.h 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,54 @@
+
+#pragma once
+#include "dsfDiracDecodeSource.h"
+
+#include <string>
+using namespace std;
+
+
+class DiracDecodeSourcePin;
+class DiracDecodeSourceFilter
+ : public CBaseFilter
+ , public IFileSourceFilter
+ , public IAMFilterMiscFlags
+ , public CAMThread
+{
+public:
+ enum eThreadCommands {
+ THREAD_EXIT = 0,
+ THREAD_PAUSE = 1,
+ THREAD_RUN = 2
+ };
+ DECLARE_IUNKNOWN
+ STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
+
+ DiracDecodeSourceFilter(void);
+ virtual ~DiracDecodeSourceFilter(void);
+
+ static CUnknown* WINAPI CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr);
+
+ //IBaseFilter Pure Virtuals
+ virtual int GetPinCount();
+ virtual CBasePin* GetPin(int inPinNo);
+
+ //IAMFilterMiscFlags Interface
+ ULONG STDMETHODCALLTYPE GetMiscFlags(void);
+ //
+
+ //IFileSource Interface
+ virtual STDMETHODIMP GetCurFile(LPOLESTR* outFileName, AM_MEDIA_TYPE* outMediaType);
+ virtual STDMETHODIMP Load(LPCOLESTR inFileName, const AM_MEDIA_TYPE* inMediaType);
+
+ //Streaming MEthods
+ STDMETHODIMP Run(REFERENCE_TIME tStart);
+ STDMETHODIMP Pause(void);
+ STDMETHODIMP Stop(void);
+
+ //CAMThread
+ virtual DWORD ThreadProc(void);
+protected:
+
+ HRESULT DataProcessLoop();
+ DiracDecodeSourcePin* mDiracSourcePin;
+ wstring mFileName;
+};
Added: trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/DiracDecodeSourcePin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/DiracDecodeSourcePin.cpp 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/DiracDecodeSourcePin.cpp 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,120 @@
+#include "StdAfx.h"
+#include ".\DiracDecodeSourcePin.h"
+
+DiracDecodeSourcePin::DiracDecodeSourcePin(DiracDecodeSourceFilter* inParentFilter, CCritSec* inFilterLock)
+ : CBaseOutputPin(NAME("Dirac Video Source Pin"), inParentFilter, inFilterLock, &mFilterHR, L"Video Out")
+{
+}
+
+DiracDecodeSourcePin::~DiracDecodeSourcePin(void)
+{
+}
+
+STDMETHODIMP DiracDecodeSourcePin::NonDelegatingQueryInterface(REFIID riid, void **ppv)
+{
+
+ return CBaseOutputPin::NonDelegatingQueryInterface(riid, ppv);
+}
+
+HRESULT DiracDecodeSourcePin::DeliverNewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
+{
+
+ mDataQueue->NewSegment(tStart, tStop, dRate);
+
+ return S_OK;
+}
+HRESULT DiracDecodeSourcePin::DeliverEndOfStream(void)
+{
+
+ mDataQueue->EOS();
+ return S_OK;
+}
+
+HRESULT DiracDecodeSourcePin::DeliverEndFlush(void)
+{
+ mDataQueue->EndFlush();
+ return S_OK;
+}
+
+HRESULT DiracDecodeSourcePin::DeliverBeginFlush(void)
+{
+
+ mDataQueue->BeginFlush();
+ return S_OK;
+}
+
+HRESULT DiracDecodeSourcePin::CompleteConnect (IPin *inReceivePin)
+{
+ mFilterHR = S_OK;
+ //Set the delegate for seeking
+ //((BasicSeekable*)(inReceivePin))->SetDelegate(this);
+ //This may cause issue if pins are disconnected and reconnected
+ //DELETE in DEStructor
+ mDataQueue = new COutputQueue (inReceivePin, &mFilterHR, FALSE, TRUE,1,TRUE, NUM_BUFFERS);
+ if (FAILED(mFilterHR)) {
+ mFilterHR = mFilterHR;
+ }
+
+ return CBaseOutputPin::CompleteConnect(inReceivePin);
+}
+
+HRESULT DiracDecodeSourcePin::BreakConnect(void) {
+ delete mDataQueue;
+ mDataQueue = NULL;
+ return CBaseOutputPin::BreakConnect();
+}
+
+ //CSourceStream virtuals
+HRESULT DiracDecodeSourcePin::GetMediaType(int inPosition, CMediaType* outMediaType) {
+ //Put it in from the info we got in the constructor.
+ //NOTE::: May have missed some fields ????
+ //NOTE::: May want to check for null pointers
+ //outMediaType->SetFormat(mMediaType->Format(), mMediaType->FormatLength());
+ if (inPosition == 0) {
+ CMediaType locMediaType;
+
+ locMediaType.majortype = MEDIATYPE_Video;
+ locMediaType.subtype = MEDIASUBTYPE_YV12;
+ locMediaType.formattype = FORMAT_VideoInfo;
+ locMediaType.cbFormat = sizeof(VIDEOINFOHEADER);
+ locMediaType.pbFormat = NULL; //(BYTE*)mCMMLFormatBlock; //(BYTE*)locSpeexFormatInfo;
+ locMediaType.pUnk = NULL;
+ *outMediaType = locMediaType;
+ return S_OK;
+ } else {
+ return VFW_S_NO_MORE_ITEMS;
+ }
+}
+HRESULT DiracDecodeSourcePin::CheckMediaType(const CMediaType* inMediaType) {
+ if ((inMediaType->majortype == MEDIATYPE_Video) && (inMediaType->subtype == MEDIASUBTYPE_YV12)) {
+ return S_OK;
+ } else {
+ return E_FAIL;
+ }
+}
+HRESULT DiracDecodeSourcePin::DecideBufferSize(IMemAllocator* inoutAllocator, ALLOCATOR_PROPERTIES* inoutInputRequest) {
+
+ HRESULT locHR = S_OK;
+
+ ALLOCATOR_PROPERTIES locReqAlloc;
+ ALLOCATOR_PROPERTIES locActualAlloc;
+
+
+ locReqAlloc.cbAlign = 1;
+ locReqAlloc.cbBuffer = BUFFER_SIZE;
+ locReqAlloc.cbPrefix = 0;
+ locReqAlloc.cBuffers = NUM_BUFFERS;
+
+ locHR = inoutAllocator->SetProperties(&locReqAlloc, &locActualAlloc);
+
+ if (locHR != S_OK) {
+ return locHR;
+ }
+
+ locHR = inoutAllocator->Commit();
+
+ return locHR;
+
+}
+
+
Added: trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/DiracDecodeSourcePin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/DiracDecodeSourcePin.h 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/DiracDecodeSourcePin.h 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,73 @@
+//===========================================================================
+//Copyright (C) 2003, 2004 Zentaro Kavanagh
+//
+//Copyright (C) 2003, 2004 Commonwealth Scientific and Industrial Research
+// Organisation (CSIRO) Australia
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//- Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+//- Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+//- Neither the name of Zentaro Kavanagh nor the names of contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+//PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
+//CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+//EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+//PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+//LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+//NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//===========================================================================
+
+#pragma once
+#include "dsfDiracDecodeSource.h"
+#include "DiracDecodeSourceFilter.h"
+#include <fstream>
+using namespace std;
+class DiracDecodeSourcePin
+ : public CBaseOutputPin
+{
+public:
+
+ DECLARE_IUNKNOWN
+ STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
+
+ DiracDecodeSourcePin( DiracDecodeSourceFilter* inParentFilter, CCritSec* inFilterLock);
+
+ virtual ~DiracDecodeSourcePin(void);
+
+ static const unsigned long BUFFER_SIZE = 65536; //What should this be ????
+ static const unsigned long NUM_BUFFERS = 10;
+
+ //CBaseOutputPin virtuals
+ virtual HRESULT GetMediaType(int inPosition, CMediaType* outMediaType);
+ virtual HRESULT CheckMediaType(const CMediaType* inMediaType);
+ virtual HRESULT DecideBufferSize(IMemAllocator* inoutAllocator, ALLOCATOR_PROPERTIES* inoutInputRequest);
+
+
+ //IPin
+ virtual HRESULT CompleteConnect (IPin *inReceivePin);
+ virtual HRESULT BreakConnect(void);
+ virtual HRESULT DeliverNewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
+ virtual HRESULT DeliverEndOfStream(void);
+ virtual HRESULT DeliverEndFlush(void);
+ virtual HRESULT DeliverBeginFlush(void);
+protected:
+ //fstream debugLog;
+ HRESULT mFilterHR;
+ COutputQueue* mDataQueue;
+
+};
Added: trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/ReadMe.txt
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/ReadMe.txt 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/ReadMe.txt 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,32 @@
+========================================================================
+ DYNAMIC LINK LIBRARY : dsfDiracDecodeSource Project Overview
+========================================================================
+
+AppWizard has created this dsfDiracDecodeSource DLL for you.
+This file contains a summary of what you will find in each of the files that
+make up your dsfDiracDecodeSource application.
+
+
+dsfDiracDecodeSource.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.
+
+dsfDiracDecodeSource.cpp
+ This is the main DLL source file.
+
+/////////////////////////////////////////////////////////////////////////////
+Other standard files:
+
+StdAfx.h, StdAfx.cpp
+ These files are used to build a precompiled header (PCH) file
+ named dsfDiracDecodeSource.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/lib/codecs/dirac/filters/dsfDiracDecodeSource/dsfDiracDecodeSource.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/dsfDiracDecodeSource.cpp 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/dsfDiracDecodeSource.cpp 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,118 @@
+//===========================================================================
+//Copyright (C) 2003, 2004 Zentaro Kavanagh
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//- Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+//- Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+//- Neither the name of Zentaro Kavanagh nor the names of contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+//PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
+//CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+//EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+//PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+//LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+//NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//===========================================================================
+#include "StdAfx.h"
+
+
+
+
+extern "C" BOOL WINAPI DllEntryPoint(HINSTANCE, ULONG, LPVOID);
+BOOL APIENTRY DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved)
+{
+ return DllEntryPoint((HINSTANCE)(hModule), dwReason, lpReserved);
+}
+
+
+//The folowing two functions do the registration and deregistration of the dll and it's contained com objects.
+STDAPI DllRegisterServer()
+{
+
+ ////TO DO::: Should we be releasing the filter mapper even when we return early ?
+ // HRESULT hr;
+ // IFilterMapper2* locFilterMapper = NULL;
+ //
+ // hr = AMovieDllRegisterServer2(TRUE);
+ //if (FAILED(hr)) {
+ //
+ // return hr;
+ //}
+ //
+ //
+
+ // hr = CoCreateInstance(CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, IID_IFilterMapper2, (void **)&locFilterMapper);
+
+ //
+ //if (FAILED(hr)) {
+ // return hr;
+ //}
+ //
+ //hr = locFilterMapper->RegisterFilter(
+ // CLSID_OggDemuxSourceFilter, // Filter CLSID.
+ // L"Ogg Demux Source Filter", // Filter name.
+ // NULL, // Device moniker.
+ // &CLSID_LegacyAmFilterCategory, // Direct Show general category
+ // L"Ogg Demux Source Filter", // Instance data. ???????
+ // &OggDemuxSourceFilterReg // Pointer to filter information.
+ // );
+
+
+ ////Only call once... if you need multiple you have to fix the hack job in RegWrap !
+ //RegWrap::addMediaPlayerDesc("Ogg File", "*.ogg;*.ogv;*.oga;*.spx");
+
+
+
+
+
+ // locFilterMapper->Release();
+
+ // return hr;
+ return S_OK;
+}
+
+STDAPI DllUnregisterServer()
+{
+ ////This is not a general purpose function.
+ //RegWrap::removeMediaDesc();
+
+ // HRESULT hr;
+ // IFilterMapper2* locFilterMapper = NULL;
+
+ // hr = AMovieDllRegisterServer2(FALSE);
+ //if (FAILED(hr)) {
+ //
+ // return hr;
+ //}
+ //
+ // hr = CoCreateInstance(CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER,
+ // IID_IFilterMapper2, (void **)&locFilterMapper);
+
+ //if (FAILED(hr)) {
+ // return hr;
+ //}
+ //
+
+ // hr = locFilterMapper->UnregisterFilter(&CLSID_LegacyAmFilterCategory,
+ // L"Ogg Demux Source Filter", CLSID_OggDemuxSourceFilter);
+
+ ////
+ // locFilterMapper->Release();
+ // return hr;
+ return S_OK;
+}
Added: trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/dsfDiracDecodeSource.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/dsfDiracDecodeSource.h 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/dsfDiracDecodeSource.h 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,162 @@
+//===========================================================================
+//Copyright (C) 2003, 2004 Zentaro Kavanagh
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//- Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+//- Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+//- Neither the name of Zentaro Kavanagh nor the names of contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+//PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
+//CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+//EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+//PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+//LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+//NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//===========================================================================
+#pragma once
+#include <streams.h>
+#include <pullpin.h>
+#include <initguid.h>
+
+// {278EA0E1-B5B3-444d-92BA-9B90C801C9A9}
+DEFINE_GUID(CLSID_DiracDecodeSourceFilter,
+0x278ea0e1, 0xb5b3, 0x444d, 0x92, 0xba, 0x9b, 0x90, 0xc8, 0x1, 0xc9, 0xa9);
+
+
+//
+//
+//
+//#ifdef LIBOOOGG_EXPORTS
+//#define LIBOOOGG_API __declspec(dllexport)
+//#else
+//#define LIBOOOGG_API __declspec(dllimport)
+//#endif
+//
+//
+//#ifdef DSFOGGDEMUX_EXPORTS
+//#pragma message("----> Exporting from Ogg Demux...")
+//#define OGG_DEMUX_API __declspec(dllexport)
+//#else
+//#pragma message("<---- Importing from Ogg Demux...")
+//#define OGG_DEMUX_API __declspec(dllimport)
+//#endif
+//
+//
+//// {4BB64C4A-1674-436b-A49D-D6B3B64DBD60}
+//DEFINE_GUID(CLSID_PropsAbout,
+//0x4bb64c4a, 0x1674, 0x436b, 0xa4, 0x9d, 0xd6, 0xb3, 0xb6, 0x4d, 0xbd, 0x60);
+//
+////New section
+//// {31CA0186-1FF0-4181-AA38-3CA4040BD260}
+//DEFINE_GUID(CLSID_OggDemuxSourceFilter,
+//0x31ca0186, 0x1ff0, 0x4181, 0xaa, 0x38, 0x3c, 0xa4, 0x4, 0xb, 0xd2, 0x60);
+//
+//// {3913F0AB-E7ED-41c4-979B-1D1FDD983C07}
+//DEFINE_GUID(MEDIASUBTYPE_FLAC,
+//0x3913f0ab, 0xe7ed, 0x41c4, 0x97, 0x9b, 0x1d, 0x1f, 0xdd, 0x98, 0x3c, 0x7);
+//
+//
+//// {8A0566AC-42B3-4ad9-ACA3-93B906DDF98A}
+//DEFINE_GUID(MEDIASUBTYPE_Vorbis,
+//0x8a0566ac, 0x42b3, 0x4ad9, 0xac, 0xa3, 0x93, 0xb9, 0x6, 0xdd, 0xf9, 0x8a);
+//
+//// {25A9729D-12F6-420e-BD53-1D631DC217DF}
+//DEFINE_GUID(MEDIASUBTYPE_Speex,
+//0x25a9729d, 0x12f6, 0x420e, 0xbd, 0x53, 0x1d, 0x63, 0x1d, 0xc2, 0x17, 0xdf);
+//
+//// {44E04F43-58B3-4de1-9BAA-8901F852DAE4}
+//DEFINE_GUID(FORMAT_Vorbis,
+//0x44e04f43, 0x58b3, 0x4de1, 0x9b, 0xaa, 0x89, 0x1, 0xf8, 0x52, 0xda, 0xe4);
+//
+//// {78701A27-EFB5-4157-9553-38A7854E3E81}
+//DEFINE_GUID(FORMAT_Speex,
+//0x78701a27, 0xefb5, 0x4157, 0x95, 0x53, 0x38, 0xa7, 0x85, 0x4e, 0x3e, 0x81);
+//
+//// {1CDC48AC-4C24-4b8b-982B-7007A29D83C4}
+//DEFINE_GUID(FORMAT_FLAC,
+//0x1cdc48ac, 0x4c24, 0x4b8b, 0x98, 0x2b, 0x70, 0x7, 0xa2, 0x9d, 0x83, 0xc4);
+//
+//
+//// {05187161-5C36-4324-A734-22BF37509F2D}
+//DEFINE_GUID(CLSID_TheoraDecodeFilter,
+//0x5187161, 0x5c36, 0x4324, 0xa7, 0x34, 0x22, 0xbf, 0x37, 0x50, 0x9f, 0x2d);
+//
+//// {D124B2B1-8968-4ae8-B288-FE16EA34B0CE}
+//DEFINE_GUID(MEDIASUBTYPE_Theora,
+//0xd124b2b1, 0x8968, 0x4ae8, 0xb2, 0x88, 0xfe, 0x16, 0xea, 0x34, 0xb0, 0xce);
+//
+//// {A99F116C-DFFA-412c-95DE-725F99874826}
+//DEFINE_GUID(FORMAT_Theora,
+//0xa99f116c, 0xdffa, 0x412c, 0x95, 0xde, 0x72, 0x5f, 0x99, 0x87, 0x48, 0x26);
+//
+////This structure defines the type of input we accept on the input pin... Stream/Annodex
+//
+//
+////Structure defining the registration details of the filter
+//const REGFILTER2 OggDemuxSourceFilterReg = {
+// 1,
+// MERIT_NORMAL,
+// 0,
+// NULL
+//
+//};
+//
+//
+//struct sVorbisFormatBlock {
+// unsigned long vorbisVersion;
+// unsigned long samplesPerSec;
+// unsigned long minBitsPerSec;
+// unsigned long avgBitsPerSec;
+// unsigned long maxBitsPerSec;
+// unsigned char numChannels;
+//};
+//
+//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;
+// unsigned long sampleRate;
+//
+//};
+//
+//struct sTheoraFormatBlock {
+// unsigned long theoraVersion;
+// unsigned long width;
+// unsigned long height;
+// unsigned long frameWidth;
+// unsigned long frameHeight;
+// unsigned long frameRateNumerator;
+// unsigned long frameRateDenominator;
+// unsigned long aspectNumerator;
+// unsigned long aspectDenominator;
+// unsigned long maxKeyframeInterval;
+// unsigned long targetBitrate;
+// unsigned char targetQuality;
+// unsigned char xOffset;
+// unsigned char yOffset;
+// unsigned char colourSpace;
+//};
\ No newline at end of file
Added: trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/dsfDiracDecodeSource.vcproj
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/dsfDiracDecodeSource.vcproj 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/dsfDiracDecodeSource.vcproj 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="dsfDiracDecodeSource"
+ ProjectGUID="{2DDC7218-82D9-403E-BCE8-0D535266D19D}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="C:\DXSDK\Samples\C++\DirectShow\BaseClasses"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DSFDIRACDECODESOURCE_EXPORTS"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="3"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"
+ CallingConvention="2"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Strmbasd.lib Msvcrtd.lib Winmm.lib Strmiids.lib Quartz.lib"
+ OutputFile="$(OutDir)/dsfDiracDecodeSource.dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/dsfDiracDecodeSource.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/dsfDiracDecodeSource.lib"
+ 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="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="C:\DXSDK\Samples\C++\DirectShow\BaseClasses"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFDIRACDECODESOURCE_EXPORTS"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="3"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"
+ CallingConvention="2"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Strmbase.lib Winmm.lib Strmiids.lib Quartz.lib"
+ OutputFile="$(OutDir)/dsfDiracDecodeSource.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="C:\DXSDK\Lib;"C:\DXSDK\Samples\C++\DirectShow\BaseClasses\Release""
+ GenerateDebugInformation="TRUE"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)/dsfDiracDecodeSource.lib"
+ 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=".\DiracDecodeSourceFilter.cpp">
+ </File>
+ <File
+ RelativePath=".\DiracDecodeSourcePin.cpp">
+ </File>
+ <File
+ RelativePath=".\dsfDiracDecodeSource.cpp">
+ </File>
+ <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>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <File
+ RelativePath=".\DiracDecodeSourceFilter.h">
+ </File>
+ <File
+ RelativePath=".\DiracDecodeSourcePin.h">
+ </File>
+ <File
+ RelativePath=".\dsfDiracDecodeSource.h">
+ </File>
+ <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>
Added: trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/stdafx.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/stdafx.cpp 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/stdafx.cpp 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+// dsfDiracDecodeSource.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/lib/codecs/dirac/filters/dsfDiracDecodeSource/stdafx.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/stdafx.h 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracDecodeSource/stdafx.h 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,15 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#pragma once
+
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+// Windows Header Files:
+#include <windows.h>
+
+// TODO: reference additional headers your program requires here
+#include "DiracDecodeSourcePin.h"
+#include "DiracDecodeSourceFilter.h"
\ No newline at end of file
Added: trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeFilter.cpp 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeFilter.cpp 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,92 @@
+//===========================================================================
+//Copyright (C) 2003, 2004 Zentaro Kavanagh
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//- Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+//- Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+//- Neither the name of Zentaro Kavanagh nor the names of contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+//PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
+//CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+//EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+//PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+//LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+//NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//===========================================================================
+
+#include "StdAfx.h"
+#include "Diracencodefilter.h"
+
+
+//COM Factory Template
+CFactoryTemplate g_Templates[] =
+{
+ {
+ L"Dirac Encode Filter", // Name
+ &CLSID_DiracEncodeFilter, // CLSID
+ DiracEncodeFilter::CreateInstance, // Method to create an instance of MyComponent
+ NULL, // Initialization function
+ NULL // Set-up information (for filters)
+ }
+
+
+};
+
+// Generic way of determining the number of items in the template
+int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);
+
+CUnknown* WINAPI DiracEncodeFilter::CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr)
+{
+ //This routine is the COM implementation to create a new Filter
+ DiracEncodeFilter *pNewObject = new DiracEncodeFilter();
+ if (pNewObject == NULL) {
+ *pHr = E_OUTOFMEMORY;
+ }
+ return pNewObject;
+}
+STDMETHODIMP DiracEncodeFilter::NonDelegatingQueryInterface(REFIID riid, void **ppv) {
+
+
+
+ return AbstractVideoEncodeFilter::NonDelegatingQueryInterface(riid, ppv);
+}
+
+DiracEncodeFilter::DiracEncodeFilter(void)
+ : AbstractVideoEncodeFilter(NAME("Dirac Encoder"), CLSID_DiracEncodeFilter, AbstractVideoEncodeFilter::DIRAC)
+{
+ bool locWasConstructed = ConstructPins();
+}
+
+DiracEncodeFilter::~DiracEncodeFilter(void)
+{
+}
+
+bool DiracEncodeFilter::ConstructPins()
+{
+
+ CMediaType* locOutputMediaType = new CMediaType(&MEDIATYPE_Video);
+ locOutputMediaType->subtype = MEDIASUBTYPE_Dirac;
+ locOutputMediaType->formattype = FORMAT_Dirac;
+ //Output pin must be done first because it's passed to the input pin.
+ mOutputPin = new DiracEncodeOutputPin(this, m_pLock, locOutputMediaType);
+
+
+ mInputPin = new DiracEncodeInputPin(this, m_pLock, mOutputPin);
+ return true;
+}
+
Added: trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeFilter.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeFilter.h 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeFilter.h 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,80 @@
+//===========================================================================
+//Copyright (C) 2003, 2004 Zentaro Kavanagh
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//- Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+//- Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+//- Neither the name of Zentaro Kavanagh nor the names of contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+//PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
+//CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+//EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+//PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+//LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+//NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//===========================================================================
+
+#pragma once
+
+#include "dsfDiracEncodeFilter.h"
+//#include "AbstractVideoEncodeFilter.h"
+
+//Forward Declarations
+
+class DiracEncodeInputPin;
+class DiracEncodeOutputPin;
+
+class DiracEncodeFilter
+ //Base classes
+ : public AbstractVideoEncodeFilter
+{
+public:
+ //Friends classes
+ friend class DiracEncodeInputPin;
+ friend class DiracEncodeOutputPin;
+
+ //Constructors and Destructors
+ DiracEncodeFilter(void);
+ virtual ~DiracEncodeFilter(void);
+
+ //COM Functions
+ DECLARE_IUNKNOWN
+ static CUnknown* WINAPI DiracEncodeFilter::CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr);
+ STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
+
+ ////IDiracEncodeSettings Implementation
+ //STDMETHODIMP_(unsigned long) targetBitrate();
+ //STDMETHODIMP_(unsigned char) quality();
+ //STDMETHODIMP_(unsigned long) keyframeFreq();
+
+ //STDMETHODIMP_(bool) setTargetBitrate(unsigned long inBitrate);
+ //STDMETHODIMP_(bool) setQuality(unsigned char inQuality);
+ //STDMETHODIMP_(bool) setKeyframeFreq(unsigned long inKeyframeFreq);
+ ////
+
+ //AbstractVideoEncodeFilter pure virtuals
+ virtual bool ConstructPins();
+
+ //SpecifyPropertyPages Implementation
+ //STDMETHODIMP DiracEncodeFilter::GetPages(CAUUID* outPropPages);
+
+protected:
+ //Member data
+ sDiracFormatBlock mDiracFormatBlock;
+
+};
Added: trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeInputPin.cpp 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeInputPin.cpp 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,530 @@
+//===========================================================================
+//Copyright (C) 2003, 2004 Zentaro Kavanagh
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//- Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+//- Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+//- Neither the name of Zentaro Kavanagh nor the names of contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+//PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
+//CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+//EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+//PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+//LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+//NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//===========================================================================
+
+#include "StdAfx.h"
+#include "diracencodeinputpin.h"
+
+DiracEncodeInputPin::DiracEncodeInputPin(AbstractVideoEncodeFilter* inParentFilter, CCritSec* inFilterLock, AbstractVideoEncodeOutputPin* inOutputPin)
+ : AbstractVideoEncodeInputPin(inParentFilter, inFilterLock, inOutputPin, NAME("DiracEncodeInputPin"), L"YV12 In")
+ , mXOffset(0)
+ , mYOffset(0)
+
+
+{
+ //debugLog.open("g:\\logs\\theoencfiltinput.log", ios_base::out);
+
+
+}
+
+DiracEncodeInputPin::~DiracEncodeInputPin(void)
+{
+ //debugLog.close();
+ DestroyCodec();
+
+
+}
+
+
+HRESULT DiracEncodeInputPin::deliverData(LONGLONG inStart, LONGLONG inEnd, unsigned char* inBuf, unsigned long inNumBytes) {
+ //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);
+
+ if (locHR != S_OK) {
+ //We get here when the application goes into stop mode usually.
+ return locHR;
+ }
+
+ BYTE* locBuffer = NULL;
+
+
+ //Make our pointers set to point to the samples buffer
+ locSample->GetPointer(&locBuffer);
+
+ if (locSample->GetSize() >= inNumBytes) {
+
+ memcpy((void*)locBuffer, (const void*)inBuf, inNumBytes);
+
+ //Set the sample parameters.
+ SetSampleParams(locSample, inNumBytes, &inStart, &inEnd);
+
+ {
+ CAutoLock locLock(m_pLock);
+
+ HRESULT locHR = mOutputPin->mDataQueue->Receive(locSample); //->DownstreamFilter()->Receive(locSample);
+ if (locHR != S_OK) {
+ return locHR;
+ } else {
+ }
+ }
+ //debugLog<<"deliverData : SUCCESS"<<endl;
+ return S_OK;
+ } else {
+ //debugLog<<"Buffer too small !!!! FATALITY !"<<endl;
+ throw 0;
+ }
+
+}
+
+long DiracEncodeInputPin::encodeYV12ToYV12(unsigned char* inBuf, long inNumBytes) {
+ ////Source Buffer all in one buffer
+
+ ////YV12 memory layout for directshow
+ ////=================================
+ ////YYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYY
+ ////YYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYY
+ ////YYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYY
+ ////YYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYY
+ ////VVVVVVVVVVVVVVVVVVVVVVVV VVVVVVVVVVVVVVVVVVVVVVVV
+ ////UUUUUUUUUUUUUUUUUUUUUUUU UUUUUUUUUUUUUUUUUUUUUUUU
+
+
+ ////Destination buffer Y, U, V in seperate planes, lowercase are line padding, "." height padding
+ ////.............................. ..............................
+ ////.............................. ..............................
+ ////yyyyyyYYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYYyyyyyy
+ ////yyyyyyYYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYYyyyyyy
+ ////yyyyyyYYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYYyyyyyy
+ ////yyyyyyYYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYYyyyyyy
+ ////.............................. ..............................
+ ////.............................. ..............................
+
+ ////.............................. ..............................
+ ////vvvVVVVVVVVVVVVVVVVVVVVVVVVvvv vvvVVVVVVVVVVVVVVVVVVVVVVVVvvv
+ ////.............................. ..............................
+ //
+ ////.............................. ..............................
+ ////uuuUUUUUUUUUUUUUUUUUUUUUUUUuuu uuuUUUUUUUUUUUUUUUUUUUUUUUUuuu
+ ////.............................. ..............................
+
+ ////NOTE : mHeight, mWidth are the actual video sizes and are the sizes of the incoming buffer
+ //// The yuv width, height parameters are a /16 up rounded size of the output buffer to be sent to libDirac
+
+
+ ////Setup the source pointer
+ //unsigned char* locSourceUptoPtr = inBuf; //View only... don't delete locUptoPtr
+ ////
+ //
+ ////========
+ ////Y DATA |
+ ////=========================================================================================================
+
+ ////Setup the destination pointer
+ //char* locDestUptoPtr = mYUV.y;
+ ////
+
+ ////Pad top of Y plane buffer with mYOffset lines of width mYUV.y_width
+ //if (mYOffset != 0) {
+ // memset((void*)locDestUptoPtr, NULL, mYOffset * mYUV.y_width); //Is it needed to zero this out ? Or just leave junk ?
+ // locDestUptoPtr += (mYOffset * mYUV.y_width);
+ //}
+ ////Source pointer does not advance
+ ////
+
+ ////Add mHeight lines of data of width mWidth plus padding of mXOffset at each end
+ //if (mXOffset == 0) {
+ // //Slight optimisation to keep the inner loop tighter
+ // for (long line = 0; line < mHeight; line++) {
+ // memcpy((void*)locDestUptoPtr, (const void*)locSourceUptoPtr, mWidth);
+ // locSourceUptoPtr += mWidth;
+ // locDestUptoPtr += mWidth;
+ // }
+ //} else {
+ // for (long line = 0; line < mHeight; line++) {
+ // //Pad the start of the line with mXOffset bytes
+ // memset((void*)locDestUptoPtr, NULL, mXOffset);
+ // locDestUptoPtr += mXOffset;
+
+ // //Fill in the meaty bit
+ // memcpy((void*)locDestUptoPtr, (const void*)locSourceUptoPtr, mWidth);
+ // locSourceUptoPtr += mWidth;
+ // locDestUptoPtr += mWidth;
+
+ // //Pad the end of the line with mXOffset bytes
+ // memset((void*)locDestUptoPtr, NULL, mXOffset);
+ // locDestUptoPtr += mXOffset;
+ // }
+
+ //}
+
+ ////Pad bottom of Y plane buffer with mYOffset lines of width mYUV.y_width
+ //if (mYOffset != 0) {
+ // memset((void*)locDestUptoPtr, NULL, mYOffset * mYUV.y_width); //Is it needed to zero this out ? Or just leave junk ?
+ // locDestUptoPtr += (mYOffset * mYUV.y_width);
+ // //Source pointer does not advance
+ //}
+ //
+
+
+ ////========
+ ////V DATA |
+ ////=========================================================================================================
+
+ ////Set the destination poitner
+ //locDestUptoPtr = mYUV.v;
+ ////
+
+ ////Pad top of V plane buffer with mYOffset/2 lines of width mYUV.uv_width
+ //if (mYOffset != 0) {
+ // memset((void*)locDestUptoPtr, NULL, (mYOffset * mYUV.uv_width) / 2); //Is it needed to zero this out ? Or just leave junk ?
+ // locDestUptoPtr += ((mYOffset * mYUV.uv_width) / 2);
+ // //Source pointer does not advance
+ //}
+ ////
+
+ ////Add mHeight/2 lines of data of length mWidth/2 plus padded by mXOffset/2 at each end
+ //if (mXOffset == 0) {
+ // //Slight optimisation to keep the inner loop tighter
+ // for (long line = 0; line < mHeight / 2; line++) {
+ // memcpy((void*)locDestUptoPtr, (const void*)locSourceUptoPtr, mWidth / 2);
+ // locSourceUptoPtr += (mWidth / 2);
+ // locDestUptoPtr += (mWidth / 2);
+ // }
+ //} else {
+ // for (long line = 0; line < mHeight / 2; line++) {
+ // //Pad the start of the line
+ // memset((void*)locDestUptoPtr, NULL, mXOffset / 2);
+ // locDestUptoPtr += (mXOffset / 2);
+ // //Source pointer does not advance
+
+ // //Fill in the meaty bit
+ // memcpy((void*)locDestUptoPtr, (const void*)locSourceUptoPtr, mWidth / 2);
+ // locSourceUptoPtr += (mWidth / 2);
+ // locDestUptoPtr += (mWidth / 2);
+
+ // //Pad the end of the line
+ // memset((void*)locDestUptoPtr, NULL, mXOffset / 2);
+ // locDestUptoPtr += (mXOffset / 2);
+ // //Source pointer does not advance
+ // }
+
+ //}
+
+ ////Pad bottom of V plane buffer with mYOffset / 2 lines of width mYUV.uv_width
+ //if (mYOffset != 0) {
+ // memset((void*)locDestUptoPtr, NULL, (mYOffset * mYUV.uv_width) / 2); //Is it needed to zero this out ? Or just leave junk ?
+ // locDestUptoPtr += ((mYOffset * mYUV.uv_width) / 2);
+ // //Source pointer does not advance
+ //}
+ //
+
+
+
+
+ ////========
+ ////U DATA |
+ ////=========================================================================================================
+
+ ////Set the destination pointer
+ //locDestUptoPtr = mYUV.u;
+ ////
+
+ ////Pad top of U plane buffer with mYOffset/2 lines of width mYUV.uv_width
+ //if (mYOffset != 0) {
+ // memset((void*)locDestUptoPtr, NULL, (mYOffset * mYUV.uv_width) / 2); //Is it needed to zero this out ? Or just leave junk ?
+ // locDestUptoPtr += ((mYOffset * mYUV.uv_width) / 2);
+ // //Source pointer does not advance
+ //}
+ ////
+
+ ////Add mHeight/2 lines of data of length mWidth/2 plus padded by mXOffset/2 at each end
+ //if (mXOffset == 0) {
+ // //Slight optimisation to keep the inner loop tighter
+ // for (long line = 0; line < mHeight / 2; line++) {
+ // memcpy((void*)locDestUptoPtr, (const void*)locSourceUptoPtr, mWidth / 2);
+ // locSourceUptoPtr += (mWidth / 2);
+ // locDestUptoPtr += (mWidth / 2);
+ // }
+ //} else {
+ // for (long line = 0; line < mHeight / 2; line++) {
+ // //Pad the start of the line
+ // memset((void*)locDestUptoPtr, NULL, mXOffset / 2);
+ // locDestUptoPtr += (mXOffset / 2);
+ // //Source pointer does not advance
+
+ // //Fill in the meaty bit
+ // memcpy((void*)locDestUptoPtr, (const void*)locSourceUptoPtr, mWidth / 2);
+ // locSourceUptoPtr += (mWidth / 2);
+ // locDestUptoPtr += (mWidth / 2);
+
+ // //Pad the end of the line
+ // memset((void*)locDestUptoPtr, NULL, mXOffset / 2);
+ // locDestUptoPtr += (mXOffset / 2);
+ // //Source pointer does not advance
+ // }
+
+ //}
+
+ ////Pad bottom of U plane buffer with mYOffset / 2 lines of width mYUV.uv_width
+ //if (mYOffset != 0) {
+ // memset((void*)locDestUptoPtr, NULL, (mYOffset * mYUV.uv_width) / 2); //Is it needed to zero this out ? Or just leave junk ?
+ // locDestUptoPtr += ((mYOffset * mYUV.uv_width) / 2);
+ // //Source pointer does not advance
+ //}
+
+ ////======================================================================================================
+ return 0;
+
+}
+
+//-------------------------------------------------------------------------
+
+
+
+
+
+//PURE VIRTUALS
+long DiracEncodeInputPin::encodeData(unsigned char* inBuf, long inNumBytes) {
+
+ //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;
+ //mBegun = true;
+ //
+ //StampedOggPacket** locHeaders;
+ //locHeaders = mTheoraEncoder.initCodec(mTheoraInfo);
+
+ //for (int i = 0; i < 3; i++) {
+ // locHR = deliverData(0,0,locHeaders[i]->packetData(), locHeaders[i]->packetSize());
+ // if (locHR != S_OK) {
+ // return locHR;
+ // }
+ //}
+ }
+
+ if (mPinInputType.subtype == MEDIASUBTYPE_YV12) {
+
+ encodeYV12ToYV12(inBuf, inNumBytes);
+
+
+
+
+ //} else if (mPinInputType.subtype == MEDIASUBTYPE_AYUV) {
+ // encodeAYUVtoYV12(inBuf, inNumBytes);
+
+ //} else if (mPinInputType.subtype == MEDIASUBTYPE_RGB32) {
+ // encodeRGB32toYV12(inBuf, inNumBytes);
+
+ //} else if (mPinInputType.subtype == MEDIASUBTYPE_RGB24) {
+ // encodeRGB24toYV12(inBuf, inNumBytes);
+
+
+ //} else if (mPinInputType.subtype == MEDIASUBTYPE_YV12) {
+ // //Should be more specifc.
+ // //debugLog<<"About to encode YV12 to YV12"<<endl;
+ // encodeYV12ToYV12(inBuf, inNumBytes);
+ //} else if (mPinInputType.subtype == MEDIASUBTYPE_UYVY) {
+ //
+ //
+ // encodeUYVYToYV12(inBuf, inNumBytes);
+
+ //} else if (mPinInputType.subtype == MEDIASUBTYPE_YVYU) {
+ //
+ //
+ // encodeYVYUToYV12(inBuf, inNumBytes);
+ //} else if (mPinInputType.subtype == MEDIASUBTYPE_IYUV) {
+ //
+ //
+ // encodeIYUVToYV12(inBuf, inNumBytes);
+
+
+ } else {
+
+ //FATAL ERROR
+ throw 0;
+ }
+
+
+ //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 DiracEncodeInputPin::ConstructCodec() {
+
+ //debugLog<<"Contructing codec..."<<endl;
+// theora_info_init(&mTheoraInfo);
+
+ //Round up to multiple of 16 for theora
+
+ //---------------------------------------------------------------------------------------------------------------
+ //mTheoraInfo values
+ //==================
+ //width, height - /16 up rounded values
+ //frame_width, frame_height - raw video source values
+ //offset_x - CENTRED - *half* the difference between width and frame_width
+ //offset_y - CENTRED - *half* the difference between height and frame_heigth
+
+ //mYUV values - for YV12 format
+ //=============================
+ //y_width, y_stride - Both equal and equal to the /16 up rounded wdith values
+ //uv_width, uv_stride - Both equal and equal to *half* the /16 up rounded width values
+ //y_height - Equal to the /16 up rounded height value
+ //uv_height - Equal to *half* the /16 up rounded height value
+ //y - Buffer of size y_width*y_height (/16 up rounded values)
+ //u,v - Buffers each *quarter* the size of the y buffer (/16 up rounded values)
+
+ //Member data
+ //===========
+ //mWidth - raw video source values... equal to frame_width
+ //mHeight - raw video source values... equal to frame_height
+ //mXOffset - x offset
+ //mYOffset - y offset
+ //---------------------------------------------------------------------------------------------------------------
+
+ ////Width data
+ //mTheoraInfo.width = mYUV.y_width
+ // = mYUV.y_stride
+ // = (((mVideoFormat->bmiHeader.biWidth + 15)>>4)<<4);
+
+ //mTheoraInfo.frame_width = mWidth
+ // = mVideoFormat->bmiHeader.biWidth;
+
+ //mYUV.uv_width = mYUV.uv_stride
+ // = mYUV.y_width/2;
+
+ //
+ ////
+
+ ////Height data
+ //mTheoraInfo.height = mYUV.y_height
+ // = (((mVideoFormat->bmiHeader.biHeight + 15)>>4)<<4);
+
+ //mTheoraInfo.frame_height = mHeight
+ // = mVideoFormat->bmiHeader.biHeight;
+
+ //mYUV.uv_height = mYUV.y_height/2;
+
+ //
+ ////
+
+ ////Set offset values... centred
+ //mTheoraInfo.offset_x = mXOffset
+ // = (mTheoraInfo.width - mWidth) / 2;
+
+ //mTheoraInfo.offset_y = mYOffset
+ // = (mTheoraInfo.height - mHeight) / 2;
+ //
+ //unsigned long locYBuffSize = mYUV.y_height * mYUV.y_width;
+ //mYUV.y = new char[locYBuffSize];
+ //mYUV.u = new char[locYBuffSize/4];
+ //mYUV.v = new char[locYBuffSize/4];
+
+ ////End YV12 specifics
+ ////
+
+ ////debugLog<<"Width =y_w = y_s = "<<mWidth<<" ::: "<<"Height=y_h= "<<mHeight<<endl;
+ ////debugLog<<"uv_w=uv_s= "<<mYUV.uv_stride<<" ::: " <<"uv_height = "<<mYUV.uv_height<<endl;
+ ////=mVideoFormat->bmiHeader.biWidth;
+ ////=mVideoFormat->bmiHeader.biHeight;
+ ////mTheoraInfo.offset_x=0;
+ ////mTheoraInfo.offset_y=0;
+ //
+
+ ////HACK:::Bit of a hack to convert dshow nanos to a fps num/denom.
+ //unsigned long locNum = (((double)10000000) / ((double)mVideoFormat->AvgTimePerFrame)) + (double)0.5;
+
+ ////debugLog<<"FPS = "<<locNum<<endl;
+ //mTheoraInfo.fps_numerator = locNum;
+ //mTheoraInfo.fps_denominator = 1;
+ //
+ //mTheoraInfo.aspect_numerator=0;
+ //mTheoraInfo.aspect_denominator=0;
+ //
+ //mTheoraInfo.colorspace=OC_CS_UNSPECIFIED; //YV12
+ //mTheoraInfo.target_bitrate=400000; //mVideoFormat->dwBitRate;
+
+ ////Hard code for now
+ //mTheoraInfo.quality=30; //video_q;
+
+ //mTheoraInfo.dropframes_p=0;
+ //mTheoraInfo.quick_p=1;
+ //mTheoraInfo.keyframe_auto_p=1;
+ //mTheoraInfo.keyframe_frequency=64; //If you change this... change the logged value below
+ //mTheoraInfo.keyframe_frequency_force=64; //ditto
+ //mTheoraInfo.keyframe_data_target_bitrate=mTheoraInfo.target_bitrate*1.5;
+ //mTheoraInfo.keyframe_auto_threshold=80;
+ //mTheoraInfo.keyframe_mindistance=8;
+ //mTheoraInfo.noise_sensitivity=1;
+
+ //((TheoraEncodeFilter*)mParentFilter)->mTheoraFormatBlock.frameRateNumerator = locNum;
+ //((TheoraEncodeFilter*)mParentFilter)->mTheoraFormatBlock.frameRateDenominator = 1;
+ //((TheoraEncodeFilter*)mParentFilter)->mTheoraFormatBlock.maxKeyframeInterval = 6; //log2(keyframe_freq) from above
+ //((TheoraEncodeFilter*)mParentFilter)->mTheoraFormatBlock.frameHeight = mHeight;
+ //((TheoraEncodeFilter*)mParentFilter)->mTheoraFormatBlock.frameWidth = mWidth;
+ //((TheoraEncodeFilter*)mParentFilter)->mTheoraFormatBlock.colourSpace = OC_CS_UNSPECIFIED;
+ //((TheoraEncodeFilter*)mParentFilter)->mTheoraFormatBlock.height = mTheoraInfo.height;
+ //((TheoraEncodeFilter*)mParentFilter)->mTheoraFormatBlock.width = mTheoraInfo.width;
+ //((TheoraEncodeFilter*)mParentFilter)->mTheoraFormatBlock.xOffset = mXOffset;
+ //((TheoraEncodeFilter*)mParentFilter)->mTheoraFormatBlock.yOffset = mYOffset;
+ //((TheoraEncodeFilter*)mParentFilter)->mTheoraFormatBlock.aspectDenominator = 0;
+ //((TheoraEncodeFilter*)mParentFilter)->mTheoraFormatBlock.aspectNumerator = 0;
+
+ return true;
+
+}
+void DiracEncodeInputPin::DestroyCodec() {
+ //fish_sound_delete(mFishSound);
+ //mFishSound = NULL;
+}
+
+
+
+HRESULT DiracEncodeInputPin::SetMediaType(const CMediaType* inMediaType) {
+ AbstractVideoEncodeInputPin::SetMediaType(inMediaType);
+
+ ConstructCodec();
+
+
+ return S_OK;
+
+}
+
Added: trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeInputPin.h 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeInputPin.h 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,98 @@
+//===========================================================================
+//Copyright (C) 2003, 2004 Zentaro Kavanagh
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//- Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+//- Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+//- Neither the name of Zentaro Kavanagh nor the names of contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+//PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
+//CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+//EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+//PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+//LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+//NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//===========================================================================
+
+#pragma once
+#include "dsfDiracEncodeFilter.h"
+//#include "DiracEncoder.h"
+
+
+
+//Mmmmm macrolicious !
+//#define INT_FLOOR(num,scale) (num - (num % scale))
+#define CLIP3(x,y,z) ((z < x) ? x : ((z > y) ? y : z))
+//
+
+//DEBUG ONLY
+#include <fstream>
+using namespace std;
+//
+
+class DiracEncodeOutputPin;
+class DiracEncodeInputPin
+ : public AbstractVideoEncodeInputPin
+{
+public:
+ DiracEncodeInputPin(AbstractVideoEncodeFilter* inFilter, CCritSec* inFilterLock, AbstractVideoEncodeOutputPin* inOutputPin);
+ virtual ~DiracEncodeInputPin(void);
+
+
+ //PURE VIRTUALS
+ virtual long encodeData(unsigned char* inBuf, long inNumBytes);
+ virtual bool ConstructCodec();
+ virtual void DestroyCodec();
+ virtual HRESULT SetMediaType(const CMediaType* inMediaType);
+ //
+
+ //theora_info* theoraInfo();
+
+protected:
+ HRESULT mHR;
+ //bool mBegun; //Already in base class !
+
+ HRESULT deliverData(LONGLONG inStart, LONGLONG inEnd, unsigned char* inBuf, unsigned long inNumBytes);
+
+ long encodeYV12ToYV12(unsigned char* inBuf, long inNumBytes);
+ //long encodeYUY2ToYV12(unsigned char* inBuf, long inNumBytes);
+ //long encodeAYUVtoYV12(unsigned char* inBuf, long inNumBytes);
+ //long encodeRGB24toYV12(unsigned char* inBuf, long inNumBytes);
+ //long encodeRGB32toYV12(unsigned char* inBuf, long inNumBytes);
+ //long encodeUYVYToYV12(unsigned char* inBuf, long inNumBytes);
+ //long encodeYVYUToYV12(unsigned char* inBuf, long inNumBytes);
+ //long encodeIYUVToYV12(unsigned char* inBuf, long inNumBytes);
+ //
+// bool fillTheoraInfo(theora_info* outTheora, sTheoraFormatBlock* inTheoraFormatBlock);
+ //
+ //TheoraEncodeOutputPin* mOutputPin; //Already in the base class. Naughty c++
+ //__int64 mUptoFrame; //Already in base class stupid !
+
+ //TheoraEncoder mTheoraEncoder;
+ //theora_info mTheoraInfo;
+ //yuv_buffer mYUV;
+
+ unsigned long mXOffset;
+ unsigned long mYOffset;
+
+ //DEBUG ONLY
+ //fstream debugLog;
+ //
+
+
+};
Added: trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeOutputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeOutputPin.cpp 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeOutputPin.cpp 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,51 @@
+//===========================================================================
+//Copyright (C) 2003, 2004 Zentaro Kavanagh
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//- Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+//- Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+//- Neither the name of Zentaro Kavanagh nor the names of contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+//PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
+//CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+//EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+//PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+//LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+//NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//===========================================================================
+
+#include "StdAfx.h"
+#include "Diracencodeoutputpin.h"
+
+DiracEncodeOutputPin::DiracEncodeOutputPin(DiracEncodeFilter* inParentFilter,CCritSec* inFilterLock, CMediaType* inOutputMediaType)
+ : AbstractVideoEncodeOutputPin(inParentFilter, inFilterLock,NAME("DiracDecodeOutputPin"), L"Dirac Out", inOutputMediaType)
+{
+}
+
+DiracEncodeOutputPin::~DiracEncodeOutputPin(void)
+{
+}
+
+bool DiracEncodeOutputPin::FillFormatBuffer(BYTE* inFormatBuffer) {
+ DiracEncodeFilter* locParentFilter = (DiracEncodeFilter*)mParentFilter;
+ memcpy((void*)inFormatBuffer, (const void*) &(locParentFilter->mDiracFormatBlock), sizeof(sDiracFormatBlock));
+ return true;
+}
+unsigned long DiracEncodeOutputPin::FormatBufferSize() {
+ return sizeof(sDiracFormatBlock);
+}
Added: trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeOutputPin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeOutputPin.h 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/DiracEncodeOutputPin.h 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,54 @@
+//===========================================================================
+//Copyright (C) 2003, 2004 Zentaro Kavanagh
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//- Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+//- Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+//- Neither the name of Zentaro Kavanagh nor the names of contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+//PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
+//CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+//EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+//PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+//LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+//NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//===========================================================================
+
+#pragma once
+
+#include "dsfDiracEncodeFilter.h"
+//#include "AbstractVideoEncodeOutputPin.h"
+
+class DiracEncodeFilter;
+struct sDiracFormatBlock;
+
+class DiracEncodeOutputPin
+ : public AbstractVideoEncodeOutputPin
+{
+public:
+ DiracEncodeOutputPin(DiracEncodeFilter* inParentFilter, CCritSec* inFilterLock, CMediaType* inOutputMediaType);
+ virtual ~DiracEncodeOutputPin(void);
+
+ //PURE VIRTUAL IMPLEMENTATION
+ virtual bool FillFormatBuffer(BYTE* inFormatBuffer);
+ virtual unsigned long FormatBufferSize();
+
+
+protected:
+
+};
Added: trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/ReadMe.txt
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/ReadMe.txt 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/ReadMe.txt 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,32 @@
+========================================================================
+ DYNAMIC LINK LIBRARY : dsfDiracEncodeFilter Project Overview
+========================================================================
+
+AppWizard has created this dsfDiracEncodeFilter DLL for you.
+This file contains a summary of what you will find in each of the files that
+make up your dsfDiracEncodeFilter application.
+
+
+dsfDiracEncodeFilter.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.
+
+dsfDiracEncodeFilter.cpp
+ This is the main DLL source file.
+
+/////////////////////////////////////////////////////////////////////////////
+Other standard files:
+
+StdAfx.h, StdAfx.cpp
+ These files are used to build a precompiled header (PCH) file
+ named dsfDiracEncodeFilter.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/lib/codecs/dirac/filters/dsfDiracEncodeFilter/dsfDiracEncodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/dsfDiracEncodeFilter.cpp 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/dsfDiracEncodeFilter.cpp 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,100 @@
+//===========================================================================
+//Copyright (C) 2003, 2004 Zentaro Kavanagh
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//- Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+//- Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+//- Neither the name of Zentaro Kavanagh nor the names of contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+//PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
+//CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+//EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+//PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+//LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+//NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//===========================================================================
+
+#include "StdAfx.h"
+
+#include "dsfDiracEncodeFilter.h"
+
+extern "C" BOOL WINAPI DllEntryPoint(HINSTANCE, ULONG, LPVOID);
+BOOL APIENTRY DllMain(HANDLE hModule, DWORD dwReason, LPVOID lpReserved)
+{
+ return DllEntryPoint((HINSTANCE)(hModule), dwReason, lpReserved);
+}
+
+
+//The folowing two functions do the registration and deregistration of the dll and it's contained com objects.
+STDAPI DllRegisterServer()
+{
+
+ //TO DO::: Should we be releasing the filter mapper even when we return early ?
+ HRESULT hr;
+ IFilterMapper2* locFilterMapper = NULL;
+
+ hr = AMovieDllRegisterServer2(TRUE);
+
+
+
+
+ hr = CoCreateInstance(CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, IID_IFilterMapper2, (void **)&locFilterMapper);
+
+
+ hr = locFilterMapper->RegisterFilter(
+ CLSID_DiracEncodeFilter, // Filter CLSID.
+ L"Dirac Encode Filter", // Filter name.
+ NULL, // Device moniker.
+ &CLSID_LegacyAmFilterCategory, // Direct Show general category
+ L"Dirac Encode Filter", // Instance data. ???????
+ &DiracEncodeFilterReg // Pointer to filter information.
+ );
+
+ locFilterMapper->Release();
+
+ return hr;
+
+}
+
+STDAPI DllUnregisterServer()
+{
+ HRESULT hr;
+ IFilterMapper2* locFilterMapper = NULL;
+
+ hr = AMovieDllRegisterServer2(FALSE);
+ if (FAILED(hr)) {
+
+ return hr;
+ }
+
+ hr = CoCreateInstance(CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER,
+ IID_IFilterMapper2, (void **)&locFilterMapper);
+
+ if (FAILED(hr)) {
+ return hr;
+ }
+
+
+ hr = locFilterMapper->UnregisterFilter(&CLSID_LegacyAmFilterCategory, L"Dirac Encode Filter", CLSID_DiracEncodeFilter);
+
+
+ //
+ locFilterMapper->Release();
+ return hr;
+
+}
Added: trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/dsfDiracEncodeFilter.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/dsfDiracEncodeFilter.h 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/dsfDiracEncodeFilter.h 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,214 @@
+//===========================================================================
+//Copyright (C) 2003, 2004 Zentaro Kavanagh
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//- Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+//- Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+//- Neither the name of Zentaro Kavanagh nor the names of contributors
+// may be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+//PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
+//CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+//EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+//PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+//LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+//NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//===========================================================================
+
+#pragma once
+
+
+
+#include <streams.h>
+#include <pullpin.h>
+#include <initguid.h>
+
+#ifdef DSFDIRACENCODEFILTER_EXPORTS
+#define DSFDIRACENCODEFILTER_API __declspec(dllexport)
+#else
+#define DSFDIRACENCODEFILTER_API __declspec(dllimport)
+#endif
+
+
+
+
+struct sDiracFormatBlock {
+ int chromaFormat;
+ int width;
+ int height;
+ int frameRate;
+ bool isInterlaced;
+ bool isTopFieldFirst;
+
+};
+
+// {855236D7-01D6-432e-9563-4D0A322B2FFB}
+DEFINE_GUID(CLSID_DiracEncodeFilter,
+0x855236d7, 0x1d6, 0x432e, 0x95, 0x63, 0x4d, 0xa, 0x32, 0x2b, 0x2f, 0xfb);
+
+// {15B9B7CA-A7C0-448c-A68D-4D45A4137E38}
+DEFINE_GUID(MEDIASUBTYPE_Dirac,
+0x15b9b7ca, 0xa7c0, 0x448c, 0xa6, 0x8d, 0x4d, 0x45, 0xa4, 0x13, 0x7e, 0x38);
+
+// {4D8CEB62-0F52-44d0-B1EB-4AD6B24EA62C}
+DEFINE_GUID(FORMAT_Dirac,
+0x4d8ceb62, 0xf52, 0x44d0, 0xb1, 0xeb, 0x4a, 0xd6, 0xb2, 0x4e, 0xa6, 0x2c);
+
+
+const REGPINTYPES DiracEncodeInputTypes = {
+ &MEDIATYPE_Video,
+ &MEDIASUBTYPE_YV12
+};
+
+const REGPINTYPES DiracEncodeOutputTypes = {
+ &MEDIATYPE_Video,
+ &MEDIASUBTYPE_Dirac
+};
+
+const REGFILTERPINS DiracEncodePinReg[] = {
+ {
+ L"YV12 Input", //Name (obsoleted)
+ FALSE, //Renders from this pin ?? Not sure about this.
+ FALSE, //Not an output pin
+ FALSE, //Cannot have zero instances of this pin
+ FALSE, //Cannot have more than one instance of this pin
+ NULL, //Connects to filter (obsoleted)
+ NULL, //Connects to pin (obsoleted)
+ 1, //upport two media type
+ &DiracEncodeInputTypes //Pointer to media type (Video/VY12)
+ } ,
+
+ {
+ L"Dirac Output", //Name (obsoleted)
+ FALSE, //Renders from this pin ?? Not sure about this.
+ TRUE, //Is an output pin
+ FALSE, //Cannot have zero instances of this pin
+ FALSE, //Cannot have more than one instance of this pin
+ NULL, //Connects to filter (obsoleted)
+ NULL, //Connects to pin (obsoleted)
+ 1, //Only support one media type
+ &DiracEncodeOutputTypes //Pointer to media type (Audio/PCM)
+
+ }
+};
+
+
+
+const REGFILTER2 DiracEncodeFilterReg = {
+ 1,
+ MERIT_NORMAL,
+ 2,
+ DiracEncodePinReg
+
+};
+
+
+
+
+
+//
+//#ifdef LIBOOOGG_EXPORTS
+//#define LIBOOOGG_API __declspec(dllexport)
+//#else
+//#define LIBOOOGG_API __declspec(dllimport)
+//#endif
+//
+//// {121EA765-6D3F-4519-9686-A0BA6E5281A2}
+//DEFINE_GUID(CLSID_PropsTheoraEncoder,
+//0x121ea765, 0x6d3f, 0x4519, 0x96, 0x86, 0xa0, 0xba, 0x6e, 0x52, 0x81, 0xa2);
+//
+//// {4F063B3A-B397-4c22-AFF4-2F8DB96D292A}
+//DEFINE_GUID(IID_ITheoraEncodeSettings,
+//0x4f063b3a, 0xb397, 0x4c22, 0xaf, 0xf4, 0x2f, 0x8d, 0xb9, 0x6d, 0x29, 0x2a);
+//
+//// {5C769985-C3E1-4f95-BEE7-1101C465F5FC}
+//DEFINE_GUID(CLSID_TheoraEncodeFilter,
+//0x5c769985, 0xc3e1, 0x4f95, 0xbe, 0xe7, 0x11, 0x1, 0xc4, 0x65, 0xf5, 0xfc);
+//
+//// {D124B2B1-8968-4ae8-B288-FE16EA34B0CE}
+//DEFINE_GUID(MEDIASUBTYPE_Theora,
+//0xd124b2b1, 0x8968, 0x4ae8, 0xb2, 0x88, 0xfe, 0x16, 0xea, 0x34, 0xb0, 0xce);
+//
+//// {A99F116C-DFFA-412c-95DE-725F99874826}
+//DEFINE_GUID(FORMAT_Theora,
+//0xa99f116c, 0xdffa, 0x412c, 0x95, 0xde, 0x72, 0x5f, 0x99, 0x87, 0x48, 0x26);
+//
+//const REGPINTYPES TheoraEncodeInputTypes = {
+// &MEDIATYPE_Video,
+// &MEDIASUBTYPE_YV12
+//};
+//
+//const REGPINTYPES TheoraEncodeOutputTypes = {
+// &MEDIATYPE_Video,
+// &MEDIASUBTYPE_Theora
+//};
+//
+//const REGFILTERPINS TheoraEncodePinReg[] = {
+// {
+// L"YV12 Input", //Name (obsoleted)
+// FALSE, //Renders from this pin ?? Not sure about this.
+// FALSE, //Not an output pin
+// FALSE, //Cannot have zero instances of this pin
+// FALSE, //Cannot have more than one instance of this pin
+// NULL, //Connects to filter (obsoleted)
+// NULL, //Connects to pin (obsoleted)
+// 1, //upport two media type
+// &TheoraEncodeInputTypes //Pointer to media type (Video/VY12)
+// } ,
+//
+// {
+// L"Theora Output", //Name (obsoleted)
+// FALSE, //Renders from this pin ?? Not sure about this.
+// TRUE, //Is an output pin
+// FALSE, //Cannot have zero instances of this pin
+// FALSE, //Cannot have more than one instance of this pin
+// NULL, //Connects to filter (obsoleted)
+// NULL, //Connects to pin (obsoleted)
+// 1, //Only support one media type
+// &TheoraEncodeOutputTypes //Pointer to media type (Audio/PCM)
+//
+// }
+//};
+//
+//
+//
+//const REGFILTER2 TheoraEncodeFilterReg = {
+// 1,
+// MERIT_NORMAL,
+// 2,
+// TheoraEncodePinReg
+//
+//};
+//
+//struct sTheoraFormatBlock {
+// unsigned long theoraVersion;
+// unsigned long width;
+// unsigned long height;
+// unsigned long frameWidth;
+// unsigned long frameHeight;
+// unsigned long frameRateNumerator;
+// unsigned long frameRateDenominator;
+// unsigned long aspectNumerator;
+// unsigned long aspectDenominator;
+// unsigned long maxKeyframeInterval;
+// unsigned long targetBitrate;
+// unsigned char targetQuality;
+// unsigned char xOffset;
+// unsigned char yOffset;
+// unsigned char colourSpace;
+//};
+//
Added: trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/dsfDiracEncodeFilter.vcproj
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/dsfDiracEncodeFilter.vcproj 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/dsfDiracEncodeFilter.vcproj 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="dsfDiracEncodeFilter"
+ ProjectGUID="{190C8AE5-75B0-4714-BC0A-4992F3524F35}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";..\..\..\..\core\directshow\dsfAbstractVideoEncoder"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DSFDIRACENCODEFILTER_EXPORTS"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="3"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/dsfDiracEncodeFilter.dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/dsfDiracEncodeFilter.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/dsfDiracEncodeFilter.lib"
+ 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="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";..\..\..\..\core\directshow\dsfAbstractVideoEncoder;..\..\..\..\core\directshow\dsfSeeking"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFDIRACENCODEFILTER_EXPORTS"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="3"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"
+ CallingConvention="2"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Strmbase.lib Winmm.lib Strmiids.lib Quartz.lib"
+ OutputFile="$(OutDir)/dsfDiracEncodeFilter.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses\Release""
+ GenerateDebugInformation="TRUE"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)/dsfDiracEncodeFilter.lib"
+ 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=".\DiracEncodeFilter.cpp">
+ </File>
+ <File
+ RelativePath=".\DiracEncodeInputPin.cpp">
+ </File>
+ <File
+ RelativePath=".\DiracEncodeOutputPin.cpp">
+ </File>
+ <File
+ RelativePath=".\dsfDiracEncodeFilter.cpp">
+ </File>
+ <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>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <File
+ RelativePath=".\DiracEncodeFilter.h">
+ </File>
+ <File
+ RelativePath=".\DiracEncodeInputPin.h">
+ </File>
+ <File
+ RelativePath=".\DiracEncodeOutputPin.h">
+ </File>
+ <File
+ RelativePath=".\dsfDiracEncodeFilter.h">
+ </File>
+ <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>
Added: trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/stdafx.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/stdafx.cpp 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/stdafx.cpp 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+// dsfDiracEncodeFilter.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/lib/codecs/dirac/filters/dsfDiracEncodeFilter/stdafx.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/stdafx.h 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/codecs/dirac/filters/dsfDiracEncodeFilter/stdafx.h 2004-10-09 04:38:59 UTC (rev 7940)
@@ -0,0 +1,20 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#pragma once
+
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+// Windows Header Files:
+#include <windows.h>
+
+// TODO: reference additional headers your program requires here
+#include "dsfDiracEncodeFilter.h"
+#include "AbstractVideoEncodeFilter.h"
+#include "AbstractVideoEncodeInputPin.h"
+#include "AbstractVideoEncodeOutputPin.h"
+#include "DiracEncodeInputPin.h"
+#include "DiracEncodeOutputPin.h"
+#include "DiracEncodeFilter.h"
\ No newline at end of file
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeFilter.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeFilter.h 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeFilter.h 2004-10-09 04:38:59 UTC (rev 7940)
@@ -48,6 +48,7 @@
enum eVideoFormat {
NONE = 0,
THEORA = 100,
+ DIRAC = 101,
OTHER_VIDEO = 2000
};
Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FilterFileSource.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FilterFileSource.cpp 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FilterFileSource.cpp 2004-10-09 04:38:59 UTC (rev 7940)
@@ -37,6 +37,7 @@
FilterFileSource::~FilterFileSource(void)
{
+ mSourceFile.close();
}
unsigned long FilterFileSource::seek(unsigned long inPos) {
Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FilterFileSource.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FilterFileSource.h 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/FilterFileSource.h 2004-10-09 04:38:59 UTC (rev 7940)
@@ -39,7 +39,7 @@
{
public:
FilterFileSource(void);
- ~FilterFileSource(void);
+ virtual ~FilterFileSource(void);
//IFilterDataSource Interface
virtual unsigned long seek(unsigned long inPos);
Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp 2004-10-09 04:38:59 UTC (rev 7940)
@@ -114,7 +114,10 @@
mDemuxLock = new CCritSec;
mStreamLock = new CCritSec;
mStreamMapper = new OggStreamMapper(this);
- //debugLog.open("g:\\logs\\sourcelog.log", ios_base::out);
+ debugLog.open("g:\\logs\\sourcelog.log", ios_base::out | ios_base::ate | ios_base::app);
+ //debugLog<<"Test..."<<endl;
+ //debugLog.seekp(0, ios_base::end);
+ debugLog<<"Test2..."<<endl;
//debugLog << "**************** Starting LOg ********************"<<endl;
}
@@ -149,10 +152,12 @@
//delete mStreamLock;
//delete mSourceFileLock;
//delete mDemuxLock;
+ debugLog<<"Deleting Data Source : "<<(int)mDataSource<<endl;
+ delete mDataSource;
+ debugLog.close();
+ delete mStreamMapper;
-
- delete mStreamMapper;
mStreamMapper = NULL;
@@ -201,6 +206,8 @@
CAutoLock locLock(m_pLock);
mFileName = inFileName;
+ debugLog<<"Loading : "<<StringHelper::toNarrowStr(mFileName)<<endl;
+
//debugLog << "Opening source file : "<<StringHelper::toNarrowStr(mFileName)<<endl;
mSeekTable = new AutoOggSeekTable(StringHelper::toNarrowStr(mFileName));
mSeekTable->buildTable();
Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.h 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.h 2004-10-09 04:38:59 UTC (rev 7940)
@@ -196,7 +196,7 @@
OggStreamMapper* mStreamMapper;
//DEBUG
- //fstream debugLog;
+ fstream debugLog;
};
Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/oggdllstuff.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/oggdllstuff.h 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/oggdllstuff.h 2004-10-09 04:38:59 UTC (rev 7940)
@@ -34,8 +34,6 @@
#include <initguid.h>
-
-
#ifdef LIBOOOGG_EXPORTS
#define LIBOOOGG_API __declspec(dllexport)
#else
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoAnxSeekTable.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoAnxSeekTable.cpp 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoAnxSeekTable.cpp 2004-10-09 04:38:59 UTC (rev 7940)
@@ -13,6 +13,7 @@
AutoAnxSeekTable::~AutoAnxSeekTable(void)
{
+ mFile.close();
}
//IOggCallback interface
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp 2004-10-09 04:38:59 UTC (rev 7940)
@@ -51,11 +51,15 @@
mFileName = inFileName;
mOggDemux = new OggDataBuffer(true);
mOggDemux->registerVirtualCallback(this);
-
+ debugLog.open("G:\\logs\\seektable.log", ios_base::out | ios_base::ate | ios_base::app);
+ debugLog<<"Constructing seek table..."<<endl;
}
AutoOggSeekTable::~AutoOggSeekTable(void)
{
+ debugLog<<"Closing file (Constructor)..."<<endl;
+ debugLog.close();
+ mFile.close();
delete mOggDemux;
}
@@ -164,6 +168,7 @@
bool AutoOggSeekTable::buildTable() {
//HACK::: To ensure we don't try and build a table on the network file.
if (mFileName.find("http") != 0) {
+ debugLog<<"Opening file... "<<endl;
mFile.open(mFileName.c_str(), ios_base::in | ios_base::binary);
const unsigned long BUFF_SIZE = 4096;
unsigned char* locBuff = new unsigned char[BUFF_SIZE];
@@ -171,6 +176,7 @@
mFile.read((char*)locBuff, BUFF_SIZE);
mOggDemux->feed((const unsigned char*)locBuff, mFile.gcount());
}
+ debugLog<<"Closing File..."<<endl;
mFile.close();
} else {
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.h
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.h 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.h 2004-10-09 04:38:59 UTC (rev 7940)
@@ -46,7 +46,7 @@
{
public:
AutoOggSeekTable(string inFileName);
- ~AutoOggSeekTable(void);
+ virtual ~AutoOggSeekTable(void);
static const __int64 DS_UNITS = 10000000;
static const LINT_MAX = 4294967295;
@@ -77,4 +77,6 @@
//Changed for debugging to *
OggDataBuffer* mOggDemux;
+ fstream debugLog;
+
};
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/OggSeekTable.h
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/OggSeekTable.h 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/OggSeekTable.h 2004-10-09 04:38:59 UTC (rev 7940)
@@ -39,7 +39,7 @@
{
public:
OggSeekTable(void);
- ~OggSeekTable(void);
+ virtual ~OggSeekTable(void);
bool addSeekPoint(__int64 inTime, unsigned long mStartPos);
unsigned long getStartPos(__int64 inTime);
Modified: trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs
===================================================================
--- trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/tools/DNPlay/frmDNPlay.cs 2004-10-09 04:38:59 UTC (rev 7940)
@@ -42,6 +42,8 @@
protected Int64 mNumTicks;
protected ClipTag mCurrentClip;
private System.Windows.Forms.Label lblClipDesc;
+ private System.Windows.Forms.Button cmdFollowLink;
+ private System.Windows.Forms.Label lblAnchorLink;
protected HeadTag mHeadTag;
enum eEventCodes
@@ -104,6 +106,7 @@
{
mCurrentClip = inClipTag;
lblClipDesc.Text = inClipTag.desc().text();
+ lblAnchorLink.Text = inClipTag.anchor().href();
return true;
}
public bool headCallback(HeadTag inHeadTag)
@@ -172,6 +175,8 @@
this.lblProgressFgnd = new System.Windows.Forms.Label();
this.tmrEventCheck = new System.Windows.Forms.Timer(this.components);
this.lblClipDesc = new System.Windows.Forms.Label();
+ this.cmdFollowLink = new System.Windows.Forms.Button();
+ this.lblAnchorLink = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// mainMenu1
@@ -312,10 +317,28 @@
this.lblClipDesc.Size = new System.Drawing.Size(400, 104);
this.lblClipDesc.TabIndex = 10;
//
+ // cmdFollowLink
+ //
+ this.cmdFollowLink.Location = new System.Drawing.Point(312, 208);
+ this.cmdFollowLink.Name = "cmdFollowLink";
+ this.cmdFollowLink.Size = new System.Drawing.Size(96, 24);
+ this.cmdFollowLink.TabIndex = 11;
+ this.cmdFollowLink.Text = "Follow Link";
+ this.cmdFollowLink.Click += new System.EventHandler(this.cmdFollowLink_Click);
+ //
+ // lblAnchorLink
+ //
+ this.lblAnchorLink.Location = new System.Drawing.Point(56, 208);
+ this.lblAnchorLink.Name = "lblAnchorLink";
+ this.lblAnchorLink.Size = new System.Drawing.Size(248, 24);
+ this.lblAnchorLink.TabIndex = 12;
+ //
// frmDNPlay
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
- this.ClientSize = new System.Drawing.Size(416, 207);
+ this.ClientSize = new System.Drawing.Size(416, 247);
+ this.Controls.Add(this.lblAnchorLink);
+ this.Controls.Add(this.cmdFollowLink);
this.Controls.Add(this.lblClipDesc);
this.Controls.Add(this.lblProgressFgnd);
this.Controls.Add(this.lblProgressBkgd);
@@ -454,5 +477,25 @@
}
}
+ private void cmdFollowLink_Click(object sender, System.EventArgs e)
+ {
+ String locFilename = mCurrentClip.anchor().href();
+ tmrUpdateDuration.Enabled = false;
+ lblFileLocation.Text = locFilename;
+ bool locRes = mPlayer.loadFile("G:\\downloads\\firefox\\manufacturing_surveys.anx");
+ //Error check
+ mFileDuration = mPlayer.fileDuration();
+ setDurationText(mFileDuration);
+ //lblDuration.Text = mFileDuration.ToString();
+
+ mNumTicks = 0;
+ mLastSync = 0;
+ updateProgressBar();
+
+ mPlayer.setMediaEventCallback(this);
+ mPlayer.setCMMLCallbacks(this);
+ cmdPlay.Enabled = true;
+ }
+
}
}
Modified: trunk/oggdsf/src/tools/DNPlay/frmDNPlay.resx
===================================================================
--- trunk/oggdsf/src/tools/DNPlay/frmDNPlay.resx 2004-10-08 19:34:10 UTC (rev 7939)
+++ trunk/oggdsf/src/tools/DNPlay/frmDNPlay.resx 2004-10-09 04:38:59 UTC (rev 7940)
@@ -247,6 +247,24 @@
<data name="lblClipDesc.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
+ <data name="cmdFollowLink.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>False</value>
+ </data>
+ <data name="cmdFollowLink.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>Private</value>
+ </data>
+ <data name="cmdFollowLink.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>Private</value>
+ </data>
+ <data name="lblAnchorLink.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>False</value>
+ </data>
+ <data name="lblAnchorLink.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>Private</value>
+ </data>
+ <data name="lblAnchorLink.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>Private</value>
+ </data>
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
@@ -256,6 +274,9 @@
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
+ <data name="$this.Name">
+ <value>frmDNPlay</value>
+ </data>
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
@@ -274,7 +295,4 @@
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
- <data name="$this.Name">
- <value>frmDNPlay</value>
- </data>
</root>
\ No newline at end of file
More information about the commits
mailing list