diff options
Diffstat (limited to 'v4l2-apps')
-rw-r--r-- | v4l2-apps/lib/libv4l/ChangeLog | 1 | ||||
-rw-r--r-- | v4l2-apps/lib/libv4l/libv4l2/libv4l2.c | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/v4l2-apps/lib/libv4l/ChangeLog b/v4l2-apps/lib/libv4l/ChangeLog index b54ab92f4..8dabf5361 100644 --- a/v4l2-apps/lib/libv4l/ChangeLog +++ b/v4l2-apps/lib/libv4l/ChangeLog @@ -5,6 +5,7 @@ libv4l-0.3.8 * check capabilities for streaming, if the driver cannot do streaming don't insert ourselves between the application and the driver * intercept get capabilites and report read capability (which we always offer) +* query buffer: indicate the mapping state of our (fake) buffer in the flags libv4l-0.3.7 diff --git a/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c b/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c index 9754ea516..f71d176b5 100644 --- a/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c +++ b/v4l2-apps/lib/libv4l/libv4l2/libv4l2.c @@ -773,6 +773,10 @@ int v4l2_ioctl (int fd, unsigned long int request, ...) buf->m.offset = V4L2_MMAP_OFFSET_MAGIC | buf->index; buf->length = V4L2_FRAME_BUF_SIZE; + if (devices[index].frame_map_count[buf->index]) + buf->flags |= V4L2_BUF_FLAG_MAPPED; + else + buf->flags &= ~V4L2_BUF_FLAG_MAPPED; } break; @@ -832,7 +836,12 @@ int v4l2_ioctl (int fd, unsigned long int request, ...) } buf->bytesused = result; + buf->m.offset = V4L2_MMAP_OFFSET_MAGIC | buf->index; buf->length = V4L2_FRAME_BUF_SIZE; + if (devices[index].frame_map_count[buf->index]) + buf->flags |= V4L2_BUF_FLAG_MAPPED; + else + buf->flags &= ~V4L2_BUF_FLAG_MAPPED; result = 0; } |