locked
DirectShow: IAMCameraControl RRS feed

  • Question

  • Hi,

    I'm developing camera capture application for WM 5.0/6.0 using direct
    show.

    Everything worked fine until I had to implement zoom in/out feature. So I've tried to use
    IAMCameraControl interface.
    Here is the snippet:


    Code Snippet

       long flags = 0;
       long zoom_value = 0;
       CComPtr<IAMCameraControl> pCameraControl;
       m_pVideoCaptureFilter->QueryInterface(IID_IAMCameraControl,
    (void**)&pCameraControl);

       CHK(pCameraControl->Get(CameraControl_Zoom, &zoom_value, &flags));
       Logger::LogDebug("current zoom = %d\n", zoom_value);

      if ((zoom_value + 50) <= 600) {
          zoom_value = zoom_value + 50;
          CHK(pCameraControl->Set(CameraControl_Zoom, zoom_value,
    CameraControl_Flags_Manual));
       }


    Device (samsung SGH i 600) has the following zoom range:

    min = 0
    max = 600
    default = 10
    step = 10

    Code works without any exceptions and errors but it has no effect. I
    enumerated all possible combinations of flags and values, stopped
    graph before set new value etc.... but with  no luck..
    Also tried on another device Qtek 8310 (it has only 2 possible zoom
    values 1 and 2) but the same result as for samsung.

    Could someone point me to right solution/code example or possibly
    remove mistakes from my code Smile
    AFAIK there are some posts from ppl which faced with same problem but
    I didnt see any useful reply.

    Many Thanks
    Leonid
    Thursday, February 28, 2008 4:04 PM

Answers

  • You are assuming that capture driver in these devices implements IAMCameraControl correctly. Most likely it is not the case. Many of the camera drivers I've seen are written very poorly. In reality what happens is that the Camera app manufacturer (usually someone contracted by a device manufacturer) has to modify their code to make some IOCTL calls directly into camera driver to implement certain features.

    Bottom line, most likely it's not you

     

    Friday, February 29, 2008 3:38 AM

All replies

  • You are assuming that capture driver in these devices implements IAMCameraControl correctly. Most likely it is not the case. Many of the camera drivers I've seen are written very poorly. In reality what happens is that the Camera app manufacturer (usually someone contracted by a device manufacturer) has to modify their code to make some IOCTL calls directly into camera driver to implement certain features.

    Bottom line, most likely it's not you

     

    Friday, February 29, 2008 3:38 AM
  • Thanks for the explanations Alex. It's really sad that I can do nothing about it Sad
    Friday, February 29, 2008 8:33 AM