📄 avipsnrfilteruids.cpp
字号:
////////////////////////////////////////////////////////////////////////
//
// Exported entry points for registration and unregistration
// (in this case they only call through to default implementations).
//
////////////////////////////////////////////////////////////////////////
#include <streams.h>
#include <tchar.h>
#include <stdio.h>
//
#include <initguid.h>
//#include "resource.h"
#include "AviPsnrFilterUIDs.h"
#include "DelegateFilter.h" // for CTTLASFWriter::CreateInstance
//#include "ITTLASFWriterProp.h"
//#include "TTLASFWriterProp.h" // for CTTLASFWriterProp::CreateInstance //add by yyq
// Setup data
const AMOVIESETUP_MEDIATYPE sudMediaCompedTypes = {
&MEDIATYPE_Video,
&MEDIASUBTYPE_NULL
};
const AMOVIESETUP_MEDIATYPE sudMediaSourceTypes = {
&MEDIATYPE_Video,
&MEDIASUBTYPE_NULL
};
/*
const AMOVIESETUP_MEDIATYPE sudPinTypes =
{
&MEDIATYPE_NULL, // Major type
&MEDIASUBTYPE_NULL // Minor type
};
*/
const AMOVIESETUP_PIN sudPins[] =
{
{
L"CompressedInput", // Pin string name
FALSE, // Is it rendered
FALSE, // Is it an output
FALSE, // Allowed none
FALSE, // Likewise many
&CLSID_NULL, // Connects to filter
L"CompedOutput", // Connects to pin
1, // Number of types
&sudMediaCompedTypes // Pin information
},
{
L"SourceInput", // Pin string name
FALSE, // Is it rendered
FALSE, // Is it an output
FALSE, // Allowed none
FALSE, // Likewise many
&CLSID_NULL, // Connects to filter
L"VedioOutput", // Connects to pin
1, // Number of types
&sudMediaSourceTypes // Pin information
}
};
const AMOVIESETUP_FILTER sudAVIPSNRFilter =
{
&CLSID_AVIPSNRFilter, // Filter CLSID
L"AVI PSNR Filter", // String name
MERIT_DO_NOT_USE, // Filter merit
2, // Number pins
sudPins // Pin details
};
//
// Object creation stuff
//
CFactoryTemplate g_Templates[]= {
L"AVI PSNR Filter"
, &CLSID_AVIPSNRFilter
, CDelegatorFilter::CreateInstance
, NULL
, &sudAVIPSNRFilter
};
int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);
//
// DllRegisterSever
//
// Handle the registration of this filter
//
STDAPI DllRegisterServer()
{
return AMovieDllRegisterServer2( TRUE );
} // DllRegisterServer
//
// DllUnregisterServer
//
STDAPI DllUnregisterServer()
{
return AMovieDllRegisterServer2( FALSE );
} // DllUnregisterServer
//
// DllEntryPoint
//
extern "C" BOOL WINAPI DllEntryPoint(HINSTANCE, ULONG, LPVOID);
BOOL APIENTRY DllMain(HANDLE hModule,
DWORD dwReason,
LPVOID lpReserved)
{
return DllEntryPoint((HINSTANCE)(hModule), dwReason, lpReserved);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -