aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/v4l2-compliance/v4l2-test-buffers.cpp12
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-streaming.cpp5
-rw-r--r--utils/v4l2-ctl/v4l2-ctl.cpp4
3 files changed, 11 insertions, 10 deletions
diff --git a/utils/v4l2-compliance/v4l2-test-buffers.cpp b/utils/v4l2-compliance/v4l2-test-buffers.cpp
index f44686cf..0ea60da0 100644
--- a/utils/v4l2-compliance/v4l2-test-buffers.cpp
+++ b/utils/v4l2-compliance/v4l2-test-buffers.cpp
@@ -159,7 +159,7 @@ static bool fill_output_buffer(const cv4l_queue &q, cv4l_buffer &buf, bool first
if (!stream_use_hdr) {
ssize_t sz = read(stream_from_fd, q.g_dataptr(buf.g_index(), p), len);
- if (sz < len) {
+ if (sz < (ssize_t)len) {
seek = true;
break;
}
@@ -181,7 +181,7 @@ static bool fill_output_buffer(const cv4l_queue &q, cv4l_buffer &buf, bool first
ssize_t sz = read(stream_from_fd, q.g_dataptr(buf.g_index(), p), bytesused);
- if (sz < bytesused) {
+ if (sz < (ssize_t)bytesused) {
seek = true;
break;
}
@@ -978,12 +978,12 @@ static int captureBufs(struct node *node, struct node *node_m2m_cap, const cv4l_
if (ret != EAGAIN) {
fail_on_test(ret);
if (show_info)
- printf("\t\t%s Buffer: %d Sequence: %d Field: %s Size: %d Flags: %s Timestamp: %ld.%06lds\n",
+ printf("\t\t%s Buffer: %d Sequence: %d Field: %s Size: %d Flags: %s Timestamp: %lld.%06llds\n",
v4l_type_is_output(buf.g_type()) ? "Out" : "Cap",
buf.g_index(), buf.g_sequence(),
field2s(buf.g_field()).c_str(), buf.g_bytesused(),
bufferflags2s(buf.g_flags()).c_str(),
- buf.g_timestamp().tv_sec, buf.g_timestamp().tv_usec);
+ (__u64)buf.g_timestamp().tv_sec, (__u64)buf.g_timestamp().tv_usec);
fail_on_test(buf.check(q, last_seq));
if (!show_info && !no_progress) {
printf("\r\t%s: Frame #%03d%s",
@@ -1058,12 +1058,12 @@ static int captureBufs(struct node *node, struct node *node_m2m_cap, const cv4l_
capture_count++;
if (show_info)
- printf("\t\t%s Buffer: %d Sequence: %d Field: %s Size: %d Flags: %s Timestamp: %ld.%06lds\n",
+ printf("\t\t%s Buffer: %d Sequence: %d Field: %s Size: %d Flags: %s Timestamp: %lld.%06llds\n",
v4l_type_is_output(buf.g_type()) ? "Out" : "Cap",
buf.g_index(), buf.g_sequence(),
field2s(buf.g_field()).c_str(), buf.g_bytesused(),
bufferflags2s(buf.g_flags()).c_str(),
- buf.g_timestamp().tv_sec, buf.g_timestamp().tv_usec);
+ (__u64)buf.g_timestamp().tv_sec, (__u64)buf.g_timestamp().tv_usec);
fail_on_test(ret);
if (v4l_type_is_capture(buf.g_type()) && buf.g_bytesused())
fail_on_test(buf.check(m2m_q, last_m2m_seq, true));
diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
index 47addc41..fb65fed3 100644
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@ -509,8 +509,9 @@ static void print_buffer(FILE *f, struct v4l2_buffer &buf)
fprintf(f, "\tSequence : %u\n", buf.sequence);
fprintf(f, "\tLength : %u\n", buf.length);
fprintf(f, "\tBytesused: %u\n", buf.bytesused);
- fprintf(f, "\tTimestamp: %lu.%06lus (%s, %s)\n", buf.timestamp.tv_sec, buf.timestamp.tv_usec,
- timestamp_type2s(buf.flags).c_str(), timestamp_src2s(buf.flags).c_str());
+ fprintf(f, "\tTimestamp: %llu.%06llus (%s, %s)\n",
+ (__u64)buf.timestamp.tv_sec, (__u64)buf.timestamp.tv_usec,
+ timestamp_type2s(buf.flags).c_str(), timestamp_src2s(buf.flags).c_str());
if (buf.flags & V4L2_BUF_FLAG_TIMECODE) {
static const int fps_types[] = { 0, 24, 25, 30, 50, 60 };
int fps = buf.timecode.type;
diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp
index 2a76176b..866c16f3 100644
--- a/utils/v4l2-ctl/v4l2-ctl.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl.cpp
@@ -885,8 +885,8 @@ int parse_selection_target(const char *s, unsigned int &target)
static void print_event(const struct v4l2_event *ev)
{
- printf("%ld.%06ld: event %u, pending %u: ",
- ev->timestamp.tv_sec, ev->timestamp.tv_nsec / 1000,
+ printf("%lld.%06ld: event %u, pending %u: ",
+ (__u64)ev->timestamp.tv_sec, ev->timestamp.tv_nsec / 1000,
ev->sequence, ev->pending);
switch (ev->type) {
case V4L2_EVENT_VSYNC:

Privacy Policy