[xiph-commits] r10810 - in trunk/oggdsf/src/lib/codecs: . ogm
ogm/filters ogm/filters/dsfOGMDecoder
illiminable at svn.xiph.org
illiminable at svn.xiph.org
Sun Feb 12 14:03:31 PST 2006
Author: illiminable
Date: 2006-02-12 14:03:07 -0800 (Sun, 12 Feb 2006)
New Revision: 10810
Added:
trunk/oggdsf/src/lib/codecs/ogm/
trunk/oggdsf/src/lib/codecs/ogm/filters/
trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/
trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeFilter.cpp
trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeFilter.h
trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeInputPin.cpp
trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeInputPin.h
trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeOutputPin.cpp
trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeOutputPin.h
trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/ReadMe.txt
trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.cpp
trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.h
trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.vcproj
trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoder.def
trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoderdllstuff.cpp
trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoderdllstuff.h
trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/stdafx.cpp
trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/stdafx.h
Log:
* Merge ogm decoder (don't use this rev.)
Added: trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeFilter.cpp 2006-02-12 22:01:22 UTC (rev 10809)
+++ trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeFilter.cpp 2006-02-12 22:03:07 UTC (rev 10810)
@@ -0,0 +1,399 @@
+//===========================================================================
+//Copyright (C) 2003-2006 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)
+ , mOGMGranulesBuffered(0)
+ , mSegStart(0)
+ , mSegEnd(0)
+ , mSegRate(0)
+
+{
+
+
+}
+
+
+
+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* 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) {
+ //VIDSPEC::: Smaller for audio and text
+ 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 OGMDecodeFilter::NewSegment(REFERENCE_TIME inStartTime, REFERENCE_TIME inStopTime, double inRate)
+{
+ mSegStart = inStartTime;
+ mSegEnd = inStopTime;
+ mSegRate = inRate;
+ return CTransformFilter::NewSegment(inStartTime, inStopTime, inRate);
+}
+HRESULT OGMDecodeFilter::GetMediaType(int inPosition, CMediaType* outMediaType)
+{
+
+ if (inPosition < 0) {
+ return E_INVALIDARG;
+ }
+
+ if ((inPosition == 0) && (mInputPin != NULL) && (mInputPin->IsConnected())) {
+
+ //VIDSPEC:::This needs cases for audio and text
+ switch(mInputPin->getOGMMediaType()) {
+ case OGMDecodeInputPin::OGM_VIDEO_TYPE:
+ {
+ VIDEOINFOHEADER* locVideoFormat = (VIDEOINFOHEADER*)outMediaType->AllocFormatBuffer(sizeof(VIDEOINFOHEADER));
+ *locVideoFormat = *mInputPin->getVideoFormatBlock();
+ //FillMediaType(outMediaType, locVideoFormat->bmiHeader.biSizeImage);
+ outMediaType->majortype = MEDIATYPE_Video;
+ outMediaType->subtype = (GUID)(FOURCCMap(locVideoFormat->bmiHeader.biCompression));;
+ outMediaType->formattype = FORMAT_VideoInfo;
+ //TODO:::Handle temproal compression and variable size field
+
+ }
+ break;
+
+ case OGMDecodeInputPin::OGM_AUDIO_TYPE:
+ {
+ WAVEFORMATEX* locAudioFormat = (WAVEFORMATEX*)outMediaType->AllocFormatBuffer(sizeof(WAVEFORMATEX));
+ *locAudioFormat = *mInputPin->getAudioFormatBlock();
+ outMediaType->majortype = MEDIATYPE_Audio;
+ outMediaType->subtype = MEDIASUBTYPE_PCM;
+ outMediaType->subtype.Data1 = locAudioFormat->wFormatTag;
+ outMediaType->formattype = FORMAT_WaveFormatEx;
+ }
+
+ break;
+ case OGMDecodeInputPin::OGM_TEXT_TYPE:
+
+ outMediaType->majortype = MEDIATYPE_Text;
+ outMediaType->subtype = MEDIASUBTYPE_None;
+ outMediaType->formattype = FORMAT_None;
+ break;
+
+ default:
+ return E_FAIL;
+
+ }
+
+
+ return S_OK;
+ } else {
+ return VFW_S_NO_MORE_ITEMS;
+ }
+
+
+}
+
+HRESULT OGMDecodeFilter::Receive(IMediaSample* inSample)
+{
+ //VIDSPEC:::
+ BYTE* locInBuff = NULL;
+ HRESULT locHR = inSample->GetPointer(&locInBuff);
+
+ if (locHR == S_OK) {
+ //Get the time input
+ REFERENCE_TIME locStart = -1;
+ REFERENCE_TIME locEnd = -1;
+ inSample->GetTime(&locStart, &locEnd);
+
+ //Do nothing if it's a header packet
+ if ((locInBuff[0] & 1) != 0) {
+ return S_OK;
+ }
+
+ //Get the sample length and setup some buffers
+ unsigned long locLength = inSample->GetActualDataLength();
+ unsigned char* locBuff = new unsigned char[locLength];
+ sSimplePack locPack;
+ memcpy((void*)locBuff, (const void*)locInBuff, locLength);
+ locPack.mBuff = locBuff;
+ locPack.mLength = locLength;
+
+
+ //Find out how many bytes of the header are the length field
+ unsigned long locNumLenBytes = locInBuff[0];
+ const unsigned char LEN_MASK = 0xC2; //11000010
+ locNumLenBytes &= LEN_MASK;
+ locNumLenBytes = (locNumLenBytes >> 6) | ((locNumLenBytes&2) << 1);
+
+ //Find out how many frames this will gnerate
+ //locPackTime represents different things for text, audio and video
+ //
+ //video - number of frames duration (can be more than 1 frame generated from a packet)
+ //audio - number of samples generated by this packet
+ //text - duration of text in 1ms units (ie 1000 = 1sec)
+ __int64 locPackTime = 0;
+ if (locNumLenBytes != 0) {
+ for (int i = 0; i < locNumLenBytes; i++) {
+ locPackTime |= ((__int64)locInBuff[1+i] << (i * 8));
+ }
+ } else {
+ locPackTime = 1;
+ }
+
+ //Buffer up the packet -
+ mOGMGranulesBuffered += locPackTime; //VS:::
+ locPack.mDuration = locPackTime; //VS:::
+ 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; //VS:::
+ __int64 locNumBuffered = mPacketBuffer.size();
+
+ locGlobalEnd = mInputPin->convertGranuleToTime(locEnd); //locEnd * locFrameDuration; //VS:::
+ locGlobalStart = locGlobalEnd - (mInputPin->convertGranuleToTime(mOGMGranulesBuffered));//locGlobalEnd - (mOGMGranulesBuffered * locFrameDuration); //VS:::
+
+ __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 + (mInputPin->convertGranuleToTime(mPacketBuffer[i].mDuration));//locUptoStart + (mPacketBuffer[i].mDuration * locFrameDuration); //VS:::
+
+ 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;
+ }
+
+ } else {
+ return locHR;
+ }
+}
+
+void OGMDecodeFilter::deleteBufferedPackets()
+{
+ for (size_t i = 0; i < mPacketBuffer.size(); i++) {
+ delete[] mPacketBuffer[i].mBuff;
+ }
+ mPacketBuffer.clear();
+ mOGMGranulesBuffered = 0;
+}
+HRESULT OGMDecodeFilter::Transform(IMediaSample* inInputSample, IMediaSample* inOutputSample)
+{
+
+ //BYTE* locInBuff = NULL;
+ //HRESULT locHR = inInputSample->GetPointer(&locInBuff);
+
+ //if (locHR == S_OK) {
+ // REFERENCE_TIME locStart = -1;
+ // REFERENCE_TIME locEnd = -1;
+ // inInputSample->GetTime(&locStart, &locEnd);
+ // unsigned long locLength = inInputSample->GetActualDataLength();
+ // unsigned char* locBuff = new unsigned char[locLength];
+ // sSimplePack locPack;
+ // memcpy((void*)locBuff, (const void*)locInBuff, locLength);
+ // locPack.mBuff = locBuff;
+ // locPack.mLength = locLength;
+ // mPacketBuffer.push_back(sSimplePack);
+
+
+
+ //
+
+ //}
+
+
+ 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;
+ }
+ //VIDSPEC::: Change the name dynamically if audio or text
+ 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: trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeFilter.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeFilter.h 2006-02-12 22:01:22 UTC (rev 10809)
+++ trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeFilter.h 2006-02-12 22:03:07 UTC (rev 10810)
@@ -0,0 +1,96 @@
+//===========================================================================
+//Copyright (C) 2003-2006 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 HRESULT Receive(IMediaSample* inSample);
+
+ virtual HRESULT NewSegment(REFERENCE_TIME inStartTime, REFERENCE_TIME inStopTime, double inRate);
+
+ virtual CBasePin* GetPin(int inPinNo);
+
+
+protected:
+ void deleteBufferedPackets();
+
+ OGMDecodeInputPin* mInputPin;
+ CTransformOutputPin* mOutputPin;
+ struct sSimplePack {
+ unsigned char* mBuff;
+ unsigned long mLength;
+ unsigned long mDuration;
+ unsigned long mHeaderSize;
+ bool mIsKeyframe;
+
+ };
+
+
+
+ unsigned long mOGMGranulesBuffered;
+
+ __int64 mSegStart;
+ __int64 mSegEnd;
+ double mSegRate;
+
+ vector<sSimplePack> mPacketBuffer;
+};
Added: trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeInputPin.cpp 2006-02-12 22:01:22 UTC (rev 10809)
+++ trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeInputPin.cpp 2006-02-12 22:03:07 UTC (rev 10810)
@@ -0,0 +1,354 @@
+//===========================================================================
+//Copyright (C) 2003-2006 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)
+ , mAudioFormatBlock(NULL)
+ , mSetupState(VSS_SEEN_NOTHING)
+ , mOGMMediaType(OGM_UNKNOWN_TYPE)
+ , mGranuleRateNumerator(1)
+ , mGranuleRateDenominator(0)
+{
+
+}
+
+OGMDecodeInputPin::~OGMDecodeInputPin(void)
+{
+
+}
+
+STDMETHODIMP OGMDecodeInputPin::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 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)
+{
+ //VIDSPEC::: Use the audio and text ident fields
+ if ( (inMediaType->majortype == MEDIATYPE_OggPacketStream)
+ && (inMediaType->subtype == MEDIASUBTYPE_None)
+ && (inMediaType->formattype == FORMAT_OggIdentHeader)) {
+ //TODO::: The header size is not fixed. This is just a minimum size.
+ // need to look in the size field to determine the actual
+ // size of the header as some codecs can include extra data
+ // after the ogm headers
+ //PARTIAL RESOLUTION::: Now a minimum size but should still check for
+ // validity by checking the size field
+ 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;
+ } else if (strncmp((char*)inMediaType->pbFormat, "\001audio\000\000\000", 9) == 0) {
+ return S_OK;
+ } else if (strncmp((char*)inMediaType->pbFormat, "\001text\000\000\000\000", 9) == 0) {
+ 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)
+{
+ switch (mOGMMediaType) {
+ case OGM_VIDEO_TYPE:
+ return inGranule * mVideoFormatBlock->AvgTimePerFrame;
+ case OGM_AUDIO_TYPE:
+ return (inGranule * UNITS) / mAudioFormatBlock->nSamplesPerSec;
+ case OGM_TEXT_TYPE:
+ return (inGranule * UNITS * mGranuleRateDenominator) / mGranuleRateNumerator;
+ default:
+ return 0;
+ };
+
+}
+
+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:
+ //VIDSPEC::: Also accept the audio and text headers
+ if (strncmp((char*)inCodecHeaderPacket->packetData(), "\001video\000\000\000", 9) == 0) {
+ mOGMMediaType = OGM_VIDEO_TYPE;
+ handleHeaderPacket(inCodecHeaderPacket);
+ mSetupState = VSS_SEEN_BOS;
+ return IOggDecoder::AHR_MORE_HEADERS_TO_COME;
+ } else if (strncmp((char*)inCodecHeaderPacket->packetData(), "\001audio\000\000\000", 9) == 0) {
+ //TODO::: Verify that there are secondary comment headers for audio and text
+ mOGMMediaType = OGM_AUDIO_TYPE;
+ handleHeaderPacket(inCodecHeaderPacket);
+ mSetupState = VSS_SEEN_BOS;
+ return IOggDecoder::AHR_MORE_HEADERS_TO_COME;
+ } else if (strncmp((char*)inCodecHeaderPacket->packetData(), "\001text\000\000\000\000", 9) == 0) {
+ mOGMMediaType = OGM_TEXT_TYPE;
+ handleHeaderPacket(inCodecHeaderPacket);
+ mSetupState = VSS_SEEN_BOS;
+ return IOggDecoder::AHR_MORE_HEADERS_TO_COME;
+ } else {
+ mOGMMediaType = OGM_UNKNOWN_TYPE;
+ }
+ mSetupState = VSS_ERROR;
+ return IOggDecoder::AHR_INVALID_HEADER;
+
+ case VSS_SEEN_BOS:
+ if (inCodecHeaderPacket->packetData()[0] == 0x03) {
+ 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 OGMDecodeInputPin::handleHeaderPacket(OggPacket* inHeaderPack)
+{
+ switch(mOGMMediaType) {
+ case OGM_VIDEO_TYPE:
+ return handleVideoHeaderPacket(inHeaderPack);
+ case OGM_AUDIO_TYPE:
+ return handleAudioHeaderPacket(inHeaderPack);
+
+ case OGM_TEXT_TYPE:
+ return handleTextHeaderPacket(inHeaderPack);
+ default:
+ return false;
+
+ };
+}
+
+bool OGMDecodeInputPin::handleTextHeaderPacket(OggPacket* inHeaderPack)
+{
+ mGranuleRateNumerator = iLE_Math::CharArrToInt64(inHeaderPack->packetData() + 17);
+ mGranuleRateDenominator = iLE_Math::CharArrToInt64(inHeaderPack->packetData() + 25);
+
+ //TODO:::
+ return true;
+}
+bool OGMDecodeInputPin::handleAudioHeaderPacket(OggPacket* inHeaderPack)
+{
+ delete mAudioFormatBlock;
+
+ //TODO::: This will cause a problem with extra header information appended.
+ // need to change to byte* and cast upon use
+ mAudioFormatBlock = new WAVEFORMATEX;
+
+ //FORMAT OF AUDIO HEADER IN OGM BOS
+ //-----------------------------------------
+
+ //0 - 8 = STRING Stream Type (char[8] is NULL) \001audio
+ //9 - 12 = STRING Sub Type (format code)
+ //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 - 46 = INT16 Channel count
+ //47 - 48 = INT16 Block Align
+ //49 - 52 = INT32 Avg Bytes per Second
+
+ mAudioFormatBlock->nAvgBytesPerSec = iLE_Math::charArrToULong(inHeaderPack->packetData() + 49);
+ mAudioFormatBlock->nChannels = iLE_Math::charArrToUShort(inHeaderPack->packetData() + 45);
+ mAudioFormatBlock->nBlockAlign = iLE_Math::charArrToUShort(inHeaderPack->packetData() + 47);
+
+ //TODO::: Check if this needs to be div/mul by the time per unit field
+ mAudioFormatBlock->nSamplesPerSec = iLE_Math::CharArrToInt64(inHeaderPack->packetData() + 25);
+
+ mAudioFormatBlock->wBitsPerSample = iLE_Math::charArrToUShort(inHeaderPack->packetData() + 41);
+
+ //TODO::: Extra header size
+ mAudioFormatBlock->cbSize = sizeof(WAVEFORMATEX);
+
+
+ unsigned short locFormatCode = 0;
+ unsigned char locHexDigitValue = 0;
+ for (int i = 0; i < 4; i++) {
+ locFormatCode <<= 4;
+ locHexDigitValue = inHeaderPack->packetData()[9 + i];
+
+ if ((locHexDigitValue >= '0') && (locHexDigitValue <= '9')) {
+ locHexDigitValue -= '0';
+ } else if ((locHexDigitValue >= 'a') && (locHexDigitValue <= 'f')) {
+ locHexDigitValue -= 'a';
+ locHexDigitValue += 10;
+ } else if ((locHexDigitValue >= 'A') && (locHexDigitValue <= 'F')) {
+ locHexDigitValue -= 'A';
+ locHexDigitValue += 10;
+ } else {
+ //This is a fatal error.
+ throw 0;
+ }
+
+ locFormatCode += locHexDigitValue;
+ }
+
+ mAudioFormatBlock->wFormatTag = locFormatCode;
+
+ return true;
+
+}
+bool OGMDecodeInputPin::handleVideoHeaderPacket(OggPacket* inHeaderPack)
+{
+ //VIDSPEC::: This whole thing is specific to video
+ delete mVideoFormatBlock;
+ mVideoFormatBlock = new VIDEOINFOHEADER;
+
+ //FORMAT OF VIDEO HEADER IN OGM BOS
+ //-----------------------------------------
+
+ //0 - 8 = STRING Stream Type (char[8] is NULL) \001video
+ //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()
+{
+ //TODO::: These should also include the information about the fourcc or format code
+ return "OGM";
+}
+string OGMDecodeInputPin::getCodecIdentString()
+{
+ //TODO:::
+ return "OGM";
+}
+
Added: trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeInputPin.h 2006-02-12 22:01:22 UTC (rev 10809)
+++ trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeInputPin.h 2006-02-12 22:03:07 UTC (rev 10810)
@@ -0,0 +1,98 @@
+//===========================================================================
+//Copyright (C) 2003-2006 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"
+#include "IOggDecoder.h"
+
+class OGMDecodeFilter;
+
+class OGMDecodeInputPin
+ : public CTransformInputPin
+ , public IOggDecoder
+{
+public:
+ DECLARE_IUNKNOWN
+ STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
+
+ 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();
+
+ enum eOGMMediaType {
+ OGM_VIDEO_TYPE,
+ OGM_AUDIO_TYPE,
+ OGM_TEXT_TYPE,
+ OGM_UNKNOWN_TYPE
+ };
+
+ eOGMMediaType getOGMMediaType() { return mOGMMediaType; }
+ VIDEOINFOHEADER* getVideoFormatBlock() { return mVideoFormatBlock; }
+ WAVEFORMATEX* getAudioFormatBlock() { return mAudioFormatBlock; }
+protected:
+ enum eOGMSetupState {
+ VSS_SEEN_NOTHING,
+ VSS_SEEN_BOS,
+ VSS_SEEN_COMMENT,
+ VSS_ALL_HEADERS_SEEN,
+ VSS_ERROR
+ };
+
+ eOGMMediaType mOGMMediaType;
+
+ eOGMSetupState mSetupState;
+ bool handleHeaderPacket(OggPacket* inHeaderPack);
+ bool handleAudioHeaderPacket(OggPacket* inHeaderPack);
+ bool handleVideoHeaderPacket(OggPacket* inHeaderPack);
+ bool handleTextHeaderPacket(OggPacket* inHeaderPack);
+
+ VIDEOINFOHEADER* mVideoFormatBlock;
+ WAVEFORMATEX* mAudioFormatBlock;
+ __int64 mGranuleRateNumerator;
+ __int64 mGranuleRateDenominator;
+
+ static const unsigned long OGM_IDENT_HEADER_SIZE = 57;
+ static const unsigned long OGM_NUM_BUFFERS = 50;
+ static const unsigned long OGM_BUFFER_SIZE = 1024*512*3;;
+
+};
Added: trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeOutputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeOutputPin.cpp 2006-02-12 22:01:22 UTC (rev 10809)
+++ trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeOutputPin.cpp 2006-02-12 22:03:07 UTC (rev 10810)
@@ -0,0 +1,10 @@
+#include "StdAfx.h"
+#include ".\ogmdecodeoutputpin.h"
+
+OGMDecodeOutputPin::OGMDecodeOutputPin(void)
+{
+}
+
+OGMDecodeOutputPin::~OGMDecodeOutputPin(void)
+{
+}
Added: trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeOutputPin.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeOutputPin.h 2006-02-12 22:01:22 UTC (rev 10809)
+++ trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/OGMDecodeOutputPin.h 2006-02-12 22:03:07 UTC (rev 10810)
@@ -0,0 +1,8 @@
+#pragma once
+
+class OGMDecodeOutputPin
+{
+public:
+ OGMDecodeOutputPin(void);
+ ~OGMDecodeOutputPin(void);
+};
Added: trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/ReadMe.txt
===================================================================
--- trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/ReadMe.txt 2006-02-12 22:01:22 UTC (rev 10809)
+++ trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/ReadMe.txt 2006-02-12 22:03:07 UTC (rev 10810)
@@ -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: trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.cpp 2006-02-12 22:01:22 UTC (rev 10809)
+++ trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.cpp 2006-02-12 22:03:07 UTC (rev 10810)
@@ -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: trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.h 2006-02-12 22:01:22 UTC (rev 10809)
+++ trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.h 2006-02-12 22:03:07 UTC (rev 10810)
@@ -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: trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.vcproj
===================================================================
--- trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.vcproj 2006-02-12 22:01:22 UTC (rev 10809)
+++ trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/dsfOGMDecoder.vcproj 2006-02-12 22:03:07 UTC (rev 10810)
@@ -0,0 +1,189 @@
+<?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=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";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="4"
+ 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=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses\Debug""
+ ModuleDefinitionFile="ogmdecoder.def"
+ 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=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses";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="2"
+ UsePrecompiledHeader="3"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"
+ CallingConvention="2"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Strmbase.lib Winmm.lib Strmiids.lib Quartz.lib"
+ OutputFile="$(OutDir)/dsfOGMDecoder.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""C:\DXSDK\Samples\C++\DirectShow\BaseClasses\Release""
+ ModuleDefinitionFile="ogmdecoder.def"
+ 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=".\ogmdecoder.def">
+ </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: trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoder.def
===================================================================
--- trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoder.def 2006-02-12 22:01:22 UTC (rev 10809)
+++ trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoder.def 2006-02-12 22:03:07 UTC (rev 10810)
@@ -0,0 +1,7 @@
+LIBRARY dsfOGMDecoder
+EXPORTS
+ DllMain PRIVATE
+ DllGetClassObject PRIVATE
+ DllCanUnloadNow PRIVATE
+ DllRegisterServer PRIVATE
+ DllUnregisterServer PRIVATE
\ No newline at end of file
Added: trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoderdllstuff.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoderdllstuff.cpp 2006-02-12 22:01:22 UTC (rev 10809)
+++ trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoderdllstuff.cpp 2006-02-12 22:03:07 UTC (rev 10810)
@@ -0,0 +1,99 @@
+//===========================================================================
+//Copyright (C) 2003-2006 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: trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoderdllstuff.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoderdllstuff.h 2006-02-12 22:01:22 UTC (rev 10809)
+++ trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/ogmdecoderdllstuff.h 2006-02-12 22:03:07 UTC (rev 10810)
@@ -0,0 +1,129 @@
+//===========================================================================
+//Copyright (C) 2003-2006 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 OGMDecodeOutputTypes = {
+// &MEDIATYPE_None,
+// &MEDIASUBTYPE_None
+//};
+
+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: trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/stdafx.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/stdafx.cpp 2006-02-12 22:01:22 UTC (rev 10809)
+++ trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/stdafx.cpp 2006-02-12 22:03:07 UTC (rev 10810)
@@ -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: trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/stdafx.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/stdafx.h 2006-02-12 22:01:22 UTC (rev 10809)
+++ trunk/oggdsf/src/lib/codecs/ogm/filters/dsfOGMDecoder/stdafx.h 2006-02-12 22:03:07 UTC (rev 10810)
@@ -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