[xiph-commits] r10440 - in branches/oggdsf_new_demux: sln/oggdsf_all src/lib/codecs/cmml/dsfCMMLDecoder src/lib/codecs/cmml/dsfCMMLRawSource src/lib/core/directshow/dsfOggMux

illiminable at svn.xiph.org illiminable at svn.xiph.org
Fri Nov 25 07:08:55 PST 2005


Author: illiminable
Date: 2005-11-25 07:08:40 -0800 (Fri, 25 Nov 2005)
New Revision: 10440

Modified:
   branches/oggdsf_new_demux/sln/oggdsf_all/oggdsf_all.sln
   branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeFilter.cpp
   branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeFilter.h
   branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeInputPin.cpp
   branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeInputPin.h
   branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/cmmldecoderdllstuff.h
   branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/dsfCMMLDecoder.vcproj
   branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLRawSource/cmmlrawsourcedllstuff.h
   branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggMux/oggmuxdllstuff.h
Log:
* CMML Decoder converted

Modified: branches/oggdsf_new_demux/sln/oggdsf_all/oggdsf_all.sln
===================================================================
--- branches/oggdsf_new_demux/sln/oggdsf_all/oggdsf_all.sln	2005-11-25 14:57:09 UTC (rev 10439)
+++ branches/oggdsf_new_demux/sln/oggdsf_all/oggdsf_all.sln	2005-11-25 15:08:40 UTC (rev 10440)
@@ -864,6 +864,7 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsfCMMLDecoder", "..\..\src\lib\codecs\cmml\dsfCMMLDecoder\dsfCMMLDecoder.vcproj", "{6B269BA6-6A18-41EF-A82C-03B6B5D4BCA7}"
 	ProjectSection(ProjectDependencies) = postProject
+		{223ACC19-608E-4E1B-A054-067F0CACB272} = {223ACC19-608E-4E1B-A054-067F0CACB272}
 		{4CBC0173-27E6-4218-AE06-5EFDCA7B2547} = {4CBC0173-27E6-4218-AE06-5EFDCA7B2547}
 		{899EB7AD-26BF-4495-9BE5-EADECCC288B2} = {899EB7AD-26BF-4495-9BE5-EADECCC288B2}
 		{AD38DCC6-B431-4B32-8569-74F3376EF2DA} = {AD38DCC6-B431-4B32-8569-74F3376EF2DA}

Modified: branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeFilter.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeFilter.cpp	2005-11-25 14:57:09 UTC (rev 10439)
+++ branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeFilter.cpp	2005-11-25 15:08:40 UTC (rev 10440)
@@ -60,6 +60,7 @@
 	,	mSeenHead(false)
 	,	mHeadTag(NULL)
 	,	mCMMLCallbacks(NULL)
+	,	mInputPin(NULL)
 {
 	//debugLog.open("G:\\logs\\cmml_decode.logs", ios_base::out);
 		mCMMLParser = new CMMLParser;
@@ -94,31 +95,71 @@
 	return CTransformFilter::NonDelegatingQueryInterface(riid, ppv);
 }
 
-HRESULT CMMLDecodeFilter::CheckInputType(const CMediaType* inInputMediaType) {
-	if (	(inInputMediaType->majortype == MEDIATYPE_Text)	&&
-			(inInputMediaType->subtype == MEDIASUBTYPE_CMML) &&
-			(inInputMediaType->formattype == FORMAT_CMML) ){
+HRESULT CMMLDecodeFilter::CheckInputType(const CMediaType* inInputMediaType) 
+{
+	return mInputPin->CheckMediaType(inInputMediaType);
+	//if (	(inInputMediaType->majortype == MEDIATYPE_OggPacketStream)	&&
+	//		(inInputMediaType->subtype == MEDIASUBTYPE_None) &&
+	//		(inInputMediaType->formattype == FORMAT_OggIdentHeader) ){
 
-		//debugLog<<"Input Type Accepted"<<endl;
-		return S_OK;
-	} else {
-		return VFW_E_TYPE_NOT_ACCEPTED;
-	}
+	//	//debugLog<<"Input Type Accepted"<<endl;
+	//	return S_OK;
+	//} else {
+	//	return VFW_E_TYPE_NOT_ACCEPTED;
+	//}
 }
 HRESULT CMMLDecodeFilter::CheckTransform(const CMediaType* inInputMediaType, const CMediaType* inOutputMediaType) {
-	if (	(inInputMediaType->majortype == MEDIATYPE_Text)	&&
-			(inInputMediaType->subtype == MEDIASUBTYPE_CMML) &&
-			(inInputMediaType->formattype == FORMAT_CMML) &&
-			(inOutputMediaType->majortype == MEDIATYPE_Text) &&
-			(inOutputMediaType->subtype == MEDIASUBTYPE_SubtitleVMR9) ){
+	//if (	(inInputMediaType->majortype == MEDIATYPE_Text)	&&
+	//		(inInputMediaType->subtype == MEDIASUBTYPE_CMML) &&
+	//		(inInputMediaType->formattype == FORMAT_CMML) &&
+	//		(inOutputMediaType->majortype == MEDIATYPE_Text) &&
+	//		(inOutputMediaType->subtype == MEDIASUBTYPE_SubtitleVMR9) ){
 
-		//debugLog << "Transform Accepted"<<endl;
+	//	//debugLog << "Transform Accepted"<<endl;
 		return S_OK;
-	} else {
-		return VFW_E_TYPE_NOT_ACCEPTED;
-	}
+//	} else {
+//		return VFW_E_TYPE_NOT_ACCEPTED;
+//	}
 	
 }
+
+CBasePin* CMMLDecodeFilter::GetPin(int inPinNo)
+{
+
+    HRESULT locHR = S_OK;
+
+    // Create an input pin if necessary
+
+    if (m_pInput == NULL) {
+
+        m_pInput = new CMMLDecodeInputPin(this, &locHR);		//Deleted in base destructor
+
+        
+        if (m_pInput == NULL) {
+            return NULL;
+        }
+
+		mInputPin = (CMMLDecodeInputPin*)m_pInput;
+        m_pOutput = new CTransformOutputPin(NAME("CMML Out"), this, &locHR, L"CMML 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;
+    }
+
+}
 HRESULT CMMLDecodeFilter::DecideBufferSize(IMemAllocator* inAllocator, ALLOCATOR_PROPERTIES* inPropertyRequest) {
 	//FIX::: Abstract this out properly	
 

Modified: branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeFilter.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeFilter.h	2005-11-25 14:57:09 UTC (rev 10439)
+++ branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeFilter.h	2005-11-25 15:08:40 UTC (rev 10440)
@@ -34,6 +34,7 @@
 
 #pragma once
 #include "cmmldecoderdllstuff.h"
+#include "CMMLDecodeInputPin.h"
 #include <string>
 #include <fstream>
 #include <libilliCore/StringHelper.h>
@@ -42,6 +43,8 @@
 #include <libCMMLTags/libCMMLTags.h>
 #include "ICMMLAppControl.h"
 using namespace std;
+
+class OGMDecodeInputPin;
 class CMMLDecodeFilter
 	:	public CTransformFilter
 	,	public ICMMLAppControl
@@ -61,6 +64,8 @@
 	HRESULT GetMediaType(int inPosition, CMediaType* outMediaType);
 	HRESULT Transform(IMediaSample* inSample, IMediaSample* outSample);
 
+	CBasePin* CMMLDecodeFilter::GetPin(int inPinNo);
+
 	//Implement ICMMLAppControl
 	virtual STDMETHODIMP_(bool) setCallbacks(ICMMLCallbacks* inCallbacks);
 	virtual STDMETHODIMP_(ICMMLCallbacks*) getCallbacks();
@@ -71,6 +76,8 @@
 	C_HeadTag* mHeadTag;
 	ICMMLCallbacks* mCMMLCallbacks;
 
+	CMMLDecodeInputPin* mInputPin;
+
 	//fstream debugLog;
 	
 

Modified: branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeInputPin.cpp
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeInputPin.cpp	2005-11-25 14:57:09 UTC (rev 10439)
+++ branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeInputPin.cpp	2005-11-25 15:08:40 UTC (rev 10440)
@@ -1,10 +1,175 @@
-#include "StdAfx.h"
-#include ".\cmmldecodeinputpin.h"
+//===========================================================================
+//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.
+//===========================================================================
 
-CMMLDecodeInputPin::CMMLDecodeInputPin(void)
+#include "stdafx.h"
+#include "CMMLDecodeInputPin.h"
+#include "CMMLDecodeFilter.h"
+
+CMMLDecodeInputPin::CMMLDecodeInputPin(CMMLDecodeFilter* inParentFilter, HRESULT* outHR)
+	:	CTransformInputPin(NAME("CMMLDecodeInputPin"), inParentFilter, outHR, L"CMML In")
+	,	mSetupState(VSS_SEEN_NOTHING)
+	,	mCMMLFormatBlock(NULL)
+	,	mCMMLHeadPacket(NULL)
 {
+
 }
 
 CMMLDecodeInputPin::~CMMLDecodeInputPin(void)
 {
+	delete mCMMLFormatBlock;
+	delete mCMMLHeadPacket;
 }
+
+STDMETHODIMP CMMLDecodeInputPin::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 CMMLDecodeInputPin::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 CMMLDecodeInputPin::CheckMediaType(const CMediaType *inMediaType)
+{
+	if (		(inMediaType->majortype == MEDIATYPE_OggPacketStream)
+			&&	(inMediaType->subtype == MEDIASUBTYPE_None)
+			&&	(inMediaType->formattype == FORMAT_OggIdentHeader)) {
+		if (inMediaType->cbFormat == CMML_IDENT_HEADER_SIZE) {
+			if (strncmp((char*)inMediaType->pbFormat, "CMML\000\000\000\000", 8) == 0) {
+				//TODO::: Possibly verify version
+				return S_OK;
+			}
+		}
+	}
+	return S_FALSE;
+	
+}
+HRESULT CMMLDecodeInputPin::GetAllocatorRequirements(ALLOCATOR_PROPERTIES *outRequestedProps)
+{
+	outRequestedProps->cbBuffer = CMML_BUFFER_SIZE;
+	outRequestedProps->cBuffers = CMML_NUM_BUFFERS;
+	outRequestedProps->cbAlign = 1;
+	outRequestedProps->cbPrefix = 0;
+
+	return S_OK;
+}
+LOOG_INT64 CMMLDecodeInputPin::convertGranuleToTime(LOOG_INT64 inGranule)
+{
+	//return inGranule * mVideoFormatBlock->AvgTimePerFrame;
+	return ((inGranule * mCMMLFormatBlock->granuleDenominator) / mCMMLFormatBlock->granuleNumerator);
+}
+
+LOOG_INT64 CMMLDecodeInputPin::mustSeekBefore(LOOG_INT64 inGranule)
+{
+	//TODO::: Get adjustment from block size info... for now, it doesn't matter if no preroll
+	return inGranule;
+}
+IOggDecoder::eAcceptHeaderResult CMMLDecodeInputPin::showHeaderPacket(OggPacket* inCodecHeaderPacket)
+{
+	switch (mSetupState) {
+		case VSS_SEEN_NOTHING:
+			if (strncmp((char*)inCodecHeaderPacket->packetData(), "CMML\000\000\000\000", 0) == 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:
+			if (strncmp((char*)inCodecHeaderPacket->packetData(), "<?xml", 5) == 0) {
+				mSetupState = VSS_SEEN_XML_HEADER;
+				
+				return IOggDecoder::AHR_MORE_HEADERS_TO_COME;
+			}
+			return IOggDecoder::AHR_INVALID_HEADER;
+		
+		case VSS_SEEN_XML_HEADER:
+			if (strncmp((char*)inCodecHeaderPacket->packetData(), "<head", 5) == 0) {
+				mSetupState = VSS_ALL_HEADERS_SEEN;
+				//handleHeadPacket(inCodecHeaderPacket->clone())
+				mCMMLHeadPacket = inCodecHeaderPacket->clone();
+				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 CMMLDecodeInputPin::handleHeaderPacket(OggPacket* inHeaderPack)
+{
+	delete mCMMLFormatBlock;
+	mCMMLFormatBlock = new sCMMLFormatBlock;
+	mCMMLFormatBlock->granuleNumerator = iLE_Math::CharArrToInt64(inHeaderPack->packetData() + 12);
+	mCMMLFormatBlock->granuleDenominator = iLE_Math::CharArrToInt64(inHeaderPack->packetData() + 16);
+	mCMMLFormatBlock->granuleSplitBits = inHeaderPack->packetData()[28];
+	return true;
+	
+
+
+
+}
+string CMMLDecodeInputPin::getCodecShortName()
+{
+	return "CMML";
+}
+string CMMLDecodeInputPin::getCodecIdentString()
+{
+	//TODO:::
+	return "CMML";
+}
+

Modified: branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeInputPin.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeInputPin.h	2005-11-25 14:57:09 UTC (rev 10439)
+++ branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/CMMLDecodeInputPin.h	2005-11-25 15:08:40 UTC (rev 10440)
@@ -1,8 +1,83 @@
+//===========================================================================
+//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 "cmmldecoderdllstuff.h"
+#include "IOggDecoder.h"
+
+class CMMLDecodeFilter;
+
 class CMMLDecodeInputPin
+	:	public CTransformInputPin
+	,	public IOggDecoder
 {
 public:
-	CMMLDecodeInputPin(void);
-	~CMMLDecodeInputPin(void);
+	DECLARE_IUNKNOWN
+	STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
+
+	CMMLDecodeInputPin(CMMLDecodeFilter* inParent, HRESULT* outHR);
+	virtual ~CMMLDecodeInputPin(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();
+
+	sCMMLFormatBlock* getCMMLFormatBlock()		{		return mCMMLFormatBlock;	}
+protected:
+	enum eOGMSetupState {
+		VSS_SEEN_NOTHING,
+		VSS_SEEN_BOS,
+		VSS_SEEN_XML_HEADER,
+		VSS_ALL_HEADERS_SEEN,
+		VSS_ERROR
+	};
+
+	eOGMSetupState mSetupState;
+	bool handleHeaderPacket(OggPacket* inHeaderPack);
+
+	sCMMLFormatBlock* mCMMLFormatBlock;
+
+	OggPacket* mCMMLHeadPacket;
+
+	static const unsigned long CMML_IDENT_HEADER_SIZE = 29;
+	static const unsigned long CMML_NUM_BUFFERS = 15;
+	static const unsigned long CMML_BUFFER_SIZE = 1024*256;
+
 };

Modified: branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/cmmldecoderdllstuff.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/cmmldecoderdllstuff.h	2005-11-25 14:57:09 UTC (rev 10439)
+++ branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/cmmldecoderdllstuff.h	2005-11-25 15:08:40 UTC (rev 10440)
@@ -42,19 +42,31 @@
 DEFINE_GUID(MEDIASUBTYPE_SubtitleVMR9, 
 0x966d76b4, 0x7d2f, 0x4f01, 0xb8, 0x40, 0x94, 0xe4, 0x25, 0xd2, 0x21, 0x4f);
 
-// {53696C76-6961-40b2-B136-436F6E726164}
-DEFINE_GUID(FORMAT_CMML, 
-0x53696c76, 0x6961, 0x40b2, 0xb1, 0x36, 0x43, 0x6f, 0x6e, 0x72, 0x61, 0x64);
-
-
-// {5A656E74-6172-6F26-B79C-D6416E647282}
-DEFINE_GUID(MEDIASUBTYPE_CMML, 
-0x5a656e74, 0x6172, 0x6f26, 0xb7, 0x9c, 0xd6, 0x41, 0x6e, 0x64, 0x72, 0x82);
-
+//// {53696C76-6961-40b2-B136-436F6E726164}
+//DEFINE_GUID(FORMAT_CMML, 
+//0x53696c76, 0x6961, 0x40b2, 0xb1, 0x36, 0x43, 0x6f, 0x6e, 0x72, 0x61, 0x64);
+//
+//
+//// {5A656E74-6172-6F26-B79C-D6416E647282}
+//DEFINE_GUID(MEDIASUBTYPE_CMML, 
+//0x5a656e74, 0x6172, 0x6f26, 0xb7, 0x9c, 0xd6, 0x41, 0x6e, 0x64, 0x72, 0x82);
+//
 // {BF1121D1-8739-45e1-BCD8-90B828F643AB}
 DEFINE_GUID(CLSID_CMMLDecodeFilter, 
 0xbf1121d1, 0x8739, 0x45e1, 0xbc, 0xd8, 0x90, 0xb8, 0x28, 0xf6, 0x43, 0xab);
 
+// {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);
+
 //This structure defines the type of input we accept on the input pin... Stream/Annodex
 
 const REGPINTYPES CMMLDecodeOutputTypes = {
@@ -63,8 +75,8 @@
 };
 
 const REGPINTYPES CMMLDecodeInputTypes = {
-	&MEDIATYPE_Text,
-	&MEDIASUBTYPE_CMML
+	&MEDIATYPE_OggPacketStream,
+	&MEDIASUBTYPE_None
 };
 const REGFILTERPINS CMMLDecodePinReg[] = {
 	{
@@ -107,4 +119,5 @@
 struct sCMMLFormatBlock {
 	__int64 granuleNumerator;
 	__int64 granuleDenominator;
+	unsigned short granuleSplitBits;
 };

Modified: branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/dsfCMMLDecoder.vcproj
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/dsfCMMLDecoder.vcproj	2005-11-25 14:57:09 UTC (rev 10439)
+++ branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLDecoder/dsfCMMLDecoder.vcproj	2005-11-25 15:08:40 UTC (rev 10440)
@@ -19,7 +19,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..;..;..\..\..\helper"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..;..\..\..\helper;..\..\..\core\directshow\dsfOggDemux2;..\..\..\core\ogg\"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DSFCMMLDECODER_EXPORTS"
 				MinimalRebuild="TRUE"
 				BasicRuntimeChecks="3"
@@ -81,7 +81,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
 				OptimizeForProcessor="2"
-				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..;..;..\..\..\helper"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..;..\..\..\helper;..\..\..\core\directshow\dsfOggDemux2;..\..\..\core\ogg\"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFCMMLDECODER_EXPORTS"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"
@@ -145,7 +145,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
 				OptimizeForProcessor="3"
-				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..;..;..\..\..\helper"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..;..\..\..\helper;..\..\..\core\directshow\dsfOggDemux2;..\..\..\core\ogg\"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFCMMLDECODER_EXPORTS"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"
@@ -210,7 +210,7 @@
 				FavorSizeOrSpeed="1"
 				OmitFramePointers="TRUE"
 				OptimizeForProcessor="3"
-				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..;..;..\..\..\helper"
+				AdditionalIncludeDirectories="&quot;C:\DXSDK\Samples\C++\DirectShow\BaseClasses&quot;;C:\DXSDK\Include;..;..\..\..\helper;..\..\..\core\directshow\dsfOggDemux2;..\..\..\core\ogg\"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DSFCMMLDECODER_EXPORTS"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"
@@ -270,6 +270,9 @@
 				RelativePath="CMMLDecodeFilter.cpp">
 			</File>
 			<File
+				RelativePath=".\CMMLDecodeInputPin.cpp">
+			</File>
+			<File
 				RelativePath="CMMLDecoder.def">
 			</File>
 			<File
@@ -310,6 +313,9 @@
 				RelativePath="CMMLDecodeFilter.h">
 			</File>
 			<File
+				RelativePath=".\CMMLDecodeInputPin.h">
+			</File>
+			<File
 				RelativePath="cmmldecoderdllstuff.h">
 			</File>
 			<File

Modified: branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLRawSource/cmmlrawsourcedllstuff.h
===================================================================
--- branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLRawSource/cmmlrawsourcedllstuff.h	2005-11-25 14:57:09 UTC (rev 10439)
+++ branches/oggdsf_new_demux/src/lib/codecs/cmml/dsfCMMLRawSource/cmmlrawsourcedllstuff.h	2005-11-25 15:08:40 UTC (rev 10440)
@@ -66,4 +66,5 @@
 struct sCMMLFormatBlock {
 	__int64 granuleNumerator;
 	__int64 granuleDenominator;
+	unsigned short granuleSplitBits;
 };

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-25 14:57:09 UTC (rev 10439)
+++ branches/oggdsf_new_demux/src/lib/core/directshow/dsfOggMux/oggmuxdllstuff.h	2005-11-25 15:08:40 UTC (rev 10440)
@@ -245,4 +245,5 @@
 struct sCMMLFormatBlock {
 	__int64 granuleNumerator;
 	__int64 granuleDenominator;
+	unsigned short granuleSplitBits;
 };
\ No newline at end of file



More information about the commits mailing list