Freigeben über


Timed Camera Capture - Update

Regards the Timed Camera Capture sample I posted last month, lots of you came across a bug in my code that slipped through my rigorous testing. I did a little code tidy up before I posted the ZIP and inadvertently removed an important line from the graph setup steps. Of course I tested it thoroughly before posting but its never a good thing to test your own code!

Anyway I have updated the ZIP file and posted over the top of the old ZIP. Here is the link: https://marcusperryman.members.winisp.net/BlogStuff/TimedCamera.zip

The error was in CGraphManager::CreateCaptureGraphInternal() where the filter graph is initially built. To make sure you have the right ZIP its 46.7kb (reported by explorer download window).

We apologies for the inconvenience.

Marcus

Comments

  • Anonymous
    June 08, 2006
    Actually I have a question.  How do you set the resolution of the captured image?

  • Anonymous
    June 14, 2006
    The comment has been removed

  • Anonymous
    June 18, 2006
    hi, i'd like to modify cameracapture.dll to add a preview capture, do u know how can i do?

  • Anonymous
    June 18, 2006
    That's a little more tricky. I presume you want a 'video' preview - so the user can see the live feed from the camera - and then a still capture, right?
    To achieve this you need to setup a video feed and stream the data to your preview window. When your user triggers a capture you need to stop the video feed and setup a still feed, then trigger a capture.
    To setup the preview window should be a simple case of linkning the preview filter into the graph, but from my investigations it looks like there is no default preview filters installed. So you will need to create and use your own custom filter to achieve this.
    I will have a go at this and post my finding when I get some time.

    Marcus

  • Anonymous
    August 05, 2006
    Hello Marcus

    Not a programmer, so excuse my lack of experience should the answer to my questions be an easy one. ;)

    Does your 'code', once compiled and ready to be installed require a certain brand/type of PPC? Or will it work on any WM5?

    Will the image size be controlled by the settings set in the device?

    Having the feed as described above ('video' preview) is important to me - so I can see what the camera is about capture. Was a solution found/designed?

    Do you contract out your skills?

    Thanks

    Jim

  • Anonymous
    August 09, 2006
    Thank you for article.
    I have another question about resolution. How suggest the quality?

  • Anonymous
    August 31, 2006

    Hi,

    Many thanks for a great article.

    I have the same question - how do you suggest the quality? ive got as far as


    IAMStreamConfig pConfig = NULL;
    CHK(m_pCaptureGraphBuilder->FindInterface(
       &PIN_CATEGORY_PREVIEW,
       &MEDIATYPE_Video,
       m_pVideoCaptureFilter,
       IID_IAMStreamConfig,
       (void
    *)&pConfig
    ));


    AM_MEDIA_TYPE *pType = NULL;

    pConfig->GetFormat(&pType);
    pType->
    pConfig->SetFormat(PType);
    pConfig->Release();

    but im not sure how to go about using pType to set the quality.

    thanks
    George

  • Anonymous
    August 31, 2006

    Hi,

    Many thanks for a great article.

    I have the same question - how do you suggest the quality? ive got as far as


    IAMStreamConfig pConfig = NULL;
    CHK(m_pCaptureGraphBuilder->FindInterface(
       &PIN_CATEGORY_PREVIEW,
       &MEDIATYPE_Video,
       m_pVideoCaptureFilter,
       IID_IAMStreamConfig,
       (void
    *)&pConfig
    ));


    AM_MEDIA_TYPE *pType = NULL;

    pConfig->GetFormat(&pType);
    pType->
    pConfig->SetFormat(PType);
    pConfig->Release();

    but im not sure how to go about using pType to set the quality.

    thanks
    George

  • Anonymous
    December 12, 2006
    Any help on using IAMStreamConfig to enumerate the possible resolutions and select a higher one? I can't seem to get any code to work properly to do that.

  • Anonymous
    January 02, 2007
    The comment has been removed