⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 csupported.cpp

📁 简单的COM 实际例子 用法3
💻 CPP
字号:
//
// CSupported.cpp
//

#include "stdafx.h"
#include <initguid.h>
#include <streams.h>
#include "CSupported.h"


// {38be3000-dbf4-11d0-860e-00a024cfef6d}
DEFINE_GUID(CLSID_MicrosoftMp3Decoder, 
0x38be3000, 0xdbf4, 0x11d0, 0x86, 0x0e, 0x00, 0xa0, 0x24, 0xcf, 0xef, 0x6d);

// {d51bd5a1-7548-11cf-a520-0080c77ef58a}
DEFINE_GUID(CLSID_MicrosoftWaveParser, 
0xd51bd5a1, 0x7548, 0x11cf, 0xa5, 0x20, 0x00, 0x80, 0xc7, 0x7e, 0xf5, 0x8a);

// {280a3020-86cf-11d1-abe6-00a0c905f375}
DEFINE_GUID(CLSID_MicrosoftAC3Parser, 
0x280a3020, 0x86cf, 0x11d1, 0xab, 0xe6, 0x00, 0xa0, 0xc9, 0x05, 0xf3, 0x75);

// {94297043-bd82-4dfd-b0de-8177739c6d20}
DEFINE_GUID(CLSID_MicrosoftDMOWrapper, 
0x94297043, 0xbd82, 0x4dfd, 0xb0, 0xde, 0x81, 0x77, 0x73, 0x9c, 0x6d, 0x20);

GUID CSupported::sSupportedGUIDs[];
long CSupported::sGUIDCount = 0;
/////////////////////////////////////////////////////////////////
CSupported::CSupported()
{
	long i = 0;
	// Video Renderer and Audio Renderer
	sSupportedGUIDs[i++] = CLSID_VideoRenderer;
	sSupportedGUIDs[i++] = CLSID_DSoundRender;
	// Microsoft AVI codec and miscellaneous utilities
	sSupportedGUIDs[i++] = CLSID_AviSplitter;
	sSupportedGUIDs[i++] = CLSID_AVIDec;
	sSupportedGUIDs[i++] = CLSID_MicrosoftWaveParser;
	sSupportedGUIDs[i++] = CLSID_MicrosoftAC3Parser;
	// DV filters
	sSupportedGUIDs[i++] = CLSID_DVSplitter;
	sSupportedGUIDs[i++] = CLSID_DVVideoCodec;	 
	// Microsoft Mpeg1 codec
	sSupportedGUIDs[i++] = CLSID_MPEG1Splitter;
	sSupportedGUIDs[i++] = CLSID_CMpegAudioCodec;
	sSupportedGUIDs[i++] = CLSID_CMpegVideoCodec;
	sSupportedGUIDs[i++] = CLSID_MicrosoftMp3Decoder;
	// Microsoft Mpeg2 codec
	sSupportedGUIDs[i++] = CLSID_MMSPLITTER;
	sSupportedGUIDs[i++] = CLSID_MPEG2Demultiplexer;

	// This way, we support all DMO codecs. Maybe too arbitrary!
	sSupportedGUIDs[i++] = CLSID_MicrosoftDMOWrapper;
	
	sGUIDCount = i; // total count of CSupported GUIDs
}

CSupported::~CSupported()
{
}

BOOL CSupported::IsGUIDSupported(GUID inGUID)
{
	for (long i = 0; i < sGUIDCount; i++)
	{
		if (sSupportedGUIDs[i] == inGUID)
		{
			return TRUE;
		}
	}
	return FALSE;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -