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

int zebra_video_get_fd ( const zebra_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 126 of file video.c.

References ZEBRA_ERR_INVALID, ZEBRA_ERR_UNSUPPORTED, and zebra_video_get_fd().

Referenced by zebra::Video::get_fd(), zebra_process_one(), zebra_processor_init(), zebra_processor_set_active(), and zebra_video_get_fd().

    if(vdo->fd >= 0 && vdo->intf == VIDEO_V4L2)

    if(vdo->intf != VIDEO_V4L2)
        return(err_capture(vdo, SEV_WARNING, ZEBRA_ERR_UNSUPPORTED, __func__,
                           "v4l1 API does not support polling"));

    return(err_capture(vdo, SEV_ERROR, ZEBRA_ERR_INVALID, __func__,
                       "video device not opened"));

Generated by  Doxygen 1.6.0   Back to index