[xiph-commits] r10395 - in branches/oggdsf_new_demux: build/oggcodecs sln/oggdsf_all src/lib/codecs/RawAudio src/lib/codecs/RawAudio/dsfOggRawAudioExtractor src/lib/codecs/RawAudio/dsfOggRawAudioInserter src/lib/codecs/ogm/filters/dsfOGMDecoder src/lib/core/directshow/dsfOggMux

illiminable at svn.xiph.org illiminable at svn.xiph.org
Thu Nov 17 07:53:19 PST 2005


Author: illiminable
Date: 2005-11-17 07:52:54 -0800 (Thu, 17 Nov 2005)
New Revision: 10395

Added:
   branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/
   branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorFilter.cpp
   branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorFilter.h
   branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorInputPin.cpp
   branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorInputPin.h
   branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorOutputPin.cpp
   branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorOutputPin.h
   branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/dsfOggRawAudioExtractor.vcproj
   branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/oggrawaudioextractor.def
   branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/oggrawaudioextractordllstuff.cpp
   branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/oggrawaudioextractordllstuff.h
   branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/stdafx.cpp
   branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/stdafx.h
Modified:
   branches/oggdsf_new_demux/build/oggcodecs/oggcodecs.vdproj
   branches/oggdsf_new_demux/sln/oggdsf_all/oggdsf_all.sln
   branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioInserter/OggRawAudioInserterInputPin.cpp
   branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioInserter/oggrawaudioinserterdllstuff.h
   branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeFilter.cpp
   branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeInputPin.h
   branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggMux/oggmuxdllstuff.h
Log:
* "Decoder" for the raw audio format informally known as OggPCM2

Modified: branches/oggdsf_new_demux/build/oggcodecs/oggcodecs.vdproj
===================================================================
--- branches/oggdsf_new_demux/build/oggcodecs/oggcodecs.vdproj	2005-11-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/build/oggcodecs/oggcodecs.vdproj	2005-11-17 15:52:54 UTC (rev 10395)
@@ -130,6 +130,12 @@
         "Entry"
         {
         "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
+        "OwnerKey" = "8:_B280383D9C3B489DB4520726F3947362"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
         "OwnerKey" = "8:_D11B66B126844E2B8ED91008BCC029FA"
         "MsmSig" = "8:_UNDEFINED"
         }
@@ -418,6 +424,12 @@
         "Entry"
         {
         "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
+        "OwnerKey" = "8:_B280383D9C3B489DB4520726F3947362"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
         "OwnerKey" = "8:_D11B66B126844E2B8ED91008BCC029FA"
         "MsmSig" = "8:_UNDEFINED"
         }
@@ -747,6 +759,12 @@
         }
         "Entry"
         {
+        "MsmKey" = "8:_B280383D9C3B489DB4520726F3947362"
+        "OwnerKey" = "8:_UNDEFINED"
+        "MsmSig" = "8:_UNDEFINED"
+        }
+        "Entry"
+        {
         "MsmKey" = "8:_B9749E2A902A46BEAE555C07E32980BB"
         "OwnerKey" = "8:_UNDEFINED"
         "MsmSig" = "8:_UNDEFINED"
@@ -1195,7 +1213,7 @@
         "Name" = "8:Microsoft Visual Studio"
         "ProductName" = "8:oggcodecs"
         "ProductCode" = "8:{D65F0073-A820-4085-B997-A061171595A7}"
-        "PackageCode" = "8:{41C2F111-483A-400F-92BF-B99A31111F5F}"
+        "PackageCode" = "8:{3F85F87A-1BB4-453A-8641-A510705ACD59}"
         "UpgradeCode" = "8:{1A644FEB-7597-4FAB-AADE-C2C7C64C5984}"
         "RestartWWWService" = "11:FALSE"
         "RemovePreviousVersions" = "11:TRUE"
@@ -4681,6 +4699,34 @@
                 {
                 }
             }
+            "{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_B280383D9C3B489DB4520726F3947362"
+            {
+            "SourcePath" = "8:..\\..\\src\\lib\\codecs\\rawaudio\\dsfoggrawaudioextractor\\debug\\dsfOggRawAudioExtractor.dll"
+            "TargetName" = "8:"
+            "Tag" = "8:"
+            "Folder" = "8:_371AD289B6DB4693BDF7568485051F1E"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "IsolateTo" = "8:"
+            "ProjectOutputGroupRegister" = "3:4"
+            "OutputConfiguration" = "8:"
+            "OutputGroupCanonicalName" = "8:Built"
+            "OutputProjectGuid" = "8:{20DC77C5-8396-4C6D-A805-959CF8DFABB3}"
+            "ShowKeyOutput" = "11:TRUE"
+                "ExcludeFilters"
+                {
+                }
+            }
             "{8062640A-2EEE-46E9-AB67-688E9A886E9F}:_B9749E2A902A46BEAE555C07E32980BB"
             {
             "SourcePath" = "8:..\\..\\src\\tools\\OOOggSeekFileMaker\\Debug\\OOOggSeekFileMaker.exe"

Modified: branches/oggdsf_new_demux/sln/oggdsf_all/oggdsf_all.sln
===================================================================
--- branches/oggdsf_new_demux/sln/oggdsf_all/oggdsf_all.sln	2005-11-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/sln/oggdsf_all/oggdsf_all.sln	2005-11-17 15:52:54 UTC (rev 10395)
@@ -1219,6 +1219,13 @@
 		{2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4} = {2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4}
 	EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsfOggRawAudioExtractor", "..\..\src\lib\codecs\RawAudio\dsfOggRawAudioExtractor\dsfOggRawAudioExtractor.vcproj", "{20DC77C5-8396-4C6D-A805-959CF8DFABB3}"
+	ProjectSection(ProjectDependencies) = postProject
+		{223ACC19-608E-4E1B-A054-067F0CACB272} = {223ACC19-608E-4E1B-A054-067F0CACB272}
+		{4CBC0173-27E6-4218-AE06-5EFDCA7B2547} = {4CBC0173-27E6-4218-AE06-5EFDCA7B2547}
+		{2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4} = {2DA569EC-3E22-4BC9-A242-C7A56EB9C6F4}
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfiguration) = preSolution
 		Debug = Debug
@@ -2828,6 +2835,26 @@
 		{EEEBA51F-0499-4AD0-A25C-36C3AF2956C9}.Release_SSE.Build.0 = Release|Win32
 		{EEEBA51F-0499-4AD0-A25C-36C3AF2956C9}.Release_SSE2.ActiveCfg = Release|Win32
 		{EEEBA51F-0499-4AD0-A25C-36C3AF2956C9}.Release_SSE2.Build.0 = Release|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.Debug.ActiveCfg = Debug|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.Debug.Build.0 = Debug|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.Debug Unicode.ActiveCfg = Debug|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.Debug Unicode.Build.0 = Debug|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.Debug__cdecl.ActiveCfg = Debug|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.Debug__cdecl.Build.0 = Debug|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.MakeFile.ActiveCfg = Release|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.MakeFile.Build.0 = Release|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.Release.ActiveCfg = Release|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.Release.Build.0 = Release|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.Release Unicode.ActiveCfg = Release|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.Release Unicode.Build.0 = Release|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.Release__cdecl.ActiveCfg = Release|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.Release__cdecl.Build.0 = Release|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.Release_NoDotNET.ActiveCfg = Release|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.Release_NoDotNET.Build.0 = Release|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.Release_SSE.ActiveCfg = Release|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.Release_SSE.Build.0 = Release|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.Release_SSE2.ActiveCfg = Release|Win32
+		{20DC77C5-8396-4C6D-A805-959CF8DFABB3}.Release_SSE2.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionItems) = postSolution
 	EndGlobalSection

Added: branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorFilter.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorFilter.cpp	2005-11-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorFilter.cpp	2005-11-17 15:52:54 UTC (rev 10395)
@@ -0,0 +1,443 @@
+//===========================================================================
+//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 "OggRawAudioExtractorFilter.h"
+
+
+
+//COM Factory Template
+CFactoryTemplate g_Templates[] = 
+{
+    { 
+		L"Ogg Raw Audio Extractor Filter",					// Name
+	    &CLSID_OggRawAudioExtractorFilter,				// CLSID
+	    OggRawAudioExtractorFilter::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]); 
+
+OggRawAudioExtractorFilter::OggRawAudioExtractorFilter()
+	:	CTransformFilter(NAME("Ogg Raw Audio Extractor"), NULL, CLSID_OggRawAudioExtractorFilter)
+	,	mInputPin(NULL)
+	,	mOutputPin(NULL)
+
+	,	mWorkingBuff(NULL)
+	,	mBytesBuffered(0)
+
+	,	mSegStart(0)
+	,	mSegEnd(0)
+	,	mSegRate(0)
+	
+{
+	mWorkingBuff = new unsigned char[1<<20];	//1 meg
+	
+}
+
+
+
+OggRawAudioExtractorFilter::~OggRawAudioExtractorFilter(void)
+{
+	delete[] mWorkingBuff;
+}
+
+CUnknown* WINAPI OggRawAudioExtractorFilter::CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr) 
+{
+	//This routine is the COM implementation to create a new Filter
+	OggRawAudioExtractorFilter *pNewObject = new OggRawAudioExtractorFilter();
+    if (pNewObject == NULL) {
+        *pHr = E_OUTOFMEMORY;
+    }
+	return pNewObject;
+} 
+
+HRESULT OggRawAudioExtractorFilter::CheckInputType(const CMediaType* inMediaType)
+{
+	return mInputPin->CheckMediaType(inMediaType);
+}
+HRESULT OggRawAudioExtractorFilter::CheckTransform(const CMediaType* inInputMediaType, const CMediaType* inOutputMediaType)
+{
+
+	return S_OK;
+}
+HRESULT OggRawAudioExtractorFilter::DecideBufferSize(IMemAllocator* inAllocator, ALLOCATOR_PROPERTIES* inPropertyRequest)
+{
+	HRESULT locHR = S_OK;
+
+	ALLOCATOR_PROPERTIES locReqAlloc;
+	ALLOCATOR_PROPERTIES locActualAlloc;
+	
+	if (inPropertyRequest->cbAlign <= 0) {
+		locReqAlloc.cbAlign = 1;
+	} else {
+		locReqAlloc.cbAlign = inPropertyRequest->cbAlign;
+	}
+
+
+	if (inPropertyRequest->cbBuffer == 0) {
+		locReqAlloc.cbBuffer = 65536*16;
+	} else {
+		locReqAlloc.cbBuffer = inPropertyRequest->cbBuffer;
+	}
+	
+
+	if (inPropertyRequest->cbPrefix < 0) {
+			locReqAlloc.cbPrefix = 0;
+	} else {
+		locReqAlloc.cbPrefix = inPropertyRequest->cbPrefix;
+	}
+	
+	if (inPropertyRequest->cBuffers == 0) {
+		locReqAlloc.cBuffers = 5;
+	} else {
+		locReqAlloc.cBuffers = inPropertyRequest->cBuffers;
+	}
+
+	
+	locHR = inAllocator->SetProperties(&locReqAlloc, &locActualAlloc);
+
+	if (locHR != S_OK) {
+		//TODO::: Handle a fail state here.
+		return locHR;
+	} else {
+		//TODO::: Need to save this pointer to decommit in destructor ???
+		locHR = inAllocator->Commit();
+
+	
+		return locHR;
+	}
+	
+}
+
+HRESULT OggRawAudioExtractorFilter::NewSegment(REFERENCE_TIME inStartTime, REFERENCE_TIME inStopTime, double inRate)
+{
+	mSegStart = inStartTime;
+	mSegEnd = inStopTime;
+	mSegRate = inRate;
+	return CTransformFilter::NewSegment(inStartTime, inStopTime, inRate);
+}
+HRESULT OggRawAudioExtractorFilter::GetMediaType(int inPosition, CMediaType* outMediaType)
+{
+	
+	if (inPosition < 0) {
+		return E_INVALIDARG;
+	}
+	
+	if ((inPosition == 0) && (mInputPin != NULL) && (mInputPin->IsConnected())) {
+		
+		WAVEFORMATEX* locWaveFormat = (WAVEFORMATEX*)outMediaType->AllocFormatBuffer(sizeof(WAVEFORMATEX));
+		//*locVideoFormat = *mInputPin->getVideoFormatBlock();
+
+		sOggRawAudioFormatBlock locOggFormat =  mInputPin->getFormatBlock();
+		locWaveFormat->wFormatTag = WAVE_FORMAT_PCM;
+		locWaveFormat->nChannels = locOggFormat.numChannels;
+		locWaveFormat->nSamplesPerSec = locOggFormat.samplesPerSec;
+		locWaveFormat->wBitsPerSample = locOggFormat.bitsPerSample;
+		locWaveFormat->nBlockAlign = (locWaveFormat->nChannels) * (locWaveFormat->wBitsPerSample >> 3);
+		locWaveFormat->nAvgBytesPerSec = ((locWaveFormat->nChannels) * (locWaveFormat->wBitsPerSample >> 3)) * locWaveFormat->nSamplesPerSec;
+		locWaveFormat->cbSize = 0;
+		
+		outMediaType->majortype = MEDIATYPE_Audio;
+		outMediaType->subtype = MEDIASUBTYPE_PCM;
+		outMediaType->formattype = FORMAT_WaveFormatEx;
+
+		return S_OK;
+	} else {
+		return VFW_S_NO_MORE_ITEMS;
+	}
+
+
+}
+
+HRESULT OggRawAudioExtractorFilter::Receive(IMediaSample* inSample)
+{
+	BYTE* locInBuff = NULL;
+	HRESULT locHR = inSample->GetPointer(&locInBuff);
+
+	if (locHR == S_OK) {
+		REFERENCE_TIME locStart = -1;
+		REFERENCE_TIME locEnd = -1;
+		inSample->GetTime(&locStart, &locEnd);
+		if (locEnd == 0) {
+			return S_OK;
+		}
+
+		memcpy((void*)&mWorkingBuff[mBytesBuffered], (const void*)locInBuff, inSample->GetActualDataLength());
+		mBytesBuffered += inSample->GetActualDataLength();
+
+
+
+		if (locEnd > 0) {
+			//Can dump it all downstream now	
+			IMediaSample* locSample;
+			unsigned long locSampleDuration = 0;
+			unsigned long locBytesCopied = 0;
+			unsigned long locBytesToCopy = 0;
+			unsigned long locSampleRate = mInputPin->getFormatBlock().samplesPerSec;
+			unsigned long locFrameSize = (mInputPin->getFormatBlock().bitsPerSample * mInputPin->getFormatBlock().numChannels) >> 3;
+
+			locStart = mInputPin->convertGranuleToTime(locEnd) - (((mBytesBuffered / locFrameSize) * UNITS) / locSampleRate);
+			do {
+				HRESULT locHR = mOutputPin->GetDeliveryBuffer(&locSample, NULL, NULL, NULL);
+				if (locHR != S_OK) {
+					return locHR;
+				}
+
+				BYTE* locBuffer = NULL;
+				locHR = locSample->GetPointer(&locBuffer);
+			
+				if (locHR != S_OK) {
+					return locHR;
+				}
+
+				locBytesToCopy = ((mBytesBuffered - locBytesCopied) <= locSample->GetSize()) ? (mBytesBuffered - locBytesCopied) : locSample->GetSize();
+				//locBytesCopied += locBytesToCopy;
+
+				locSampleDuration = (((locBytesToCopy/locFrameSize) * UNITS) / locSampleRate);
+				locEnd = locStart + locSampleDuration;
+
+				//Adjust the time stamps for rate and seeking
+				REFERENCE_TIME locAdjustedStart = locStart; //(locStart * RATE_DENOMINATOR) / mRateNumerator;
+				REFERENCE_TIME locAdjustedEnd = locEnd; //(locEnd * RATE_DENOMINATOR) / mRateNumerator;
+				locAdjustedStart -= mSegStart;
+				locAdjustedEnd -= mSegStart;
+
+				__int64 locSeekStripOffset = 0;
+				if (locAdjustedEnd < 0) {
+					locSample->Release();
+				} else {
+					if (locAdjustedStart < 0) {
+						locSeekStripOffset = (-locAdjustedStart) * locSampleRate;
+						locSeekStripOffset *= locFrameSize;
+						locSeekStripOffset /= UNITS;
+						locSeekStripOffset += (locFrameSize - (locSeekStripOffset % locFrameSize));
+						__int64 locStrippedDuration = (((locSeekStripOffset/locFrameSize) * UNITS) / locSampleRate);
+						locAdjustedStart += locStrippedDuration;
+					}
+						
+
+				
+
+					memcpy((void*)locBuffer, (const void*)&mWorkingBuff[locBytesCopied + locSeekStripOffset], locBytesToCopy - locSeekStripOffset);
+
+					locSample->SetTime(&locAdjustedStart, &locAdjustedEnd);
+					locSample->SetMediaTime(&locStart, &locEnd);
+					locSample->SetSyncPoint(TRUE);
+					locSample->SetActualDataLength(locBytesToCopy - locSeekStripOffset);
+					locHR = mOutputPin->Deliver(locSample); //((SpeexDecodeOutputPin*)(mOutputPin))->mDataQueue->Receive(locSample);
+					locSample->Release();
+					if (locHR != S_OK) {
+						return locHR;
+					}
+					locStart += locSampleDuration;
+
+				}
+				locBytesCopied += locBytesToCopy;
+
+			
+			} while(locBytesCopied < mBytesBuffered);
+
+			mBytesBuffered = 0;
+
+		}
+
+		return S_OK;
+
+	}
+
+	return S_FALSE;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+	//	unsigned long locLength = inSample->GetActualDataLength();
+
+	//	memcpy((void*)locBuff, (const void*)locInBuff, locLength);
+	//	locPack.mBuff = locBuff;
+	//	locPack.mLength = locLength;
+
+	//	unsigned long locNumLenBytes = locInBuff[0];
+	//	
+	//	
+	//	//Find out how many bytes of the header are the length field
+	//	const unsigned char LEN_MASK = 0xC2; //11000010
+	//	locNumLenBytes &= LEN_MASK;
+	//	locNumLenBytes = (locNumLenBytes >> 6) | ((locNumLenBytes&2) << 1);
+
+	//	__int64 locPackTime = 0;
+	//	if (locNumLenBytes != 0) {
+	//		for (int i = 0; i <  locNumLenBytes; i++) {
+	//			locPackTime |= ((__int64)locInBuff[1+i] << (i * 8));
+	//		}
+	//	} else {
+	//		locPackTime = 1;
+	//	}
+	//	
+	//	mFramesBuffered += locPackTime;
+	//	locPack.mDuration = locPackTime;
+	//	locPack.mHeaderSize = locNumLenBytes + 1;
+	//	locPack.mIsKeyframe = ((locInBuff[0] & (1<<3)) != 0);
+
+	//	mPacketBuffer.push_back(locPack);
+
+	//	if (locEnd > 0) {
+	//		REFERENCE_TIME locGlobalStart = 0;
+	//		REFERENCE_TIME locGlobalEnd = 0;
+
+	//		__int64 locFrameDuration = mInputPin->getVideoFormatBlock()->AvgTimePerFrame;
+	//		__int64 locNumBuffered = mPacketBuffer.size();
+
+	//		locGlobalEnd = locEnd * locFrameDuration;
+	//		locGlobalStart = locGlobalEnd - (mFramesBuffered * locFrameDuration);
+
+	//		__int64 locUptoStart = locGlobalStart;
+	//		__int64 locUptoEnd = locGlobalStart;
+
+	//		__int64 locAdjustedStart = 0;
+	//		__int64 locAdjustedEnd = 0;
+	//		for (int i = 0; i < locNumBuffered; i++) {
+	//			IMediaSample* locOutSample = NULL;
+	//			
+	//			locHR = InitializeOutputSample(inSample, &locOutSample);
+	//			if (locHR == S_OK) {
+	//				locUptoEnd = locUptoStart + (mPacketBuffer[i].mDuration * locFrameDuration);
+
+	//				locAdjustedStart = locUptoStart - mSegStart;
+	//				locAdjustedEnd = locUptoEnd - mSegStart;
+	//				locOutSample->SetTime(&locAdjustedStart, &locAdjustedEnd);
+	//				locOutSample->SetMediaTime(&locAdjustedStart, &locAdjustedEnd);
+	//				locOutSample->SetSyncPoint(mPacketBuffer[i].mIsKeyframe);
+	//				locOutSample->SetActualDataLength(mPacketBuffer[i].mLength - mPacketBuffer[i].mHeaderSize);
+	//				BYTE* locOutBuff = NULL;
+	//				locOutSample->GetPointer(&locOutBuff);
+	//				memcpy((void*)locOutBuff, (const void*)(mPacketBuffer[i].mBuff + mPacketBuffer[i].mHeaderSize), mPacketBuffer[i].mLength - mPacketBuffer[i].mHeaderSize);
+	//				locHR = m_pOutput->Deliver(locOutSample);
+	//				locOutSample->Release();
+
+	//				if (locHR != S_OK) {
+	//					deleteBufferedPackets();
+	//					return S_FALSE;
+	//				}
+
+	//				
+	//				locUptoStart = locUptoEnd;
+
+	//				
+	//			} else {
+	//				deleteBufferedPackets();
+	//				return S_FALSE;
+	//			}
+
+	//		}
+
+	//		deleteBufferedPackets();
+	//		return S_OK;
+
+
+
+
+
+	//	} else {
+	//		return S_OK;
+	//	}
+
+	//}
+}
+
+HRESULT OggRawAudioExtractorFilter::Transform(IMediaSample* inInputSample, IMediaSample* inOutputSample)
+{
+
+	//BYTE* locInBuff = NULL;
+	//BYTE* locOutBuff = NULL;
+
+	//inInputSample->GetPointer(&locInBuff);
+	//inOutputSample->GetPointer(&locOutBuff);
+
+	//mempcy((void*)locOutBuff, (const void*)locInBuff, inInputSample->GetActualDataLength());
+	return E_NOTIMPL;
+}
+
+CBasePin* OggRawAudioExtractorFilter::GetPin(int inPinNo)
+{
+
+    HRESULT locHR = S_OK;
+
+    // Create an input pin if necessary
+
+    if (m_pInput == NULL) {
+
+        m_pInput = new OggRawAudioExtractorInputPin(this, &locHR);		//Deleted in base destructor
+
+
+		mInputPin = (OggRawAudioExtractorInputPin*)m_pInput;
+        m_pOutput = new CTransformOutputPin(NAME("PCM Out"), this, &locHR, L"PCM Out");	//Deleted in base destructor
+		mOutputPin = m_pOutput;
+			
+
+    }
+
+    // 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/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorFilter.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorFilter.h	2005-11-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorFilter.h	2005-11-17 15:52:54 UTC (rev 10395)
@@ -0,0 +1,85 @@
+//===========================================================================
+//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 "oggrawaudioextractordllstuff.h"
+#include "OggRawAudioExtractorInputPin.h"
+#include <libilliCore/iBE_Math.h>
+
+//Forward Declarations
+struct sOggRawAudioFormatBlock;
+class OggRawAudioExtractorInputPin;
+class OggRawAudioExtractorOutputPin;
+
+//Class Interface
+class OggRawAudioExtractorFilter
+	//Base Classes
+	:	public CTransformFilter
+{
+public:
+	//Friends
+	//friend class OGMDecodeInputPin;
+	//friend class OGMDecodeOutputPin;
+
+	//Constructors and Destructors
+	OggRawAudioExtractorFilter(void);
+	virtual ~OggRawAudioExtractorFilter(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 HRESULT Receive(IMediaSample* inSample);
+
+	virtual HRESULT NewSegment(REFERENCE_TIME inStartTime, REFERENCE_TIME inStopTime, double inRate);
+
+	virtual CBasePin* GetPin(int inPinNo);
+
+
+protected:
+
+	OggRawAudioExtractorInputPin* mInputPin;
+	CTransformOutputPin* mOutputPin;
+
+	unsigned char* mWorkingBuff;
+	unsigned long mBytesBuffered;
+
+	__int64 mSegStart;
+	__int64 mSegEnd;
+	double mSegRate;
+
+};

Added: branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorInputPin.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorInputPin.cpp	2005-11-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorInputPin.cpp	2005-11-17 15:52:54 UTC (rev 10395)
@@ -0,0 +1,238 @@
+//===========================================================================
+//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 "OggRawAudioExtractorInputPin.h"
+
+OggRawAudioExtractorInputPin::OggRawAudioExtractorInputPin(OggRawAudioExtractorFilter* inParentFilter, HRESULT* outHR)
+	:	CTransformInputPin(NAME("OggAudioExtractorInputPin"), inParentFilter, outHR, L"Ogg Raw Audio In")
+
+	,	mSetupState(VSS_SEEN_NOTHING)
+{
+
+}
+
+OggRawAudioExtractorInputPin::~OggRawAudioExtractorInputPin(void)
+{
+
+}
+
+STDMETHODIMP OggRawAudioExtractorInputPin::NonDelegatingQueryInterface(REFIID riid, void **ppv)
+{
+	if (riid == IID_IMediaSeeking) {
+		*ppv = (IMediaSeeking*)this;
+		((IUnknown*)*ppv)->AddRef();
+		return NOERROR;
+	} else if (riid == IID_IOggDecoder) {
+		*ppv = (IOggDecoder*)this;
+		//((IUnknown*)*ppv)->AddRef();
+		return NOERROR;
+
+	}
+
+	return CBaseInputPin::NonDelegatingQueryInterface(riid, ppv); 
+}
+
+HRESULT OggRawAudioExtractorInputPin::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 OggRawAudioExtractorInputPin::CheckMediaType(const CMediaType *inMediaType)
+{
+	if (		(inMediaType->majortype == MEDIATYPE_OggPacketStream)
+			&&	(inMediaType->subtype == MEDIASUBTYPE_None)
+			&&	(inMediaType->formattype == FORMAT_OggIdentHeader)) {
+		if (inMediaType->cbFormat == OGG_RAW_AUDIO_IDENT_HEADER_SIZE) {
+			if (strncmp((char*)inMediaType->pbFormat, "PCM     ", 8) == 0) {
+				//TODO::: Possibly verify version
+				return S_OK;
+			}
+		}
+	}
+	return S_FALSE;
+	
+}
+HRESULT OggRawAudioExtractorInputPin::GetAllocatorRequirements(ALLOCATOR_PROPERTIES *outRequestedProps)
+{
+	outRequestedProps->cbBuffer = 65536;
+	outRequestedProps->cBuffers = OGG_RAW_AUDIO_NUM_BUFFERS;
+	outRequestedProps->cbAlign = 1;
+	outRequestedProps->cbPrefix = 0;
+
+	return S_OK;
+}
+LOOG_INT64 OggRawAudioExtractorInputPin::convertGranuleToTime(LOOG_INT64 inGranule)
+{
+	return (inGranule * UNITS) / mFormatBlock.samplesPerSec;
+}
+
+LOOG_INT64 OggRawAudioExtractorInputPin::mustSeekBefore(LOOG_INT64 inGranule)
+{
+	//TODO::: Get adjustment from block size info... for now, it doesn't matter if no preroll
+	return inGranule;
+}
+IOggDecoder::eAcceptHeaderResult OggRawAudioExtractorInputPin::showHeaderPacket(OggPacket* inCodecHeaderPacket)
+{
+	switch (mSetupState) {
+		case VSS_SEEN_NOTHING:
+			if (strncmp((char*)inCodecHeaderPacket->packetData(), "PCM     ", 8) == 0) {
+				handleHeaderPacket(inCodecHeaderPacket);
+				mSetupState = VSS_SEEN_BOS;
+				return IOggDecoder::AHR_MORE_HEADERS_TO_COME;
+			}
+			mSetupState = VSS_ERROR;
+			return IOggDecoder::AHR_INVALID_HEADER;
+			
+		case VSS_SEEN_BOS:
+			//TODO::: Handle extra headers
+			mSetupState = VSS_ALL_HEADERS_SEEN;
+			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 OggRawAudioExtractorInputPin::handleHeaderPacket(OggPacket* inHeaderPack)
+{
+	
+	//mVideoFormatBlock = new VIDEOINFOHEADER;
+
+	mFormatBlock.samplesPerSec = iBE_Math::charArrToULong(inHeaderPack->packetData() + 16);
+	mFormatBlock.maxFramesPerPacket = iBE_Math::charArrToULong(inHeaderPack->packetData() + 22) >> 16;
+	mFormatBlock.numChannels = inHeaderPack->packetData()[21];
+	mFormatBlock.numHeaders = iBE_Math::charArrToULong(inHeaderPack->packetData() + 24);
+	
+	switch(iBE_Math::charArrToULong(inHeaderPack->packetData() + 12)) {
+		case FMT_S8:
+		case FMT_U8:
+			mFormatBlock.bitsPerSample = 8;
+			break;
+		case FMT_S16_LE:
+		case FMT_S16_BE:
+			mFormatBlock.bitsPerSample = 16;
+			break;
+
+		default:
+			throw 0;
+
+		//case FMT_S24_LE,
+		//case FMT_S24_BE,
+		//case FMT_S32_LE,
+		//case FMT_S32_BE,
+
+		//case FMT_ULAW		=	0x10,
+		//case FMT_ALAW,
+
+		//case FMT_FLT32_LE	=	0x20,
+		//case FMT_FLT32_BE,
+		//case FMT_FLT64_LE,
+		//case FMT_FLT64_BE,
+		
+	}
+	
+	
+	//__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 OggRawAudioExtractorInputPin::getCodecShortName()
+{
+	return "Ogg Raw Audio";
+}
+string OggRawAudioExtractorInputPin::getCodecIdentString()
+{
+	//TODO:::
+	return "Ogg Raw Audio";
+}
+

Added: branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorInputPin.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorInputPin.h	2005-11-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorInputPin.h	2005-11-17 15:52:54 UTC (rev 10395)
@@ -0,0 +1,75 @@
+#pragma once
+
+#include "oggrawaudioextractordllstuff.h"
+#include "IOggDecoder.h"
+
+class OggRawAudioExtractorFilter;
+
+class OggRawAudioExtractorInputPin
+	:	public CTransformInputPin
+	,	public IOggDecoder
+{
+public:
+	DECLARE_IUNKNOWN
+	STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
+
+	OggRawAudioExtractorInputPin(OggRawAudioExtractorFilter* inParent, HRESULT* outHR);
+	virtual ~OggRawAudioExtractorInputPin(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();
+
+
+	sOggRawAudioFormatBlock getFormatBlock()		{return mFormatBlock;	}
+protected:
+	enum eOggRawAudioSetupState {
+		VSS_SEEN_NOTHING,
+		VSS_SEEN_BOS,
+		VSS_SEEN_COMMENT,
+		VSS_ALL_HEADERS_SEEN,
+		VSS_ERROR
+	};
+
+	eOggRawAudioSetupState mSetupState;
+	bool handleHeaderPacket(OggPacket* inHeaderPack);
+
+	sOggRawAudioFormatBlock mFormatBlock; 
+
+
+	static const unsigned long OGG_RAW_AUDIO_IDENT_HEADER_SIZE = 28;
+	static const unsigned long OGG_RAW_AUDIO_NUM_BUFFERS = 50;
+
+
+	enum eRawAudioFormat {
+		FMT_S8,
+		FMT_U8,
+		FMT_S16_LE,
+		FMT_S16_BE,
+		FMT_S24_LE,
+		FMT_S24_BE,
+		FMT_S32_LE,
+		FMT_S32_BE,
+
+		FMT_ULAW		=	0x10,
+		FMT_ALAW,
+
+		FMT_FLT32_LE	=	0x20,
+		FMT_FLT32_BE,
+		FMT_FLT64_LE,
+		FMT_FLT64_BE,
+
+		
+	};
+	//static const unsigned long OGM_BUFFER_SIZE = 1024*512*3;;
+
+};

Added: branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorOutputPin.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorOutputPin.cpp	2005-11-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorOutputPin.cpp	2005-11-17 15:52:54 UTC (rev 10395)
@@ -0,0 +1,9 @@
+#include ".\oggrawaudioextractoroutputpin.h"
+
+OggRawAudioExtractorOutputPin::OggRawAudioExtractorOutputPin(void)
+{
+}
+
+OggRawAudioExtractorOutputPin::~OggRawAudioExtractorOutputPin(void)
+{
+}

Added: branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorOutputPin.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorOutputPin.h	2005-11-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/OggRawAudioExtractorOutputPin.h	2005-11-17 15:52:54 UTC (rev 10395)
@@ -0,0 +1,8 @@
+#pragma once
+
+class OggRawAudioExtractorOutputPin
+{
+public:
+	OggRawAudioExtractorOutputPin(void);
+	~OggRawAudioExtractorOutputPin(void);
+};

Added: branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/dsfOggRawAudioExtractor.vcproj
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/dsfOggRawAudioExtractor.vcproj	2005-11-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/dsfOggRawAudioExtractor.vcproj	2005-11-17 15:52:54 UTC (rev 10395)
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="dsfOggRawAudioExtractor"
+	ProjectGUID="{20DC77C5-8396-4C6D-A805-959CF8DFABB3}"
+	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\dsfOggDemux2; ..\..\..\core\ogg;..\..\..\helper"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DSFOGGRAWAUDIOEXTRACTOR_EXPORTS"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				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)/dsfOggRawAudioExtractor.dll"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses\Debug&quot;"
+				ModuleDefinitionFile="oggrawaudioextractor.def"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/dsfOggRawAudioExtractor.pdb"
+				SubSystem="2"
+				ImportLibrary="$(OutDir)/dsfOggRawAudioExtractor.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\dsfOggDemux2; ..\..\..\core\ogg;..\..\..\helper"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFOGGRAWAUDIOEXTRACTOR_EXPORTS"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				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)/dsfOggRawAudioExtractor.dll"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses\Release&quot;"
+				ModuleDefinitionFile="oggrawaudioextractor.def"
+				GenerateDebugInformation="TRUE"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				ImportLibrary="$(OutDir)/dsfOggRawAudioExtractor.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=".\oggrawaudioextractor.def">
+			</File>
+			<File
+				RelativePath=".\oggrawaudioextractordllstuff.cpp">
+			</File>
+			<File
+				RelativePath=".\OggRawAudioExtractorFilter.cpp">
+			</File>
+			<File
+				RelativePath=".\OggRawAudioExtractorInputPin.cpp">
+			</File>
+			<File
+				RelativePath=".\OggRawAudioExtractorOutputPin.cpp">
+			</File>
+			<File
+				RelativePath=".\stdafx.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+			<File
+				RelativePath=".\oggrawaudioextractordllstuff.h">
+			</File>
+			<File
+				RelativePath=".\OggRawAudioExtractorFilter.h">
+			</File>
+			<File
+				RelativePath=".\OggRawAudioExtractorInputPin.h">
+			</File>
+			<File
+				RelativePath=".\OggRawAudioExtractorOutputPin.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>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

Added: branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/oggrawaudioextractor.def
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/oggrawaudioextractor.def	2005-11-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/oggrawaudioextractor.def	2005-11-17 15:52:54 UTC (rev 10395)
@@ -0,0 +1,8 @@
+LIBRARY	dsfOggRawAudioExtractor
+EXPORTS 
+	DllMain				PRIVATE
+    DllGetClassObject   PRIVATE
+    DllCanUnloadNow     PRIVATE
+    DllRegisterServer   PRIVATE
+    DllUnregisterServer PRIVATE
+    
\ No newline at end of file

Added: branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/oggrawaudioextractordllstuff.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/oggrawaudioextractordllstuff.cpp	2005-11-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/oggrawaudioextractordllstuff.cpp	2005-11-17 15:52:54 UTC (rev 10395)
@@ -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 "oggrawaudioextractordllstuff.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_OggRawAudioExtractorFilter,						// Filter CLSID. 
+		L"Ogg Raw Audio Extractor Filter",							// Filter name.
+        NULL,										// Device moniker. 
+        &CLSID_LegacyAmFilterCategory,				// Direct Show general category
+        L"Ogg Raw Audio Extractor Filter",							// Instance data. ???????
+        &OggRawAudioExtractorFilterReg								// 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"Ogg Raw Audio Extractor Filter", CLSID_OggRawAudioExtractorFilter);
+
+
+	//
+    locFilterMapper->Release();
+    return hr;
+
+}
+

Added: branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/oggrawaudioextractordllstuff.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/oggrawaudioextractordllstuff.h	2005-11-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/oggrawaudioextractordllstuff.h	2005-11-17 15:52:54 UTC (rev 10395)
@@ -0,0 +1,109 @@
+#pragma once
+
+
+#include <streams.h>
+#include <pullpin.h>
+#include <initguid.h>
+
+struct sOggRawAudioFormatBlock {
+	unsigned long samplesPerSec;
+	unsigned long numHeaders;
+	unsigned long numChannels;
+	unsigned long bitsPerSample;
+	unsigned long maxFramesPerPacket;
+
+
+};
+
+
+
+
+
+#ifdef LIBOOOGG_EXPORTS
+#define LIBOOOGG_API __declspec(dllexport)
+#else
+#define LIBOOOGG_API __declspec(dllimport)
+#endif
+
+#include "libOOOgg/OggPacket.h"
+
+#include "OggRawAudioExtractorInputPin.h"
+
+#include "OggRawAudioExtractorFilter.h"
+
+// {B9D15720-7AB4-4f0e-A215-D3C0EA8C0709}
+DEFINE_GUID(CLSID_OggRawAudioExtractorFilter, 
+0xb9d15720, 0x7ab4, 0x4f0e, 0xa2, 0x15, 0xd3, 0xc0, 0xea, 0x8c, 0x7, 0x9);
+
+
+// {37535B3C-F068-4f93-9763-E7208277D71F}
+DEFINE_GUID(MEDIASUBTYPE_RawOggAudio, 
+0x37535b3c, 0xf068, 0x4f93, 0x97, 0x63, 0xe7, 0x20, 0x82, 0x77, 0xd7, 0x1f);
+
+// {232D3C8F-16BF-404b-99AE-296F3DBB77EE}
+DEFINE_GUID(FORMAT_RawOggAudio, 
+0x232d3c8f, 0x16bf, 0x404b, 0x99, 0xae, 0x29, 0x6f, 0x3d, 0xbb, 0x77, 0xee);
+
+
+// {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 OggRawAudioExtractorOutputTypes = {
+    &MEDIATYPE_Audio,
+	&MEDIASUBTYPE_PCM
+};
+
+const REGPINTYPES OggRawAudioExtractorInputTypes = {
+	&MEDIATYPE_OggPacketStream,
+	&MEDIASUBTYPE_None
+};
+
+const REGFILTERPINS OggRawAudioExtractorPinReg[] = {
+	{
+    L"Ogg Raw Audio 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
+	&OggRawAudioExtractorInputTypes				//Pointer to media type (Audio/Speex or Audio/Speex)
+	} ,
+
+	{
+	L"PCM 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
+	&OggRawAudioExtractorOutputTypes					//Pointer to media type (Audio/PCM)
+
+	}
+};
+
+
+
+const REGFILTER2 OggRawAudioExtractorFilterReg = {
+		1,
+		MERIT_NORMAL,
+		2,
+        OggRawAudioExtractorPinReg
+		
+};
+	   
+
+

Added: branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/stdafx.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/stdafx.cpp	2005-11-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/stdafx.cpp	2005-11-17 15:52:54 UTC (rev 10395)
@@ -0,0 +1,40 @@
+//===========================================================================
+//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.
+//===========================================================================
+
+// stdafx.cpp : source file that includes just the standard includes
+
+// 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/RawAudio/dsfOggRawAudioExtractor/stdafx.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/stdafx.h	2005-11-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioExtractor/stdafx.h	2005-11-17 15:52:54 UTC (rev 10395)
@@ -0,0 +1,12 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#pragma once
+
+#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

Modified: branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioInserter/OggRawAudioInserterInputPin.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioInserter/OggRawAudioInserterInputPin.cpp	2005-11-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioInserter/OggRawAudioInserterInputPin.cpp	2005-11-17 15:52:54 UTC (rev 10395)
@@ -138,7 +138,7 @@
 {
 
 	if (!mSentHeaders) {
-		mFramesPerPacket = 1024;
+		
 
 		unsigned char* locHeader = NULL;
 		unsigned long locHeaderLength = 0;
@@ -347,11 +347,15 @@
 			(inMediaType->formattype == FORMAT_WaveFormatEx)) {
 
 		WAVEFORMATEX* locWaveFormat = (WAVEFORMATEX*)inMediaType->pbFormat;
+
+		mFramesPerPacket = 1024;
+
 		//TODO::: This needs to change with channel conversion/mapping headers
 		((OggRawAudioInserterFilter*)mParentFilter)->mOggRawAudioFormatBlock.numHeaders = 2;
 		((OggRawAudioInserterFilter*)mParentFilter)->mOggRawAudioFormatBlock.samplesPerSec = locWaveFormat->nSamplesPerSec;
 		((OggRawAudioInserterFilter*)mParentFilter)->mOggRawAudioFormatBlock.numChannels = locWaveFormat->nChannels;
 		((OggRawAudioInserterFilter*)mParentFilter)->mOggRawAudioFormatBlock.bitsPerSample = locWaveFormat->wBitsPerSample;
+		((OggRawAudioInserterFilter*)mParentFilter)->mOggRawAudioFormatBlock.maxFramesPerPacket = 1024;
 
 		
 	} else {

Modified: branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioInserter/oggrawaudioinserterdllstuff.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioInserter/oggrawaudioinserterdllstuff.h	2005-11-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/src/lib/codecs/RawAudio/dsfOggRawAudioInserter/oggrawaudioinserterdllstuff.h	2005-11-17 15:52:54 UTC (rev 10395)
@@ -36,6 +36,7 @@
 	unsigned long numHeaders;
 	unsigned long numChannels;
 	unsigned long bitsPerSample;
+	unsigned long maxFramesPerPacket;
 
 
 };

Modified: 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-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeFilter.cpp	2005-11-17 15:52:54 UTC (rev 10395)
@@ -1,6 +1,5 @@
-
 //===========================================================================
-//Copyright (C) 2003, 2004 Zentaro Kavanagh
+//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

Modified: 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-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeInputPin.h	2005-11-17 15:52:54 UTC (rev 10395)
@@ -1,3 +1,33 @@
+//===========================================================================
+//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 "ogmdecoderdllstuff.h"

Modified: branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggMux/oggmuxdllstuff.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggMux/oggmuxdllstuff.h	2005-11-17 11:39:32 UTC (rev 10394)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggMux/oggmuxdllstuff.h	2005-11-17 15:52:54 UTC (rev 10395)
@@ -238,6 +238,7 @@
 	unsigned long numHeaders;
 	unsigned long numChannels;
 	unsigned long bitsPerSample;
+	unsigned long maxFramesPerPacket;
 
 
 };



More information about the commits mailing list