首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使IAMStreamConfig.SetFormat()与LifeCam Studio一起工作

无法使IAMStreamConfig.SetFormat()与LifeCam Studio一起工作
EN

Stack Overflow用户
提问于 2011-09-12 04:37:31
回答 1查看 9.6K关注 0票数 5

我是DirectShow的新手,并且正在为我的应用程序添加一个视频流。我研究过许多解决方案(TouchLess、DirectShow.net等)。最后,我选择了这个关于代码项目的小项目,这也是我选择它的原因;我想要一个可以使用的小代码库,因为我需要快速实现这个特性。

经过整整一天的阅读、实验和调试,我终于把一切都做得很好了。有一个延误,这是一个令人遗憾的,但我可以担心以后。我现在面临的问题是,该相机具有1280X720的功能。和我想使用这个决议。然而,它似乎决心捕捉640x480。当我越来越深入地学习如何设定这个决心时,我终于想到我已经弄明白了。我还在“代码项目”页面上的注释中找到了代码,这些注释是我用作基础的。

经过6个小时的尝试,我无法让这个相机改变它的分辨率。我没有收到任何错误,从SetFormat()返回的HRESULT是0,但是相机不会改变分辨率。

有太多的代码来粘贴所有的东西,但是我想包括构建图表的部分,因为我认为这就是问题所在。

下面是设置图形的代码

代码语言:javascript
复制
void CameraMethods::StartCamera(int camIndex, interior_ptr<int> width, 
    interior_ptr<int> height)
{
    if (g_pGraphBuilder != NULL)
        throw gcnew ArgumentException("Graph Builder was null");

    IMoniker *pMoniker = GetMoniker(camIndex);
    pMoniker->AddRef();

    HRESULT hr = S_OK;

    // Build all the necessary interfaces to start the capture
    if (SUCCEEDED(hr))
    {
        hr = CoCreateInstance(CLSID_FilterGraph,
            NULL,
            CLSCTX_INPROC,
            IID_IGraphBuilder,
            (LPVOID*)&g_pGraphBuilder);
    }

    if (SUCCEEDED(hr))
        hr = g_pGraphBuilder->QueryInterface(IID_IMediaControl, (LPVOID*)&g_pMediaControl);

    if (SUCCEEDED(hr))
    {
        hr = CoCreateInstance(CLSID_CaptureGraphBuilder2,
            NULL,
            CLSCTX_INPROC,
            IID_ICaptureGraphBuilder2,
            (LPVOID*)&g_pCaptureGraphBuilder);
    }

    // Setup the filter graph
    if (SUCCEEDED(hr))
        hr = g_pCaptureGraphBuilder->SetFiltergraph(g_pGraphBuilder);

    // Build the camera from the moniker
    if (SUCCEEDED(hr))
        hr = pMoniker->BindToObject(NULL, NULL, IID_IBaseFilter, (LPVOID*)&g_pIBaseFilterCam);

    // Add the camera to the filter graph
    if (SUCCEEDED(hr))
        hr = g_pGraphBuilder->AddFilter(g_pIBaseFilterCam, L"WebCam");

    // Create a SampleGrabber
    if (SUCCEEDED(hr))
        hr = CoCreateInstance(CLSID_SampleGrabber, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, 
            (void**)&g_pIBaseFilterSampleGrabber);

    // Configure the Sample Grabber
    if (SUCCEEDED(hr))
        hr = ConfigureSampleGrabber(g_pIBaseFilterSampleGrabber);

    //  Set the resolution - I have NO idea where this should be executed
    SetCaptureFormat(camIndex, *width, *height);

    // Add Sample Grabber to the filter graph
    if (SUCCEEDED(hr))
        hr = g_pGraphBuilder->AddFilter(g_pIBaseFilterSampleGrabber, L"SampleGrabber");

    // Create the NullRender
    if (SUCCEEDED(hr))
        hr = CoCreateInstance(CLSID_NullRenderer, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, 
            (void**)&g_pIBaseFilterNullRenderer);

    // Add the Null Render to the filter graph
    if (SUCCEEDED(hr))
        hr = g_pGraphBuilder->AddFilter(g_pIBaseFilterNullRenderer, L"NullRenderer");

    // Configure the render stream
    if (SUCCEEDED(hr))
        hr = g_pCaptureGraphBuilder->RenderStream(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, 
            g_pIBaseFilterCam, g_pIBaseFilterSampleGrabber, g_pIBaseFilterNullRenderer);

    // Grab the capture width and height
    if (SUCCEEDED(hr))
    {
        ISampleGrabber* pGrabber = NULL;
        hr = g_pIBaseFilterSampleGrabber->QueryInterface(IID_ISampleGrabber, (LPVOID*)&pGrabber);
        if (SUCCEEDED(hr))
        {
            AM_MEDIA_TYPE mt;
            hr = pGrabber->GetConnectedMediaType(&mt);
            if (SUCCEEDED(hr))
            {
                VIDEOINFOHEADER *pVih;
                if ((mt.formattype == FORMAT_VideoInfo) &&
                    (mt.cbFormat >= sizeof(VIDEOINFOHEADER)) &&
                    (mt.pbFormat != NULL) )
                {
                    pVih = (VIDEOINFOHEADER*)mt.pbFormat;
                    *width = pVih->bmiHeader.biWidth;
                    *height = pVih->bmiHeader.biHeight;
                }
                else
                {
                    hr = E_FAIL;  // Wrong format
                }

                // FreeMediaType(mt); (from MSDN)
                if (mt.cbFormat != 0)
                {
                    CoTaskMemFree((PVOID)mt.pbFormat);
                    mt.cbFormat = 0;
                    mt.pbFormat = NULL;
                }
                if (mt.pUnk != NULL)
                {
                    // Unecessary because pUnk should not be used, but safest.
                    mt.pUnk->Release();
                    mt.pUnk = NULL;
                }
            }
        }

        if (pGrabber != NULL)
        {
            pGrabber->Release();
            pGrabber = NULL;
        }
    }

    // Start the capture
    if (SUCCEEDED(hr))
        hr = g_pMediaControl->Run();

    // If init fails then ensure that you cleanup
    if (FAILED(hr))
        StopCamera();
    else
        hr = S_OK;  // Make sure we return S_OK for success

    // Cleanup
    if (pMoniker != NULL)
    {
        pMoniker->Release();
        pMoniker = NULL;
    }

    if (SUCCEEDED(hr))
        this->activeCameraIndex = camIndex;
    else
        throw gcnew COMException("Error Starting Camera", hr);
}

更新在下面添加了ConfigureSampleGrabber()方法

代码语言:javascript
复制
HRESULT CameraMethods::ConfigureSampleGrabber(IBaseFilter *pIBaseFilter)
{
    HRESULT hr = S_OK;
    ISampleGrabber *pGrabber = NULL;

    hr = pIBaseFilter->QueryInterface(IID_ISampleGrabber, (void**)&pGrabber);
    if (SUCCEEDED(hr))
    {
        AM_MEDIA_TYPE mt;
        ZeroMemory(&mt, sizeof(AM_MEDIA_TYPE));
        mt.majortype = MEDIATYPE_Video;
        mt.subtype = MEDIASUBTYPE_RGB24;
        mt.formattype = FORMAT_VideoInfo;
        hr = pGrabber->SetMediaType(&mt);
    }

    if (SUCCEEDED(hr))
        hr = pGrabber->SetCallback(new SampleGrabberCB(), 1);

    if (pGrabber != NULL)
    {
        pGrabber->Release();
        pGrabber = NULL;
    }

    return hr;
}

这几乎就是CodeProject源代码中的确切代码。然后,我添加了这个方法来设置决议:

代码语言:javascript
复制
void CameraMethods::SetCaptureFormat(int camIndex, int width, int height)
{
    HRESULT hr = S_OK;
    IMoniker* pMoniker = GetMoniker(camIndex);

    IBaseFilter* pCap;
    hr=pMoniker->BindToObject(0,0,IID_IBaseFilter,(void **)&pCap);

    if(!SUCCEEDED(hr))
        return;

    IAMStreamConfig *pConfig = NULL;

    if(g_pCaptureGraphBuilder == NULL)  // no CaptureGraphBuilder initialised
        return;

    hr = g_pCaptureGraphBuilder->FindInterface(
        &PIN_CATEGORY_CAPTURE, // Preview pin.
        0,    // Any media type.
        pCap, // Pointer to the capture filter.
        IID_IAMStreamConfig, (void**)&pConfig);

    if(!SUCCEEDED(hr))
        return;

    int iCount = 0, iSize = 0;
    hr = pConfig->GetNumberOfCapabilities(&iCount, &iSize);

    // Check the size to make sure we pass in the correct structure.
    if (iSize == sizeof(VIDEO_STREAM_CONFIG_CAPS)) {

        // Use the video capabilities structure.
        for (int iFormat = 0; iFormat < iCount; iFormat++)
        {
            VIDEO_STREAM_CONFIG_CAPS scc;
            AM_MEDIA_TYPE *pmt;
            /* Note:  Use of the VIDEO_STREAM_CONFIG_CAPS structure to configure a video device is 
            deprecated. Although the caller must allocate the buffer, it should ignore the 
            contents after the method returns. The capture device will return its supported 
            formats through the pmt parameter. */
            hr = pConfig->GetStreamCaps(iFormat, &pmt, (BYTE*)&scc);
            if (SUCCEEDED(hr))
            {
                /* Examine the format, and possibly use it. */
                if (pmt->formattype == FORMAT_VideoInfo) {
                    // Check the buffer size.
                    if (pmt->cbFormat >= sizeof(VIDEOINFOHEADER))
                    {
                        VIDEOINFOHEADER *pVih =  reinterpret_cast<VIDEOINFOHEADER*>(pmt->pbFormat);
                        BITMAPINFOHEADER *bmiHeader = &pVih->bmiHeader;

                        /* Access VIDEOINFOHEADER members through pVih. */
                        if( bmiHeader->biWidth == width && bmiHeader->biHeight == height && 
                            bmiHeader->biBitCount == 24)
                        {
                            hr = pConfig->SetFormat(pmt);
                        }
                    }
                }

                // Delete the media type when you are done.
                DeleteMediaType(pmt);
            }
        }
    }
}

我已经完成了代码,并验证了对SetFormat()的调用是否被执行并返回一个有效的HRESULT。但是,对捕获的帧没有任何更改。

没有错误信息,很难知道从哪里开始。我希望这里有一些DirectShow专家能看到这个问题,我甚至会很高兴看到一个好的时尚高人一等的人:“是的,当过滤器堆栈上的缓冲区被分配并且小部件被初始化到foobar!Pft.lol时,你怎么期望摄像机改变帧大小”;)

教我,噢,DirectShow/COM上帝!

更新#2

根据罗曼的建议,我使用GraphStudio来查看我的图形的遮罩下。我承认我还是不明白我到底在看什么。我找到了一个“文本报告”功能,并认为如果报告显示了一些有价值的信息,那么在这里发布该报告将是有帮助的。

代码语言:javascript
复制
--------------------------------------------------
  Filters
--------------------------------------------------
  1. Smart Tee
  2. MJPEG Decompressor
  3. SampleGrabber
  4. NullRenderer
  5. WebCam

--------------------------------------------------
  Connections
--------------------------------------------------
  1. [Smart Tee]/(Capture) -> [MJPEG Decompressor]/(XForm In)
      Major:   MEDIATYPE_Video
      Subtype: MEDIASUBTYPE_MJPG
          bFixedSizeSamples:    TRUE
          bTemporalCompression: FALSE
          lSampleSize:          921600
          cbFormat:             88
      Format:  FORMAT_VideoInfo
      VIDEOINFOHEADER:
          rcSource:             (0,0,0,0)
          rcTarget:             (0,0,0,0)
          dwBitRate:            221184000
          dwBitErrorRate:       0
          AvgTimePerFrame:      333333
      BITMAPINFOHEADER:
          biSize:               40
          biWidth:              640
          biHeight:             480
          biPlanes:             1
          biBitCount:           24
          biCompression:        0x47504A4D
          biSizeImage:          921600
          biXPelsPerMeter:      0
          biYPelsPerMeter:      0
          biClrUsed:            0
          biClrImportant:       0

  2. [MJPEG Decompressor]/(XForm Out) -> [SampleGrabber]/(Input)
      Major:   MEDIATYPE_Video
      Subtype: MEDIASUBTYPE_RGB24
          bFixedSizeSamples:    TRUE
          bTemporalCompression: FALSE
          lSampleSize:          921600
          cbFormat:             88
      Format:  FORMAT_VideoInfo
      VIDEOINFOHEADER:
          rcSource:             (0,0,0,0)
          rcTarget:             (0,0,0,0)
          dwBitRate:            221184221
          dwBitErrorRate:       0
          AvgTimePerFrame:      333333
      BITMAPINFOHEADER:
          biSize:               40
          biWidth:              640
          biHeight:             480
          biPlanes:             1
          biBitCount:           24
          biCompression:        0x00000000
          biSizeImage:          921600
          biXPelsPerMeter:      0
          biYPelsPerMeter:      0
          biClrUsed:            0
          biClrImportant:       0

  3. [SampleGrabber]/(Output) -> [NullRenderer]/(In)
      Major:   MEDIATYPE_Video
      Subtype: MEDIASUBTYPE_RGB24
          bFixedSizeSamples:    TRUE
          bTemporalCompression: FALSE
          lSampleSize:          921600
          cbFormat:             88
      Format:  FORMAT_VideoInfo
      VIDEOINFOHEADER:
          rcSource:             (0,0,0,0)
          rcTarget:             (0,0,0,0)
          dwBitRate:            221184221
          dwBitErrorRate:       0
          AvgTimePerFrame:      333333
      BITMAPINFOHEADER:
          biSize:               40
          biWidth:              640
          biHeight:             480
          biPlanes:             1
          biBitCount:           24
          biCompression:        0x00000000
          biSizeImage:          921600
          biXPelsPerMeter:      0
          biYPelsPerMeter:      0
          biClrUsed:            0
          biClrImportant:       0

  4. [WebCam]/(Capture) -> [Smart Tee]/(Input)
      Major:   MEDIATYPE_Video
      Subtype: MEDIASUBTYPE_MJPG
          bFixedSizeSamples:    TRUE
          bTemporalCompression: FALSE
          lSampleSize:          921600
          cbFormat:             88
      Format:  FORMAT_VideoInfo
      VIDEOINFOHEADER:
          rcSource:             (0,0,0,0)
          rcTarget:             (0,0,0,0)
          dwBitRate:            221184000
          dwBitErrorRate:       0
          AvgTimePerFrame:      333333
      BITMAPINFOHEADER:
          biSize:               40
          biWidth:              640
          biHeight:             480
          biPlanes:             1
          biBitCount:           24
          biCompression:        0x47504A4D
          biSizeImage:          921600
          biXPelsPerMeter:      0
          biYPelsPerMeter:      0
          biClrUsed:            0
          biClrImportant:       0

更新#3 -天哪,我开始做什么了?!为什么谷歌比我以前更深的谷歌之前,我偶然发现了一些东西罗曼的理论错配颜色空间。我下载应用程序和立即用一个太小的缓冲区修复了一个错误。在解决这个问题之后,我能够生成以下报告:

代码语言:javascript
复制
Dump Version:   1.2

Using device:   Microsoft® LifeCam Studio(TM)
Interface:  USB

Pin Name:   Capture
Pin direction:  Output
Pin category:   Capture

IAMVideoCompression:    No
ISpecifyPropertyPages:  Yes
IMediaSeeking:  Yes
IPinConnection: No
IPinFlowControl:    No
IAMDroppedFrames:   No
IAMVideoProcAmp:    No
IAMVideoControlCaps:    0

Major Type  Sub Type    Format Type FixedSamples    Temporal Compression    Sample Size Max Input Size  Min Output Size Max Output Size Min-Max FPS Video Standard
Video   YUY2    VideoInfo   Fixed   NotTemporal 614400  640x480 640x480 640x480 7.50-30.00  {none}
Video   YUY2    VideoInfo2  Fixed   NotTemporal 614400  640x480 640x480 640x480 7.50-30.00  {none}
Video   YUY2    VideoInfo   Fixed   NotTemporal 1843200 1280x720    1280x720    1280x720    7.50-10.00  {none}
Video   YUY2    VideoInfo2  Fixed   NotTemporal 1843200 1280x720    1280x720    1280x720    7.50-10.00  {none}
Video   YUY2    VideoInfo   Fixed   NotTemporal 1044480 960x544 960x544 960x544 7.50-20.00  {none}
Video   YUY2    VideoInfo2  Fixed   NotTemporal 1044480 960x544 960x544 960x544 7.50-20.00  {none}
Video   YUY2    VideoInfo   Fixed   NotTemporal 716800  800x448 800x448 800x448 7.50-30.00  {none}
Video   YUY2    VideoInfo2  Fixed   NotTemporal 716800  800x448 800x448 800x448 7.50-30.00  {none}
Video   YUY2    VideoInfo   Fixed   NotTemporal 460800  640x360 640x360 640x360 7.50-30.00  {none}
Video   YUY2    VideoInfo2  Fixed   NotTemporal 460800  640x360 640x360 640x360 7.50-30.00  {none}
Video   YUY2    VideoInfo   Fixed   NotTemporal 203520  424x240 424x240 424x240 7.50-30.00  {none}
Video   YUY2    VideoInfo2  Fixed   NotTemporal 203520  424x240 424x240 424x240 7.50-30.00  {none}
Video   YUY2    VideoInfo   Fixed   NotTemporal 202752  352x288 352x288 352x288 7.50-30.00  {none}
Video   YUY2    VideoInfo2  Fixed   NotTemporal 202752  352x288 352x288 352x288 7.50-30.00  {none}
Video   YUY2    VideoInfo   Fixed   NotTemporal 153600  320x240 320x240 320x240 7.50-30.00  {none}
Video   YUY2    VideoInfo2  Fixed   NotTemporal 153600  320x240 320x240 320x240 7.50-30.00  {none}
Video   YUY2    VideoInfo   Fixed   NotTemporal 960000  800x600 800x600 800x600 7.50-20.00  {none}
Video   YUY2    VideoInfo2  Fixed   NotTemporal 960000  800x600 800x600 800x600 7.50-20.00  {none}
Video   YUY2    VideoInfo   Fixed   NotTemporal 50688   176x144 176x144 176x144 7.50-30.00  {none}
Video   YUY2    VideoInfo2  Fixed   NotTemporal 50688   176x144 176x144 176x144 7.50-30.00  {none}
Video   YUY2    VideoInfo   Fixed   NotTemporal 38400   160x120 160x120 160x120 7.50-30.00  {none}
Video   YUY2    VideoInfo2  Fixed   NotTemporal 38400   160x120 160x120 160x120 7.50-30.00  {none}
Video   YUY2    VideoInfo   Fixed   NotTemporal 4147200 1920x1080   1920x1080   1920x1080   5.00-5.00   {none}
Video   YUY2    VideoInfo2  Fixed   NotTemporal 4147200 1920x1080   1920x1080   1920x1080   5.00-5.00   {none}
Video   MJPG    VideoInfo   Fixed   NotTemporal 921600  640x480 640x480 640x480 7.50-30.00  {none}
Video   MJPG    VideoInfo2  Fixed   NotTemporal 921600  640x480 640x480 640x480 7.50-30.00  {none}
Video   MJPG    VideoInfo   Fixed   NotTemporal 6220800 1920x1080   1920x1080   1920x1080   7.50-30.00  {none}
Video   MJPG    VideoInfo2  Fixed   NotTemporal 6220800 1920x1080   1920x1080   1920x1080   7.50-30.00  {none}
Video   MJPG    VideoInfo   Fixed   NotTemporal 2764800 1280x720    1280x720    1280x720    7.50-30.00  {none}
Video   MJPG    VideoInfo2  Fixed   NotTemporal 2764800 1280x720    1280x720    1280x720    7.50-30.00  {none}
Video   MJPG    VideoInfo   Fixed   NotTemporal 1566720 960x544 960x544 960x544 7.50-30.00  {none}
Video   MJPG    VideoInfo2  Fixed   NotTemporal 1566720 960x544 960x544 960x544 7.50-30.00  {none}
Video   MJPG    VideoInfo   Fixed   NotTemporal 1075200 800x448 800x448 800x448 7.50-30.00  {none}
Video   MJPG    VideoInfo2  Fixed   NotTemporal 1075200 800x448 800x448 800x448 7.50-30.00  {none}
Video   MJPG    VideoInfo   Fixed   NotTemporal 691200  640x360 640x360 640x360 7.50-30.00  {none}
Video   MJPG    VideoInfo2  Fixed   NotTemporal 691200  640x360 640x360 640x360 7.50-30.00  {none}
Video   MJPG    VideoInfo   Fixed   NotTemporal 1440000 800x600 800x600 800x600 7.50-30.00  {none}
Video   MJPG    VideoInfo2  Fixed   NotTemporal 1440000 800x600 800x600 800x600 7.50-30.00  {none}
Video   MJPG    VideoInfo   Fixed   NotTemporal 311040  432x240 432x240 432x240 7.50-30.00  {none}
Video   MJPG    VideoInfo2  Fixed   NotTemporal 311040  432x240 432x240 432x240 7.50-30.00  {none}
Video   MJPG    VideoInfo   Fixed   NotTemporal 304128  352x288 352x288 352x288 7.50-30.00  {none}
Video   MJPG    VideoInfo2  Fixed   NotTemporal 304128  352x288 352x288 352x288 7.50-30.00  {none}
Video   MJPG    VideoInfo   Fixed   NotTemporal 76032   176x144 176x144 176x144 7.50-30.00  {none}
Video   MJPG    VideoInfo2  Fixed   NotTemporal 76032   176x144 176x144 176x144 7.50-30.00  {none}
Video   MJPG    VideoInfo   Fixed   NotTemporal 230400  320x240 320x240 320x240 7.50-30.00  {none}
Video   MJPG    VideoInfo2  Fixed   NotTemporal 230400  320x240 320x240 320x240 7.50-30.00  {none}
Video   MJPG    VideoInfo   Fixed   NotTemporal 57600   160x120 160x120 160x120 7.50-30.00  {none}
Video   MJPG    VideoInfo2  Fixed   NotTemporal 57600   160x120 160x120 160x120 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo   Fixed   NotTemporal 460800  640x480 640x480 640x480 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo2  Fixed   NotTemporal 460800  640x480 640x480 640x480 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo   Fixed   NotTemporal 1382400 1280x720    1280x720    1280x720    7.50-15.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo2  Fixed   NotTemporal 1382400 1280x720    1280x720    1280x720    7.50-15.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo   Fixed   NotTemporal 783360  960x544 960x544 960x544 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo2  Fixed   NotTemporal 783360  960x544 960x544 960x544 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo   Fixed   NotTemporal 537600  800x448 800x448 800x448 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo2  Fixed   NotTemporal 537600  800x448 800x448 800x448 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo   Fixed   NotTemporal 345600  640x360 640x360 640x360 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo2  Fixed   NotTemporal 345600  640x360 640x360 640x360 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo   Fixed   NotTemporal 152640  424x240 424x240 424x240 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo2  Fixed   NotTemporal 152640  424x240 424x240 424x240 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo   Fixed   NotTemporal 152064  352x288 352x288 352x288 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo2  Fixed   NotTemporal 152064  352x288 352x288 352x288 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo   Fixed   NotTemporal 115200  320x240 320x240 320x240 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo2  Fixed   NotTemporal 115200  320x240 320x240 320x240 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo   Fixed   NotTemporal 720000  800x600 800x600 800x600 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo2  Fixed   NotTemporal 720000  800x600 800x600 800x600 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo   Fixed   NotTemporal 38016   176x144 176x144 176x144 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo2  Fixed   NotTemporal 38016   176x144 176x144 176x144 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo   Fixed   NotTemporal 28800   160x120 160x120 160x120 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo2  Fixed   NotTemporal 28800   160x120 160x120 160x120 7.50-30.00  {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo   Fixed   NotTemporal 3110400 1920x1080   1920x1080   1920x1080   7.50-7.50   {none}
Video   {3032344D-0000-0010-8000-00AA00389B71}  VideoInfo2  Fixed   NotTemporal 3110400 1920x1080   1920x1080   1920x1080   7.50-7.50   {none}

Pin Name:   Video Camera Terminal
Pin direction:  Input
Pin category:   {3EBC7959-3310-493B-AA81-C7E132D56F71}

IAMVideoCompression:    No
ISpecifyPropertyPages:  Yes
IMediaSeeking:  No
IPinConnection: No
IPinFlowControl:    No
IAMDroppedFrames:   No
IAMVideoProcAmp:    No
IAMVideoControlCaps:    0

Major Type  Sub Type    Format Type FixedSamples    Temporal Compression    Sample Size
EN

回答 1

Stack Overflow用户

发布于 2012-08-19 12:25:02

史蒂夫,你不应该重建相机(从名字)在SetCaptureFormat,但使用g_pIBaseFilterCam

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7383372

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档