!7 backport v4l2-ctl-streaming: fix type of a time_t value
From: @liyy9 Reviewed-by: @Charlie_li Signed-off-by: @Charlie_li
This commit is contained in:
commit
2a079ac485
66
0001-v4l2-ctl-streaming-fix-type-of-a-time_t-value.patch
Normal file
66
0001-v4l2-ctl-streaming-fix-type-of-a-time_t-value.patch
Normal file
@ -0,0 +1,66 @@
|
||||
From 6867620ef625bdbce43eb3d44404ce8fb37960d6 Mon Sep 17 00:00:00 2001
|
||||
From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
Date: Wed, 10 Jan 2018 09:10:47 -0200
|
||||
Subject: [PATCH] v4l2-ctl-streaming: fix type of a time_t value
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
As warned by gcc, when compiling on arm 32 bits:
|
||||
|
||||
v4l2-ctl-streaming.cpp: In function ‘int do_handle_cap(int, buffers&, FILE*, int*, unsigned int&, timespec&)’:
|
||||
v4l2-ctl-streaming.cpp:1059:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
|
||||
if (res.tv_sec > last_sec) {
|
||||
^
|
||||
v4l2-ctl-streaming.cpp: In function ‘int do_handle_out(int, buffers&, FILE*, v4l2_buffer*, unsigned int&, timespec&)’:
|
||||
v4l2-ctl-streaming.cpp:1193:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
|
||||
if (res.tv_sec > last_sec) {
|
||||
qv4l2.cpp: In member function ‘void ApplicationWindow::calculateFps()’:
|
||||
qv4l2.cpp:692:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
|
||||
if (res.tv_sec > last_sec) {
|
||||
^
|
||||
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
---
|
||||
utils/qv4l2/qv4l2.cpp | 2 +-
|
||||
utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/utils/qv4l2/qv4l2.cpp b/utils/qv4l2/qv4l2.cpp
|
||||
index 00e78cd3..929b795b 100644
|
||||
--- a/utils/qv4l2/qv4l2.cpp
|
||||
+++ b/utils/qv4l2/qv4l2.cpp
|
||||
@@ -674,7 +674,7 @@ error:
|
||||
|
||||
void ApplicationWindow::calculateFps()
|
||||
{
|
||||
- static unsigned last_sec;
|
||||
+ static time_t last_sec;
|
||||
|
||||
if (m_frame == 0) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &m_startTimestamp);
|
||||
diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
|
||||
index 352e58cf..89ff2ad3 100644
|
||||
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
|
||||
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
|
||||
@@ -941,7 +941,7 @@ static int do_handle_cap(int fd, buffers &b, FILE *fout, int *index,
|
||||
struct v4l2_plane planes[VIDEO_MAX_PLANES];
|
||||
struct v4l2_buffer buf;
|
||||
bool ignore_count_skip = false;
|
||||
- static unsigned last_sec;
|
||||
+ static time_t last_sec;
|
||||
|
||||
memset(&buf, 0, sizeof(buf));
|
||||
memset(planes, 0, sizeof(planes));
|
||||
@@ -1090,7 +1090,7 @@ static int do_handle_cap(int fd, buffers &b, FILE *fout, int *index,
|
||||
static int do_handle_out(int fd, buffers &b, FILE *fin, struct v4l2_buffer *cap,
|
||||
unsigned &count, struct timespec &ts_last)
|
||||
{
|
||||
- static unsigned last_sec;
|
||||
+ static time_t last_sec;
|
||||
struct v4l2_plane planes[VIDEO_MAX_PLANES];
|
||||
struct v4l2_buffer buf;
|
||||
int ret;
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
Name: v4l-utils
|
||||
Version: 1.14.2
|
||||
Release: 5
|
||||
Release: 6
|
||||
Summary: Linux utilities and libraries to handle media devices
|
||||
License: GPLv2+ and GPLv2
|
||||
URL: http://www.linuxtv.org/downloads/v4l-utils/
|
||||
Source0: http://linuxtv.org/downloads/v4l-utils/v4l-utils-%{version}.tar.bz2
|
||||
Patch0000: v4l-utils-sysmacros.patch
|
||||
Patch0001: 0001-v4l2-ctl-streaming-fix-type-of-a-time_t-value.patch
|
||||
BuildRequires: alsa-lib-devel desktop-file-utils doxygen gettext
|
||||
BuildRequires: kernel-headers libjpeg-devel qt5-qtbase-devel systemd-devel
|
||||
Requires: udev
|
||||
@ -155,6 +156,9 @@ mv lib/libdvbv5/README lib/libdvbv5/README.libdvbv5
|
||||
%{_mandir}/man3/*.3*
|
||||
|
||||
%changelog
|
||||
* Thu Dec 28 2023 liyuanyuan <liyuanyuan@xfusion.com> - 1.14.2-6
|
||||
- v4l2-ctl-streaming: fix type of a time_t value
|
||||
|
||||
* Wed Nov 13 2019 caomeng <caomeng5@huawei.com> - 1.14.2-5
|
||||
- let libv4l1.so.0 in libv4l
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user