IGraphBuilder * g_pGraph = NULL; ICaptureGraphBuilder2 * g_pCapture = NULL; IBaseFilter *pMux = NULL; IFileSinkFilter *pSink = NULL; /////////////////////////////////////////////////////////////////////////////////////// // Render the preview pin on the video capture filter // Use this instead of g_pGraph->RenderFile hr = g_pCapture->SetOutputFileName(&MEDIASUBTYPE_Avi,L"C:\\Example.avi", &pMux, NULL); hr = g_pCapture->RenderStream (&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, pSrcFilter, NULL, pMux); if (FAILED(hr)) { Msg(TEXT("Couldnt render the video capture stream. hr=0x%x\r\n") TEXT("The capture device may already be in use by another application.\r\n\r\n") TEXT("The sample will now close"), hr); pSrcFilter->Release(); return hr; } hr = g_pCapture->RenderStream (&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Video, pSrcFilter, NULL, NULL); if (FAILED(hr)) { Msg(TEXT("Couldnt render the video capture stream. hr=0x%x\r\n") TEXT("The capture device may already be in use by another application.\r\n\r\n") TEXT("The sample will now close"), hr); pSrcFilter->Release(); return hr; }
0x80070005
ACCESS_DENIED
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)