-
大小: 1.05MB文件类型: .rar金币: 1下载: 0 次发布日期: 2023-11-06
- 语言: 其他
- 标签: directshow 光盘 实务精选
资源简介
directshow实务精选光盘 免积分下载
代码片段和文件信息
//
// CMPEG1Builder.cpp
//
#include
#include “FltGuids.h“
#include “CMPEG1Builder.h“
/////////////////////////////////////////////////////////////////////////////
CMPEG1Builder::CMPEG1Builder(LPUNKNOWN pUnk HRESULT *phr) :
CUnknown(NAME(“MPEG1 Builder“) pUnk)
{
}
CMPEG1Builder::~CMPEG1Builder()
{
}
//
// Expose our own interface
STDMETHODIMP CMPEG1Builder::NonDelegatingQueryInterface(REFIID riid void ** ppv)
{
CheckPointer(ppv E_POINTER);
if (riid == IID_IMPEG1Builder)
{
return GetInterface((IMPEG1Builder *) this ppv);
}
else if (riid == IID_IDistributorNotify)
{
return GetInterface((IDistributorNotify *) this ppv);
}
else
{
return CUnknown::NonDelegatingQueryInterface(riid ppv);
}
}
// --- IMPEG1Builder methods ---
STDMETHODIMP CMPEG1Builder::IsMPEG1File(const char * inFilePath)
{
IGraphBuilder * pBuilder = RetrieveGraphBuilder();
// Create a file source filter
IbaseFilter * pSource = NULL;
WCHAR wcFilePath[MAX_PATH];
MultiByteToWideChar(CP_ACP 0 inFilePath -1 wcFilePath MAX_PATH);
pBuilder->AddSourceFilter(wcFilePath L“Source“ &pSource);
pSource->Release();
// Create microsoft MPEG-1 Stream Splitter
IbaseFilter * pSplitter = NULL;
CoCreateInstance(CLSID_MPEG1Splitter NULL CLSCTX_INPROC_SERVER
IID_IbaseFilter (void **)&pSplitter);
pBuilder->AddFilter(pSplitter L“MPEG-1 Splitter“);
pSplitter->Release();
// Try to connect them...
IPin * pOut = GetPinByDirection(pSource PINDIR_OUTPUT);
IPin * pIn = GetPinByDirection(pSplitter PINDIR_INPUT);
HRESULT hr = pBuilder->ConnectDirect(pOut pIn NULL);
pBuilder->RemoveFilter(pSplitter);
pBuilder->RemoveFilter(pSource);
return SUCCEEDED(hr) ? S_OK : S_FALSE;
}
STDMETHODIMP CMPEG1Builder::RenderMPEG1File(const char * inFilePath)
{
IGraphBuilder * pBuilder = RetrieveGraphBuilder();
// Create a file source filter
IbaseFilter * pSource = NULL;
WCHAR wcFilePath[MAX_PATH];
MultiByteToWideChar(CP_ACP 0 inFilePath -1 wcFilePath MAX_PATH);
pBuilder->AddSourceFilter(wcFilePath L“Source“ &pSource);
pSource->Release();
// Create microsoft MPEG-1 Stream Splitter
IbaseFilter * pSplitter = NULL;
CoCreateInstance(CLSID_MPEG1Splitter NULL CLSCTX_INPROC_SERVER
IID_IbaseFilter (void **)&pSplitter);
pBuilder->AddFilter(pSplitter L“MPEG-1 Splitter“);
pSplitter->Release();
// Create microsoft MPEG-1 Video Decoder
IbaseFilter * pVideoDec = NULL;
CoCreateInstance(CLSID_CMpegVideoCodec NULL CLSCTX_INPROC_SERVER
IID_IbaseFilter (void **)&pVideoDec);
pBuilder->AddFilter(pVideoDec L“MPEG-1 Video Decoder“);
pVideoDec->Release();
// Create microsoft MPEG-1 Audio Dedocer
IbaseFilter * pAudioDec = NULL;
CoCreateInstance(CLSID_CMpegAudioCodec NULL CLSCTX_INPROC_SERVER
IID_IbaseFilter (void **)&pAudioDec);
pBuilder->AddFilter(pAudioDec L“MPEG-1 Audio Decoder“);
pAudioDec->Release();
// Connect filte
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
......R 77824 2004-04-20 19:45 实务精选2\Bin\AVCap.exe
......R 77824 2004-04-20 19:48 实务精选2\Bin\AVChat.exe
......R 94208 2004-04-20 19:52 实务精选2\Bin\ball.ax
......R 73728 2004-04-20 19:56 实务精选2\Bin\Blender9.exe
......R 700416 2004-04-20 19:55 实务精选2\Bin\BmpMix9.exe
......R 65536 2004-04-20 20:00 实务精选2\Bin\DesTlSrc.ax
......R 98304 2004-04-20 19:54 实务精选2\Bin\dsnet.ax
......R 114688 2004-04-20 20:00 实务精选2\Bin\dump.ax
......R 57344 2004-04-20 19:50 实务精选2\Bin\FltNtrcvr.ax
......R 49152 2004-04-20 19:45 实务精选2\Bin\HqGrbr.ax
......R 61440 2004-04-20 19:53 实务精选2\Bin\Hqtlystd.ax
......R 49152 2004-04-20 19:51 实务精选2\Bin\Hqvk.ax
......R 45056 2004-04-20 19:55 实务精选2\Bin\mpg2tssrc.ax
......R 20480 2004-04-20 19:48 实务精选2\Bin\MulticastClient.exe
......R 20480 2004-04-20 19:48 实务精选2\Bin\MulticastServer.exe
......R 24576 2004-04-20 19:56 实务精选2\Bin\PidMpg1.dll
......R 24576 2004-04-20 19:56 实务精选2\Bin\PIDTest.exe
......R 61440 2004-04-20 20:00 实务精选2\Bin\qqsrc.ax
......R 28672 2004-04-20 19:53 实务精选2\Bin\SimplePla
......R 24576 2004-04-20 19:49 实务精选2\Bin\TCPClient.exe
......R 24576 2004-04-20 19:49 实务精选2\Bin\TCPServer.exe
......R 61440 2004-04-20 19:55 实务精选2\Bin\Ticker9.exe
......R 3988 2004-04-20 19:59 实务精选2\Bin\ti
......R 24576 2004-04-20 19:49 实务精选2\Bin\UDPClient.exe
......R 20480 2004-04-20 19:50 实务精选2\Bin\UDPServer.exe
......R 40960 2004-04-20 19:50 实务精选2\Bin\VODClient.exe
......R 40960 2004-04-20 19:51 实务精选2\Bin\VODServer.exe
......R 1725 2003-06-18 16:08 实务精选2\Readme.txt
......R 6858 2004-02-21 10:19 实务精选2\《DirectShow实务精选》\Appendix_B\PidMpeg1\CMPEG1Builder.cpp
......R 1133 2003-12-30 13:49 实务精选2\《DirectShow实务精选》\Appendix_B\PidMpeg1\CMPEG1Builder.h
............此处省略363个文件信息
- 上一篇:空间距离计算,支持大地坐标
- 下一篇:openssl-1.0.2k
相关资源
- DirectShow +CameraDS
- Windows防火墙与网络封包截获技术光盘
- OGRE 3D 游戏开发框架指南+光盘代码
- ns与网络模拟 _光盘源代码
- 操作系统设计与实现(第三版影印版
- 图表详解UG NX二次开发光盘内容
- abaqus在道路工程中的应用随书光盘
- ARM9嵌入式系统开发与实践北航光盘资
- ANSYS_Workbench图书配套光盘
- labview for everyone光盘资料
- Windows环境下32位汇编语言程序设计(
- 《windows程序设计第五版》PDF + 随书光
- 《Linux驱动程序开发》配套光盘.rar
- FPGA数字电子系统设计与开发导航的配
- 数字逻辑基础与Verilog设计(原书第
- Windows环境下32位汇编语言程序设计第
- LabVIEW_8.20程序设计从入门到精通光盘
- PC游戏编程_人机博弈(PDF)+光盘(
- Linux C编程从入门到精通 光盘 源代码
- DirectShow显示USB摄像头
- 博创2410开发板光盘资料---linux实验
- uCOS源代码 PC机上移植范例 邵贝贝 书
- visual basic 常用数值算法集 何光渝 电
- SOLIDWORKSAPI二次开发详解配套光盘Par
- opc服务器设计与应用pdf+光盘
- 全国计算机等级考试二级教程MS Offi
- 分形算法与程序设计——Visual Basic实
- UML基础与Rose建模实用教程配套光盘中
- 寒江独钓 光盘 代码
- 《精通CSS+DIV网页样式与布局》光盘源
评论
共有 条评论