Skip to content
  • Aurélien Zanelli's avatar
    v4l2object: probe all colorspace supported by device · c163250f
    Aurélien Zanelli authored and Nicolas Dufresne's avatar Nicolas Dufresne committed
    A device can support more than one colorspace for a given image
    dimension and pixel format. So we have to probe all the supported
    colorspace and not only rely on the default one. Otherwise we could end
    up with negotiation failure if the caps colorimetry field don't match
    the v4l2 device default one even if the v4l2 could support such
    colorimetry.
    
    This patch enable probing if colorspace for both capture and output
    device. It really makes sense for output device since the colorspace
    shall be set by the application and a little less for capture device
    which, at the moment, shall provide the colorspace; ie: the v4l2
    specification seems to not take into account the fact that a capture
    device could do colorspace conversion.
    
    As a side effet, probing takes some times and so sligthly delay v4l2
    initialization. Note that this patch only probe colorspace and not all
    colorspace, matrix, transfer and range combination to avoid taking too
    much time, especially with low-speed devices as full probing do 1782
    ioctl.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=755937
    c163250f