none
How to use IKsControl and IKsControl's KsProperty method in Metro Style Application? Urgent!Urgent!Urgent! RRS feed

  • 问题

  • In order to realize Face Detection , our SetFaceDetection Method is written in  COM component ,

    which uses IKsControl interface’s KsPropety method to set Face Detection funtion.

    HRESULT CAdvCIExtControl::SetFaceDetection(BOOL bDetect, BOOL bHighlight, BOOL b3AUtilization, LONG MaxFace)

    {

        if (!m_pKsControl)//m_pKsControl inherits from IKsControl interface

            return E_UNEXPECTED;

    #if 1

        DWORD faceMode = bDetect ? KSPROPERTY_CAMERA_FACE_REGION : KSPROPERTY_CAMERA_FACE_DETECTION_NONE;

        if (bDetect)

        {

            if (bHighlight)

                faceMode |= KSPROPERTY_CAMERA_FACE_REGION_HIGHLIGHT;

            if (b3AUtilization)

                faceMode |= KSPROPERTY_CAMERA_FACE_3A_UTILIZATION;

        }

       

        ULONG OutSize;

        KSPROPERTY ksProp = {0};

        ksProp.Set = PROPERTYSETID_CAMERA_FACE_CONTROL;

        ksProp.Id = KSPROPERTY_CAMERA_FACE_CONTROL_PROPERTY_ID;

        ksProp.Flags = KSPROPERTY_TYPE_SET;

        KSPROPERTY_CAMERA_FACE_CONTROL_S ksFaceData = {};

        ksFaceData.Mode = faceMode;

        ksFaceData.MaxFaces = MaxFace;

        return m_pKsControl->KsProperty(&ksProp, sizeof(ksProp), &ksFaceData, sizeof(ksFaceData), &OutSize);

    #else

        return E_NOTIMPL;

    #endif

    }

    Now ,we’d like to use IKsControl interface and call it’s KsProperty method to realize FaceDetection function in Metro Style Application(C++).

    But,our team can’t find IKsControl interface and we aslo not confirm whether IKsControl is permitted to use in Metro Style Application.

        what is  IKsControl interface‘s concrete realization

        How to use IKsControl and IKsControl's KsProperty(...) method in Metro Style Application?







    2013年5月8日 3:29

答案

全部回复