扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:智慧的鱼 来源:天极开发 2007年10月16日
关键字:
// Stop the graph. pControl->Stop(); // Enumerate the filters in the graph. IEnumFilters *pEnum = NULL; HRESULT hr = pGraph->EnumFilters(&pEnum); if (SUCCEEDED(hr)) { IBaseFilter *pFilter = NULL; while (S_OK == pEnum->Next(1, &pFilter, NULL)) { // Remove the filter. pGraph->RemoveFilter(pFilter); // Reset the enumerator. pEnum->Reset(); pFilter->Release(); } pEnum->Release(); } |
IGraphBuilder *pGraph = NULL; ICaptureGraphBuilder2 *pBuilder = NULL; // Create the Filter Graph Manager. HRESULT hr = CoCreateInstance(CLSID_FilterGraph, NULL,CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void **)&pGraph); if (SUCCEEDED(hr)) { // Create the Capture Graph Builder. hr = CoCreateInstance(CLSID_CaptureGraphBuilder2, NULL,CLSCTX_INPROC_SERVER, IID_ICaptureGraphBuilder2, (void **)&pBuilder); if (SUCCEEDED(hr)) { pBuilder->SetFiltergraph (pGraph); } }; |
RenderStream(NULL, NULL, A, B, C) |
RenderStream(NULL, NULL, A, NULL, C) |
RenderStream(NULL, NULL, A, B, C) RenderStream(NULL, NULL, C, D, E) |
PIN_CATEGORY_CAPTURE PIN_CATEGORY_PREVIEW |
MEDIATYPE_Audio MEDIATYPE_Video MEDIATYPE_Interleaved (DV) |
IAMStreamConfig *pConfig = NULL; HRESULT hr = pBuild->FindInterface(&PIN_CATEGORY_PREVIEW,&MEDIATYPE_Video,pVCap,IID_IAMStreamConfig, (void**)&pConfig ); if (SUCCESSFUL(hr)) { /* ... */ pConfig->Release(); } |
IPin *pPin = NULL; hr = pBuild->FindPin( pCap, // Pointer to the filter to search. PINDIR_OUTPUT, // Search for an output pin. &PIN_CATEGORY_PREVIEW, // Search for a preview pin. &MEDIATYPE_Video, // Search for a video pin. TRUE, // The pin must be unconnected. 0, // Return the first matching pin (index 0). &pPin); // This variable receives the IPin pointer. if (SUCCESSFUL(hr)) { /* ... */ pPin->Release(); } |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者