This looks more nice.
```
bool is_capture_device = (ioctl(device_fd_, VIDIOC_QUERYCAP, &cap) == 0) &&
                         (cap.capabilities & V4L2_CAP_VIDEO_CAPTURE); 
```