Move dev->fd
to dev->v4l2.dev_fd
This commit is contained in:
@ -9,7 +9,6 @@ device_t *device_open(const char *name, const char *path, device_hw_t *hw) {
|
||||
dev->name = strdup(name);
|
||||
dev->path = strdup(path);
|
||||
dev->hw = hw;
|
||||
dev->fd = -1;
|
||||
dev->allow_dma = true;
|
||||
|
||||
if (dev->hw->device_open(dev) < 0) {
|
||||
@ -128,7 +127,7 @@ int device_set_stream(device_t *dev, bool do_on)
|
||||
sub.type = V4L2_EVENT_SOURCE_CHANGE;
|
||||
|
||||
E_LOG_DEBUG(dev, "Subscribing to DV-timings events ...");
|
||||
xioctl(dev_name(dev), dev->fd, do_on ? VIDIOC_SUBSCRIBE_EVENT : VIDIOC_UNSUBSCRIBE_EVENT, &sub);
|
||||
xioctl(dev_name(dev), dev->v4l2.dev_fd, do_on ? VIDIOC_SUBSCRIBE_EVENT : VIDIOC_UNSUBSCRIBE_EVENT, &sub);
|
||||
#endif
|
||||
|
||||
if (dev->capture_list) {
|
||||
@ -158,7 +157,7 @@ int device_consume_event(device_t *dev)
|
||||
}
|
||||
|
||||
E_LOG_DEBUG(dev, "Consuming V4L2 event ...");
|
||||
E_XIOCTL(dev, dev->fd, VIDIOC_DQEVENT, &event, "Got some V4L2 device event, but where is it?");
|
||||
E_XIOCTL(dev, dev->v4l2.dev_fd, VIDIOC_DQEVENT, &event, "Got some V4L2 device event, but where is it?");
|
||||
|
||||
switch (event.type) {
|
||||
case V4L2_EVENT_SOURCE_CHANGE:
|
||||
|
Reference in New Issue
Block a user