diff options
author | hans@localhost.localdomain <hans@localhost.localdomain> | 2008-07-29 23:56:08 +0200 |
---|---|---|
committer | hans@localhost.localdomain <hans@localhost.localdomain> | 2008-07-29 23:56:08 +0200 |
commit | 9370e86c842c65ba5d1508825a32cf192256bcb2 (patch) | |
tree | 7412f41a0f20fd26fefb9403c2de4a988ba9ac3d /v4l2-apps/lib/libv4l/libv4l2/libv4l2.c | |
parent | 6a8ad167499697788706490f42f2f192efb62718 (diff) | |
download | mediapointer-dvb-s2-9370e86c842c65ba5d1508825a32cf192256bcb2.tar.gz mediapointer-dvb-s2-9370e86c842c65ba5d1508825a32cf192256bcb2.tar.bz2 |
libv4l: query buffer: indicate the mapping state of our (fake) buffer in the flags
From: Hans de Goede <j.w.r.degoede@hhs.nl>
libv4l: query buffer: indicate the mapping state of our (fake) buffer in the flags
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Diffstat (limited to 'v4l2-apps/lib/libv4l/libv4l2/libv4l2.c')
-rw-r--r-- | v4l2-apps/lib/libv4l/libv4l2/libv4l2.c | 9 |
1 files changed, 9 insertions, 0 deletions
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; } |