[xiph-commits] r10359 - in branches/oggdsf_new_demux: sln/oggdsf_all src/lib/codecs src/lib/codecs/ogm src/lib/codecs/ogm/filters src/lib/codecs/ogm/filters/dsfOGMDecoder

illiminable at svn.xiph.org illiminable at svn.xiph.org
Tue Nov 8 22:09:37 PST 2005


Author: illiminable
Date: 2005-11-08 22:09:19 -0800 (Tue, 08 Nov 2005)
New Revision: 10359

Added:
   branches/oggdsf_new_demux/src/lib/codecs/ogm/
   branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/
   branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/
   branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeFilter.cpp
   branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeFilter.h
   branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeInputPin.cpp
   branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeInputPin.h
   branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeOutputPin.cpp
   branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeOutputPin.h
   branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/ReadMe.txt
   branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.cpp
   branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.h
   branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.vcproj
   branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoderdllstuff.cpp
   branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoderdllstuff.h
   branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/stdafx.cpp
   branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/stdafx.h
Modified:
   branches/oggdsf_new_demux/sln/oggdsf_all/oggdsf_all.sln
Log:
* Most of ogm decoder moved to new demux

Modified: branches/oggdsf_new_demux/sln/oggdsf_all/oggdsf_all.sln
===================================================================
--- branches/oggdsf_new_demux/sln/oggdsf_all/oggdsf_all.sln	2005-11-09 00:58:18 UTC (rev 10358)
+++ branches/oggdsf_new_demux/sln/oggdsf_all/oggdsf_all.sln	2005-11-09 06:09:19 UTC (rev 10359)
@@ -1206,6 +1206,12 @@
 		{2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4} = {2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4}
 	EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsfOGMDecoder", "..\..\src\lib\codecs\ogm\filters\dsfOGMDecoder\dsfOGMDecoder.vcproj", "{1C4F9412-B1DE-4E65-96C1-89522EF02997}"
+	ProjectSection(ProjectDependencies) = postProject
+		{223ACC19-608E-4E1B-A054-067F0CACB272} = {223ACC19-608E-4E1B-A054-067F0CACB272}
+		{2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4} = {2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4}
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfiguration) = preSolution
 		Debug = Debug
@@ -2775,6 +2781,26 @@
 		{304B710A-7355-471C-A4A8-9E8F6D640E6D}.Release_SSE.Build.0 = Release|Win32
 		{304B710A-7355-471C-A4A8-9E8F6D640E6D}.Release_SSE2.ActiveCfg = Release|Win32
 		{304B710A-7355-471C-A4A8-9E8F6D640E6D}.Release_SSE2.Build.0 = Release|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.Debug.ActiveCfg = Debug|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.Debug.Build.0 = Debug|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.Debug Unicode.ActiveCfg = Debug|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.Debug Unicode.Build.0 = Debug|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.Debug__cdecl.ActiveCfg = Debug|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.Debug__cdecl.Build.0 = Debug|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.MakeFile.ActiveCfg = Release|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.MakeFile.Build.0 = Release|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.Release.ActiveCfg = Release|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.Release.Build.0 = Release|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.Release Unicode.ActiveCfg = Release|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.Release Unicode.Build.0 = Release|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.Release__cdecl.ActiveCfg = Release|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.Release__cdecl.Build.0 = Release|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.Release_NoDotNET.ActiveCfg = Release|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.Release_NoDotNET.Build.0 = Release|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.Release_SSE.ActiveCfg = Release|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.Release_SSE.Build.0 = Release|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.Release_SSE2.ActiveCfg = Release|Win32
+		{1C4F9412-B1DE-4E65-96C1-89522EF02997}.Release_SSE2.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionItems) = postSolution
 	EndGlobalSection

Added: branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeFilter.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeFilter.cpp	2005-11-09 00:58:18 UTC (rev 10358)
+++ branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeFilter.cpp	2005-11-09 06:09:19 UTC (rev 10359)
@@ -0,0 +1,157 @@
+
+//===========================================================================
+//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 "OGMDecodeFilter.h"
+
+
+
+//COM Factory Template
+CFactoryTemplate g_Templates[] = 
+{
+    { 
+		L"OGM Decode Filter",					// Name
+	    &CLSID_OGMDecodeFilter,				// CLSID
+	    OGMDecodeFilter::CreateInstance,		// Method to create an instance of Speex Decoder
+        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]); 
+
+OGMDecodeFilter::OGMDecodeFilter()
+	:	CTransformFilter(NAME("OGM Video Decoder"), NULL, CLSID_OGMDecodeFilter)
+	,	mInputPin(NULL)
+	,	mOutputPin(NULL)
+	
+{
+
+	
+}
+
+
+
+OGMDecodeFilter::~OGMDecodeFilter(void)
+{
+
+}
+
+CUnknown* WINAPI OGMDecodeFilter::CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr) 
+{
+	//This routine is the COM implementation to create a new Filter
+	OGMDecodeFilter *pNewObject = new OGMDecodeFilter();
+    if (pNewObject == NULL) {
+        *pHr = E_OUTOFMEMORY;
+    }
+	return pNewObject;
+} 
+
+HRESULT OGMDecodeFilter::CheckInputType(const CMediaType* inMediaType)
+{
+	return mInputPin->CheckMediaType(inMediaType);
+}
+HRESULT OGMDecodeFilter::CheckTransform(const CMediaType* inInputMediaType, const CMediaType* inOutputMediaType)
+{
+
+	return S_OK;
+}
+HRESULT OGMDecodeFilter::DecideBufferSize(IMemAllocator* inAllocator, ALLOCATOR_PROPERTIES* inPropInputRequest)
+{
+
+	return S_OK;
+}
+HRESULT OGMDecodeFilter::GetMediaType(int inPosition, CMediaType* outMediaType)
+{
+	
+	if (inPosition < 0) {
+		return E_INVALIDARG;
+	}
+	
+	if ((inPosition == 0) && (mInputPin != NULL) && (mInputPin->IsConnected())) {
+		
+		VIDEOINFOHEADER* locVideoFormat = (VIDEOINFOHEADER*)outMediaType->AllocFormatBuffer(sizeof(VIDEOINFOHEADER));
+		*locVideoFormat = *mInputPin->getVideoFormatBlock();
+		//FillMediaType(outMediaType, locVideoFormat->bmiHeader.biSizeImage);
+
+		return S_OK;
+	} else {
+		return VFW_S_NO_MORE_ITEMS;
+	}
+
+
+}
+HRESULT OGMDecodeFilter::Transform(IMediaSample* inInputSample, IMediaSample* inOutputSample)
+{
+
+	return S_OK;
+}
+
+CBasePin* OGMDecodeFilter::GetPin(int inPinNo)
+{
+
+    HRESULT locHR = S_OK;
+
+    // Create an input pin if necessary
+
+    if (m_pInput == NULL) {
+
+        m_pInput = new OGMDecodeInputPin(this, &locHR);		//Deleted in base destructor
+
+        
+        if (m_pInput == NULL) {
+            return NULL;
+        }
+
+		mInputPin = (OGMDecodeInputPin*)m_pInput;
+        m_pOutput = new CTransformOutputPin(NAME("OGM Out"), this, &locHR, L"Video Out");	//Deleted in base destructor
+			
+
+        if (m_pOutput == NULL) {
+            delete m_pInput;
+            m_pInput = NULL;
+        }
+    }
+
+    // Return the pin
+
+    if (inPinNo == 0) {
+        return m_pInput;
+    } else if (inPinNo == 1) {
+        return m_pOutput;
+    } else {
+        return NULL;
+    }
+
+}
\ No newline at end of file

Added: branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeFilter.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeFilter.h	2005-11-09 00:58:18 UTC (rev 10358)
+++ branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeFilter.h	2005-11-09 06:09:19 UTC (rev 10359)
@@ -0,0 +1,73 @@
+//===========================================================================
+//Copyright (C) 2003, 2004, 2005 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 Files
+#include "ogmdecoderdllstuff.h"
+#include "OGMDecodeInputPin.h"
+#include <libilliCore/iLE_Math.h>
+
+//Forward Declarations
+struct sOGMFormatBlock;
+class OGMDecodeInputPin;
+class OGMDecodeOutputPin;
+
+//Class Interface
+class OGMDecodeFilter
+	//Base Classes
+	:	public CTransformFilter
+{
+public:
+	//Friends
+	//friend class OGMDecodeInputPin;
+	//friend class OGMDecodeOutputPin;
+
+	//Constructors and Destructors
+	OGMDecodeFilter(void);
+	virtual ~OGMDecodeFilter(void);
+
+	//COM Creator Function
+	static CUnknown* WINAPI CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr);
+
+	virtual HRESULT CheckInputType(const CMediaType* inMediaType);
+	virtual HRESULT CheckTransform(const CMediaType* inInputMediaType, const CMediaType* inOutputMediaType);
+	virtual HRESULT DecideBufferSize(IMemAllocator* inAllocator, ALLOCATOR_PROPERTIES* inPropInputRequest);
+	virtual HRESULT GetMediaType(int iPosition, CMediaType* outMediaType);
+	virtual HRESULT Transform(IMediaSample* inInputSample, IMediaSample* inOutputSample);
+
+	virtual CBasePin* GetPin(int inPinNo);
+
+
+protected:
+	OGMDecodeInputPin* mInputPin;
+	CTransformOutputPin* mOutputPin;
+	
+};

Added: branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeInputPin.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeInputPin.cpp	2005-11-09 00:58:18 UTC (rev 10358)
+++ branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeInputPin.cpp	2005-11-09 06:09:19 UTC (rev 10359)
@@ -0,0 +1,202 @@
+//===========================================================================
+//Copyright (C) 2003, 2004, 2005 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 "OGMDecodeInputPin.h"
+
+OGMDecodeInputPin::OGMDecodeInputPin(OGMDecodeFilter* inParentFilter, HRESULT* outHR)
+	:	CTransformInputPin(NAME("OGMDecodeInputPin"), inParentFilter, outHR, L"OGM In")
+	,	mVideoFormatBlock(NULL)
+{
+
+}
+
+OGMDecodeInputPin::~OGMDecodeInputPin(void)
+{
+
+}
+
+
+
+HRESULT OGMDecodeInputPin::SetMediaType(const CMediaType* inMediaType) 
+{
+	//FIX:::Error checking
+	//RESOLVED::: Bit better.
+	if (CheckMediaType(inMediaType) == S_OK) {
+		//((OGMDecodeFilter*)m_pFilter)->setOGMFormat(inMediaType->pbFormat);
+		
+	} else {
+		throw 0;
+	}
+	return CBaseInputPin::SetMediaType(inMediaType);
+
+}
+
+HRESULT OGMDecodeInputPin::CheckMediaType(const CMediaType *inMediaType)
+{
+	if (		(inMediaType->majortype == MEDIATYPE_OggPacketStream)
+			&&	(inMediaType->subtype == MEDIASUBTYPE_None)
+			&&	(inMediaType->formattype == FORMAT_OggIdentHeader)) {
+		if (inMediaType->cbFormat == OGM_IDENT_HEADER_SIZE) {
+			if (strncmp((char*)inMediaType->pbFormat, "\001video\000\000\000", 9) == 0) {
+				//TODO::: Possibly verify version
+				return S_OK;
+			}
+		}
+	}
+	return S_FALSE;
+	
+}
+HRESULT OGMDecodeInputPin::GetAllocatorRequirements(ALLOCATOR_PROPERTIES *outRequestedProps)
+{
+	outRequestedProps->cbBuffer = OGM_BUFFER_SIZE;
+	outRequestedProps->cBuffers = OGM_NUM_BUFFERS;
+	outRequestedProps->cbAlign = 1;
+	outRequestedProps->cbPrefix = 0;
+
+	return S_OK;
+}
+LOOG_INT64 OGMDecodeInputPin::convertGranuleToTime(LOOG_INT64 inGranule)
+{
+	return inGranule;
+}
+
+LOOG_INT64 OGMDecodeInputPin::mustSeekBefore(LOOG_INT64 inGranule)
+{
+	//TODO::: Get adjustment from block size info... for now, it doesn't matter if no preroll
+	return inGranule;
+}
+IOggDecoder::eAcceptHeaderResult OGMDecodeInputPin::showHeaderPacket(OggPacket* inCodecHeaderPacket)
+{
+	switch (mSetupState) {
+		case VSS_SEEN_NOTHING:
+			if (strncmp((char*)inCodecHeaderPacket->packetData(), "\001video\000\000\000", 9) == 0) {
+				handleHeaderPacket(inCodecHeaderPacket);
+				return IOggDecoder::AHR_ALL_HEADERS_RECEIVED;
+			}
+			return IOggDecoder::AHR_INVALID_HEADER;
+			
+			
+		
+	
+		case VSS_ALL_HEADERS_SEEN:
+		case VSS_ERROR:
+		default:
+			return IOggDecoder::AHR_UNEXPECTED;
+	}
+}
+
+	
+
+bool OGMDecodeInputPin::handleHeaderPacket(OggPacket* inHeaderPack)
+{
+	delete mVideoFormatBlock;
+	mVideoFormatBlock = new VIDEOINFOHEADER;
+
+	//FORMAT OF HEADER IN OGG BOS
+	//-----------------------------------------
+	//0		-		8		=		STRING		Stream Type (char[8] is NULL)
+	//9		-		12		=		STRING		Sub Type (FOURCC)
+	//13	-		16		=		INT32		Size of structure ???
+	//17	-		24		=		INT64		Time per "unit" in DSHOW UNITS
+	//25	-		32		=		INT64		Samples per "unit"
+	//33	-		36		=		INT32		Deefault length ????? in media type ?? WTF ?
+	//37	-		40		=		INT32		Buffer Size
+	//41	-		42		=		INT16		Bits per sample
+	//43	-		44		=		-----		HOLE IN DATA
+	//45	-		48		=		INT32		Video Width
+	//49	-		52		=		INT32		Video Height
+
+
+ 
+
+	//------------------------------------------
+
+	
+	__int64 locTimePerBlock = iLE_Math::CharArrToInt64(inHeaderPack->packetData() + 17);
+
+	
+	__int64 locSamplesPerBlock = iLE_Math::CharArrToInt64(inHeaderPack->packetData() + 25);
+
+	//debugLog<<"t/block = "<<locTimePerBlock<<"        Sam/block = "<<locSamplesPerBlock<<endl;
+
+	mVideoFormatBlock->AvgTimePerFrame = locTimePerBlock / locSamplesPerBlock;
+
+	//debugLog<<"Time per frame = "<<mVideoFormatBlock->AvgTimePerFrame<<endl;
+
+	__int64 locFPSec = (UNITS / locTimePerBlock) * locSamplesPerBlock;
+
+	//debugLog<<"Rate = "<<locFPSec<<" fps"<<endl;
+	unsigned short locBPSample = ((unsigned char)(inHeaderPack->packetData()[41])) + (((unsigned short)(inHeaderPack->packetData()[42])) * 256);
+
+	
+	
+	mVideoFormatBlock->bmiHeader.biBitCount = locBPSample;
+	mVideoFormatBlock->bmiHeader.biClrImportant = 0;   //All colours important
+	mVideoFormatBlock->bmiHeader.biClrUsed = 0;        //Use max colour depth
+	mVideoFormatBlock->bmiHeader.biCompression = MAKEFOURCC(inHeaderPack->packetData()[9], inHeaderPack->packetData()[10], inHeaderPack->packetData()[11], inHeaderPack->packetData()[12]);;
+
+	unsigned long locHeight = iLE_Math::charArrToULong(inHeaderPack->packetData() + 49);
+	unsigned long locWidth =  iLE_Math::charArrToULong(inHeaderPack->packetData() + 45);
+
+	mVideoFormatBlock->dwBitRate = 0;
+
+	mVideoFormatBlock->bmiHeader.biHeight = locHeight;
+	mVideoFormatBlock->bmiHeader.biPlanes = 1;    //Must be 1
+	mVideoFormatBlock->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);    //????? Size of what ?
+	mVideoFormatBlock->bmiHeader.biSizeImage = (locHeight * locWidth * locBPSample) / 8;    //Size in bytes of image ??
+	mVideoFormatBlock->bmiHeader.biWidth = locWidth;
+	mVideoFormatBlock->bmiHeader.biXPelsPerMeter = 2000;   //Fuck knows
+	mVideoFormatBlock->bmiHeader.biYPelsPerMeter = 2000;   //" " " " " 
+	
+	mVideoFormatBlock->rcSource.top = 0;
+	mVideoFormatBlock->rcSource.bottom = locHeight;
+	mVideoFormatBlock->rcSource.left = 0;
+	mVideoFormatBlock->rcSource.right = locWidth;
+
+	mVideoFormatBlock->rcTarget.top = 0;
+	mVideoFormatBlock->rcTarget.bottom = locHeight;
+	mVideoFormatBlock->rcTarget.left = 0;
+	mVideoFormatBlock->rcTarget.right = locWidth;
+
+	mVideoFormatBlock->dwBitErrorRate=0;
+	return true;
+}
+string OGMDecodeInputPin::getCodecShortName()
+{
+	return "OGM";
+}
+string OGMDecodeInputPin::getCodecIdentString()
+{
+	//TODO:::
+	return "OGM";
+}
+

Added: branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeInputPin.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeInputPin.h	2005-11-09 00:58:18 UTC (rev 10358)
+++ branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeInputPin.h	2005-11-09 06:09:19 UTC (rev 10359)
@@ -0,0 +1,45 @@
+#pragma once
+
+#include "ogmdecoderdllstuff.h"
+#include "IOggDecoder.h"
+
+class OGMDecodeFilter;
+
+class OGMDecodeInputPin
+	:	public CTransformInputPin
+	,	public IOggDecoder
+{
+public:
+	OGMDecodeInputPin(OGMDecodeFilter* inParent, HRESULT* outHR);
+	virtual ~OGMDecodeInputPin(void);
+
+	virtual STDMETHODIMP GetAllocatorRequirements(ALLOCATOR_PROPERTIES *outRequestedProps);
+	virtual HRESULT SetMediaType(const CMediaType* inMediaType);
+	virtual HRESULT CheckMediaType(const CMediaType *inMediaType);
+	//IOggDecoder Interface
+	virtual LOOG_INT64 convertGranuleToTime(LOOG_INT64 inGranule);
+	virtual LOOG_INT64 mustSeekBefore(LOOG_INT64 inGranule);
+	virtual IOggDecoder::eAcceptHeaderResult showHeaderPacket(OggPacket* inCodecHeaderPacket);
+	virtual string getCodecShortName();
+	virtual string getCodecIdentString();
+
+	VIDEOINFOHEADER* getVideoFormatBlock()		{		return mVideoFormatBlock;	}
+protected:
+	enum eOGMSetupState {
+		VSS_SEEN_NOTHING,
+		VSS_SEEN_BOS,
+		VSS_SEEN_COMMENT,
+		VSS_ALL_HEADERS_SEEN,
+		VSS_ERROR
+	};
+
+	eOGMSetupState mSetupState;
+	bool handleHeaderPacket(OggPacket* inHeaderPack);
+
+	VIDEOINFOHEADER* mVideoFormatBlock;
+
+	static const unsigned long OGM_IDENT_HEADER_SIZE = 80;
+	static const unsigned long OGM_NUM_BUFFERS = 50;
+	static const unsigned long OGM_BUFFER_SIZE = 1024*512*3;;
+
+};

Added: branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeOutputPin.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeOutputPin.cpp	2005-11-09 00:58:18 UTC (rev 10358)
+++ branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeOutputPin.cpp	2005-11-09 06:09:19 UTC (rev 10359)
@@ -0,0 +1,10 @@
+#include "StdAfx.h"
+#include ".\ogmdecodeoutputpin.h"
+
+OGMDecodeOutputPin::OGMDecodeOutputPin(void)
+{
+}
+
+OGMDecodeOutputPin::~OGMDecodeOutputPin(void)
+{
+}

Added: branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeOutputPin.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeOutputPin.h	2005-11-09 00:58:18 UTC (rev 10358)
+++ branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeOutputPin.h	2005-11-09 06:09:19 UTC (rev 10359)
@@ -0,0 +1,8 @@
+#pragma once
+
+class OGMDecodeOutputPin
+{
+public:
+	OGMDecodeOutputPin(void);
+	~OGMDecodeOutputPin(void);
+};

Added: branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/ReadMe.txt
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/ReadMe.txt	2005-11-09 00:58:18 UTC (rev 10358)
+++ branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/ReadMe.txt	2005-11-09 06:09:19 UTC (rev 10359)
@@ -0,0 +1,32 @@
+========================================================================
+    DYNAMIC LINK LIBRARY : dsfOGMDecoder Project Overview
+========================================================================
+
+AppWizard has created this dsfOGMDecoder DLL for you.  
+This file contains a summary of what you will find in each of the files that
+make up your dsfOGMDecoder application.
+
+
+dsfOGMDecoder.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.
+
+dsfOGMDecoder.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 dsfOGMDecoder.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: branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.cpp	2005-11-09 00:58:18 UTC (rev 10358)
+++ branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.cpp	2005-11-09 06:09:19 UTC (rev 10359)
@@ -0,0 +1,36 @@
+// dsfOGMDecoder.cpp : Defines the entry point for the DLL application.
+//
+
+#include "stdafx.h"
+#include "dsfOGMDecoder.h"
+BOOL APIENTRY DllMain( HANDLE hModule, 
+                       DWORD  ul_reason_for_call, 
+                       LPVOID lpReserved
+					 )
+{
+	switch (ul_reason_for_call)
+	{
+	case DLL_PROCESS_ATTACH:
+	case DLL_THREAD_ATTACH:
+	case DLL_THREAD_DETACH:
+	case DLL_PROCESS_DETACH:
+		break;
+	}
+    return TRUE;
+}
+
+// This is an example of an exported variable
+DSFOGMDECODER_API int ndsfOGMDecoder=0;
+
+// This is an example of an exported function.
+DSFOGMDECODER_API int fndsfOGMDecoder(void)
+{
+	return 42;
+}
+
+// This is the constructor of a class that has been exported.
+// see dsfOGMDecoder.h for the class definition
+CdsfOGMDecoder::CdsfOGMDecoder()
+{ 
+	return; 
+}

Added: branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.h	2005-11-09 00:58:18 UTC (rev 10358)
+++ branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.h	2005-11-09 06:09:19 UTC (rev 10359)
@@ -0,0 +1,22 @@
+// The following ifdef block is the standard way of creating macros which make exporting 
+// from a DLL simpler. All files within this DLL are compiled with the DSFOGMDECODER_EXPORTS
+// symbol defined on the command line. this symbol should not be defined on any project
+// that uses this DLL. This way any other project whose source files include this file see 
+// DSFOGMDECODER_API functions as being imported from a DLL, whereas this DLL sees symbols
+// defined with this macro as being exported.
+#ifdef DSFOGMDECODER_EXPORTS
+#define DSFOGMDECODER_API __declspec(dllexport)
+#else
+#define DSFOGMDECODER_API __declspec(dllimport)
+#endif
+
+// This class is exported from the dsfOGMDecoder.dll
+class DSFOGMDECODER_API CdsfOGMDecoder {
+public:
+	CdsfOGMDecoder(void);
+	// TODO: add your methods here.
+};
+
+extern DSFOGMDECODER_API int ndsfOGMDecoder;
+
+DSFOGMDECODER_API int fndsfOGMDecoder(void);

Added: branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.vcproj
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.vcproj	2005-11-09 00:58:18 UTC (rev 10358)
+++ branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.vcproj	2005-11-09 06:09:19 UTC (rev 10359)
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="dsfOGMDecoder"
+	ProjectGUID="{1C4F9412-B1DE-4E65-96C1-89522EF02997}"
+	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="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper;..\..\..\..\core\directshow\dsfOggDemux2"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DSFOGMDECODER_EXPORTS"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				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)/dsfOGMDecoder.dll"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses\Debug&quot;"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/dsfOGMDecoder.pdb"
+				SubSystem="2"
+				ImportLibrary="$(OutDir)/dsfOGMDecoder.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="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..\..\..\..\core\directshow\libDirectshowAbstracts;..\..\..\..\core\ogg;..\..\..\helper\libfishsound\include;..\..\..\..\core\directshow\dsfSeeking;..\..\..\..\helper;..\..\..\..\core\directshow\dsfOggDemux2"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFOGMDECODER_EXPORTS"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="3"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="Strmbase.lib Winmm.lib Strmiids.lib  Quartz.lib"
+				OutputFile="$(OutDir)/dsfOGMDecoder.dll"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses\Release&quot;"
+				GenerateDebugInformation="TRUE"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				ImportLibrary="$(OutDir)/dsfOGMDecoder.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=".\OGMDecodeFilter.cpp">
+			</File>
+			<File
+				RelativePath=".\OGMDecodeInputPin.cpp">
+			</File>
+			<File
+				RelativePath=".\OGMDecodeOutputPin.cpp">
+			</File>
+			<File
+				RelativePath=".\ogmdecoderdllstuff.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=".\OGMDecodeFilter.h">
+			</File>
+			<File
+				RelativePath=".\OGMDecodeInputPin.h">
+			</File>
+			<File
+				RelativePath=".\OGMDecodeOutputPin.h">
+			</File>
+			<File
+				RelativePath=".\ogmdecoderdllstuff.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: branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoderdllstuff.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoderdllstuff.cpp	2005-11-09 00:58:18 UTC (rev 10358)
+++ branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoderdllstuff.cpp	2005-11-09 06:09:19 UTC (rev 10359)
@@ -0,0 +1,99 @@
+//===========================================================================
+//Copyright (C) 2003, 2004, 2005 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 "ogmdecoderdllstuff.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()
+{
+
+	
+    HRESULT hr;
+    IFilterMapper2* locFilterMapper = NULL;
+
+    hr = AMovieDllRegisterServer2(TRUE);
+
+
+	
+
+    hr = CoCreateInstance(CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, IID_IFilterMapper2, (void **)&locFilterMapper);
+
+
+	hr = locFilterMapper->RegisterFilter(
+		CLSID_OGMDecodeFilter,						// Filter CLSID. 
+		L"OGM Decode Filter",							// Filter name.
+        NULL,										// Device moniker. 
+        &CLSID_LegacyAmFilterCategory,				// Direct Show general category
+        L"OGM Decode Filter",							// Instance data. ???????
+        &OGMDecodeFilterReg								// 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"OGM Decode Filter", CLSID_OGMDecodeFilter);
+
+
+	//
+    locFilterMapper->Release();
+    return hr;
+
+}

Added: branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoderdllstuff.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoderdllstuff.h	2005-11-09 00:58:18 UTC (rev 10358)
+++ branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoderdllstuff.h	2005-11-09 06:09:19 UTC (rev 10359)
@@ -0,0 +1,129 @@
+//===========================================================================
+//Copyright (C) 2003, 2004, 2005 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 "libOOOgg/OggPacket.h"
+
+#include <streams.h>
+#include <pullpin.h>
+#include <initguid.h>
+//#include <streams.h>
+//#include <pullpin.h>
+//#include <initguid.h>
+
+//#ifdef DSFABSTRACOGGAUDIODECODER_EXPORTS
+//#pragma message("----> Exporting from Abstract Library...")
+//#define ABS_AUDIO_DEC_API __declspec(dllexport)
+//#else
+//#pragma message("<---- Importing from Abstract Library...")
+//#define ABS_AUDIO_DEC_API __declspec(dllimport)
+//#endif
+
+#ifdef LIBOOOGG_EXPORTS
+#define LIBOOOGG_API __declspec(dllexport)
+#else
+#define LIBOOOGG_API __declspec(dllimport)
+#endif
+
+// {368DD7F2-5644-4a88-AC4C-D334B82660B5}
+DEFINE_GUID(CLSID_OGMDecodeFilter, 
+0x368dd7f2, 0x5644, 0x4a88, 0xac, 0x4c, 0xd3, 0x34, 0xb8, 0x26, 0x60, 0xb5);
+
+
+
+// {60891713-C24F-4767-B6C9-6CA05B3338FC}
+DEFINE_GUID(MEDIATYPE_OggPacketStream, 
+0x60891713, 0xc24f, 0x4767, 0xb6, 0xc9, 0x6c, 0xa0, 0x5b, 0x33, 0x38, 0xfc);
+
+// {95388704-162C-42a9-8149-C3577C12AAF9}
+DEFINE_GUID(FORMAT_OggIdentHeader, 
+0x95388704, 0x162c, 0x42a9, 0x81, 0x49, 0xc3, 0x57, 0x7c, 0x12, 0xaa, 0xf9);
+
+// {43F0F818-10B0-4c86-B9F1-F6B6E2D33462}
+DEFINE_GUID(IID_IOggDecoder, 
+0x43f0f818, 0x10b0, 0x4c86, 0xb9, 0xf1, 0xf6, 0xb6, 0xe2, 0xd3, 0x34, 0x62);
+
+//const REGPINTYPES SpeexDecodeOutputTypes = {
+//    &MEDIATYPE_Video,
+//	&MEDIASUBTYPE_PCM
+//};
+
+const REGPINTYPES OGMDecodeInputTypes = {
+	&MEDIATYPE_OggPacketStream,
+	&MEDIASUBTYPE_None
+};
+const REGFILTERPINS OGMDecodePinReg[] = {
+	{
+    L"OGM 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
+	&OGMDecodeInputTypes				//Pointer to media type (Audio/Vorbis or Audio/Speex)
+	} ,
+
+	{
+	L"Video 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)
+	0,									//Only support one media type
+	NULL								//Pointer to media type (Audio/PCM)
+
+	}
+};
+
+
+
+const REGFILTER2 OGMDecodeFilterReg = {
+		1,
+		MERIT_NORMAL,
+		2,
+        OGMDecodePinReg
+		
+};
+	   
+
+//struct sSpeexFormatBlock {
+//	unsigned long speexVersion;
+//	unsigned long samplesPerSec;
+//	unsigned long minBitsPerSec;
+//	unsigned long avgBitsPerSec;
+//	unsigned long maxBitsPerSec;
+//	unsigned long numChannels;
+//
+//};
\ No newline at end of file

Added: branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/stdafx.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/stdafx.cpp	2005-11-09 00:58:18 UTC (rev 10358)
+++ branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/stdafx.cpp	2005-11-09 06:09:19 UTC (rev 10359)
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+// dsfOGMDecoder.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: branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/stdafx.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/stdafx.h	2005-11-09 00:58:18 UTC (rev 10358)
+++ branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/stdafx.h	2005-11-09 06:09:19 UTC (rev 10359)
@@ -0,0 +1,18 @@
+// 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>
+
+#include <libOOOgg/libOOOgg.h>
+
+#include "OGMDecodeInputPin.h"
+#include "OGMDecodeFilter.h"
+
+// TODO: reference additional headers your program requires here



More information about the commits mailing list