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

int zbar_video_get_fd ( const zbar_video_t video  ) 

retrieve file descriptor associated with open *nix video device useful for using select()/poll() to tell when new images are available (NB v4l2 only!!).

the file descriptor or -1 if the video device is not open or the driver only supports v4l1

Definition at line 163 of file video.c.

References ZBAR_ERR_INVALID, ZBAR_ERR_UNSUPPORTED, and zbar_video_get_fd().

Referenced by zbar::Video::get_fd(), zbar_processor_init(), and zbar_video_get_fd().

    if(vdo->intf == VIDEO_INVALID)
        return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__,
                           "video device not opened"));
    if(vdo->intf != VIDEO_V4L2)
        return(err_capture(vdo, SEV_WARNING, ZBAR_ERR_UNSUPPORTED, __func__,
                           "video driver does not support polling"));

Generated by  Doxygen 1.6.0   Back to index