projects
/
platform
/
upstream
/
v4l-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1510884
)
v4l2-ctl: when streaming to file use bytesused instead of the full buffer.
author
Hans Verkuil
<hans.verkuil@cisco.com>
Sun, 3 Mar 2013 14:21:29 +0000
(15:21 +0100)
committer
Hans Verkuil
<hans.verkuil@cisco.com>
Sun, 3 Mar 2013 14:21:29 +0000
(15:21 +0100)
This makes it possible to use v4l2-ctl to stream compressed video using
stream I/O.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
utils/v4l2-ctl/v4l2-ctl-streaming.cpp
patch
|
blob
|
history
diff --git
a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
index
5a080e3
..
e23e317
100644
(file)
--- a/
utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/
utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@
-674,11
+674,11
@@
void streaming_set(int fd)
if (fout && !stream_skip) {
for (unsigned j = 0; j < num_planes; j++) {
unsigned p = buf.index * num_planes + j;
- unsigned
sz = fwrite(buffers[p], 1,
-
buffer_lengths[p]
, fout);
+ unsigned
used = is_mplane ? planes[j].bytesused : buf.bytesused;
+
unsigned sz = fwrite(buffers[p], 1, used
, fout);
- if (sz !=
buffer_lengths[p]
)
- fprintf(stderr, "%u != %u\n", sz,
buffer_lengths[p]
);
+ if (sz !=
used
)
+ fprintf(stderr, "%u != %u\n", sz,
used
);
}
}
if (doioctl(fd, VIDIOC_QBUF, &buf))