Logo Search packages:      
Sourcecode: zbar version File versions  Download package

int zbar_video_request_size ( zbar_video_t video,
unsigned  width,
unsigned  height 
)

request a preferred size for the video image from the device. the request may be adjusted or completely ignored by the driver.

Returns:
0 if successful or -1 if the video device is already initialized
Since:
0.6

Definition at line 174 of file video.c.

References ZBAR_ERR_INVALID, and zbar_video_request_size().

Referenced by zbar::Video::request_size(), zbar_processor_init(), and zbar_video_request_size().

{
    if(vdo->initialized)
        /* FIXME re-init different format? */
        return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__,
                           "already initialized, unable to resize"));

    vdo->width = width;
    vdo->height = height;
    zprintf(1, "request size: %d x %d\n", width, height);
    return(0);
}


Generated by  Doxygen 1.6.0   Back to index