How can I view the graph running in my program?

Source: Internet
Author: User

In the help document, you can find two functions related to this problem: addtorot and removefromrot. The specific function transcript is as follows:

HRESULT AddToRot(IUnknown *pUnkGraph, DWORD *pdwRegister) {    IMoniker * pMoniker;    IRunningObjectTable *pROT;    if (FAILED(GetRunningObjectTable(0, &pROT))) {        return E_FAIL;    }    WCHAR wsz[256];    wsprintfW(wsz, L"FilterGraph %08x pid %08x", (DWORD_PTR)pUnkGraph, GetCurrentProcessId());    HRESULT hr = CreateItemMoniker(L"!", wsz, &pMoniker);    if (SUCCEEDED(hr)) {        hr = pROT->Register(ROTFLAGS_REGISTRATIONKEEPSALIVE, pUnkGraph,            pMoniker, pdwRegister);        pMoniker->Release();    }    pROT->Release();    return hr;}
void RemoveFromRot(DWORD pdwRegister){    IRunningObjectTable *pROT;    if (SUCCEEDED(GetRunningObjectTable(0, &pROT))) {        pROT->Revoke(pdwRegister);        pROT->Release();    }}
After creating your filter graph, run the addtorot function to view your
Graph, the graph state displayed in the tool is the same as that in your program, so that you can know whether your graph is correct.
Created. Is it convenient?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.