Logo Search packages:      
Sourcecode: libdc1394-22 version File versions  Download package

dc1394error_t dc1394_avt_get_aoi ( dc1394camera_t camera,
dc1394bool_t on_off,
int *  left,
int *  top,
int *  width,
int *  height 
)

Get on/off and area

Definition at line 1110 of file avt.c.

References dc1394_get_adv_control_register().

{
    dc1394error_t err;
    uint32_t value;

    /* Retrieve current mode*/
    err=dc1394_get_adv_control_register(camera,REG_CAMERA_AVT_AUTOFNC_AOI, &value);
    DC1394_ERR_RTN(err,"Could not get AVT autofocus AOI");

    /*  ON / OFF : Bit 6 */
    *on_off = (uint32_t)((value & 0x2000000UL) >> 25);

    /* Retrieve current size of area*/
    err=dc1394_get_adv_control_register(camera,REG_CAMERA_AVT_AF_AREA_SIZE, &value);
    DC1394_ERR_RTN(err,"Could not get AVT AF area size");

    /* width : Bits 0..15 */
    *width =(uint32_t)(value >> 16);
    /* height : Bits 16..31 */
    *height =(uint32_t)(value & 0xFFFFUL );

    /* Retrieve current position of area*/
    err=dc1394_get_adv_control_register(camera,REG_CAMERA_AVT_AF_AREA_POSITION, &value);
    DC1394_ERR_RTN(err,"Could not get AVT AF area position");

    /* left : Bits 0..15 */
    *left =(uint32_t)(value >> 16);
    /* top : Bits 16..31 */
    *top =(uint32_t)(value & 0xFFFFUL );

    return DC1394_SUCCESS;
}


Generated by  Doxygen 1.6.0   Back to index