Sync from SUSE:SLFO:Main v4l-utils revision 8d00efe4f51a4b36642a1ecf32bfd9ca

This commit is contained in:
Adrian Schröter 2024-05-04 01:42:00 +02:00
commit acbea1b7e3
10 changed files with 2857 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>qv4l2</package>
</multibuild>

11
baselibs.conf Normal file
View File

@ -0,0 +1,11 @@
libdvbv5-0
libv4l
libv4l1-0
libv4l2-0
libv4l2rds0
libv4lconvert0
libv4l-devel
requires "libv4l1-0-<targettype> = %version"
requires "libv4l2-0-<targettype> = %version"
requires "libv4l2rds0-<targettype> = %version"
requires "libv4lconvert0-<targettype> = %version"

View File

@ -0,0 +1,24 @@
Index: v4l-utils-1.22.1/utils/qv4l2/Makefile.am
===================================================================
--- v4l-utils-1.22.1.orig/utils/qv4l2/Makefile.am
+++ v4l-utils-1.22.1/utils/qv4l2/Makefile.am
@@ -6,8 +6,8 @@ qv4l2_SOURCES = qv4l2.cpp general-tab.cp
raw2sliced.cpp qv4l2.h capture-win.h general-tab.h vbi-tab.h raw2sliced.h \
v4l2-tpg-core.c v4l2-tpg-colors.c
nodist_qv4l2_SOURCES = moc_qv4l2.cpp moc_general-tab.cpp moc_capture-win.cpp moc_vbi-tab.cpp qrc_qv4l2.cpp
-qv4l2_LDADD = ../../lib/libv4l2/libv4l2.la ../../lib/libv4lconvert/libv4lconvert.la \
- ../libv4l2util/libv4l2util.la ../libmedia_dev/libmedia_dev.la
+qv4l2_LDADD = ../libmedia_dev/libmedia_dev.la
+qv4l2_SOURCES +=- ../libv4l2util/frequencies.c
qv4l2_CPPFLAGS = -I$(top_srcdir)/utils/common
if WITH_QTGL
@@ -21,6 +21,8 @@ endif
qv4l2_CPPFLAGS += $(ALSA_CFLAGS) -Wno-psabi
qv4l2_LDFLAGS += $(ALSA_LIBS) -pthread
+qv4l2_LDFLAGS += -lv4l2 -lv4lconvert
+
EXTRA_DIST = enterbutt.png exit.png fileopen.png qv4l2_24x24.png qv4l2_64x64.png qv4l2.png qv4l2.svg \
snapshot.png video-television.png fileclose.png qv4l2_16x16.png qv4l2_32x32.png qv4l2.desktop \
qv4l2.qrc saveraw.png qv4l2.pro qv4l2.1 fullscreenexit.png fullscreen.png start.png step.png

BIN
v4l-utils-1.24.1.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEBdAWnCbkFZNBgSnfGZpk+t+1AP8FAmP47hkACgkQGZpk+t+1
AP8hhA/9Hkg3y58XRW4OqL1AsS156nBgYretYdESVTt0bCAuB/k6bdMCzk8cIdYG
drXpbMqKSNoaZgKmHJ0+rpNySw2aJscdWPlROUNqpnCmCyFB1I5oKLZUNMzxbmlK
M+MGtNiQrJmWZvwyIqfYQNGL1KncXA1oUaIQYFsWQvWbqY5GSDcSoPLhLLm1kS8E
HgkqJISvP8n9VbtENnr8Fdtt3tHja/B4l67o7wvFCjsFWw7e7pzzMfuhoH16etga
xArhCMy4vE6sdNGBjK7Jz6kdwCTNcyP/H/INxJ5c878OjBe8KZJiGYq4H4yCxCp4
fHlRtcHTD7jBaYUgoS7GYQlguz3SBM8g1FIxyekueclCYgIcV8ojm7LnfE9WIYgN
icK20RgX18IToB5ms3fph9TBCYdxkOmJ9Cn3hgM5p7Hsz6m9gGba7sYlHTn2TURD
YO47MJ583lJ+lYRSb9fqhDUu4J2mmw04j0A7n67iolYyYD9CiXH5VQuizjufTMtx
vVB8WgRvv5wuoGrwkBesT5xSf/lhOu1iEFaxs4MmqeCixWZUSq2/leW/Drp3oLWP
BkUbzmeTQ437bVwudw+keL1I6PpBN+YIiguQe6p8QDfJYAZN3dDZ5LCUwxkc8FxH
yg5ofWW9lWyVAM+xREsYUjVx78iDvtkzTTMnKvvmi/pN6apBVMM=
=D6V8
-----END PGP SIGNATURE-----

24
v4l-utils-32bitfix.patch Normal file
View File

@ -0,0 +1,24 @@
Index: v4l-utils-1.22.1/lib/libdvbv5/dvb-file.c
===================================================================
--- v4l-utils-1.22.1.orig/lib/libdvbv5/dvb-file.c
+++ v4l-utils-1.22.1/lib/libdvbv5/dvb-file.c
@@ -594,7 +594,8 @@ static int fill_entry(struct dvb_entry *
n_prop = entry->n_props;
entry->props[n_prop].cmd = i;
if (!attr_name || !*attr_name)
- entry->props[n_prop].u.data = atol(value);
+ /* some put stream_id=4294967295 (-1) which is more than LONG_MAX on 32bit... */
+ entry->props[n_prop].u.data = (uint32_t)atoll(value);
else {
for (j = 0; attr_name[j]; j++)
if (!strcasecmp(value, attr_name[j]))
@@ -713,7 +714,8 @@ static int fill_entry(struct dvb_entry *
/* FIXME: this works only for integer values */
n_prop = entry->n_props;
entry->props[n_prop].cmd = cmd;
- entry->props[n_prop].u.data = atol(value);
+ /* some put stream_id=4294967295 (-1) which is more than LONG_MAX on 32bit... */
+ entry->props[n_prop].u.data = (uint32_t)atoll(value);
entry->n_props++;
return 0;

1093
v4l-utils.changes Normal file

File diff suppressed because it is too large Load Diff

1334
v4l-utils.keyring Normal file

File diff suppressed because it is too large Load Diff

326
v4l-utils.spec Normal file
View File

@ -0,0 +1,326 @@
#
# spec file
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "qv4l2"
%global psuffix -%{flavor}
%endif
%define _udevdir %(pkg-config --variable udevdir udev)
%define so_ver 0
%define sname v4l-utils
Name: v4l-utils%{?psuffix}
Version: 1.24.1
Release: 0
Summary: Utilities for video4linux
License: GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later
URL: https://linuxtv.org/downloads/v4l-utils/
Source0: https://linuxtv.org/downloads/v4l-utils/%{sname}-%{version}.tar.bz2
Source1: https://linuxtv.org/downloads/v4l-utils/%{sname}-%{version}.tar.bz2.asc
Source2: %{sname}.keyring
Source100: baselibs.conf
Patch0: use_system_v4l_for_qv4l.patch
Patch1: v4l-utils-32bitfix.patch
BuildRequires: alsa-devel
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: libjpeg-devel
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(udev)
Requires: libv4l = %{version}
%if "%{flavor}" == ""
BuildRequires: doxygen
BuildRequires: kernel-headers
%endif
%if "%{flavor}" == "qv4l2"
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5OpenGL)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(libv4l2)
BuildRequires: pkgconfig(libv4lconvert)
%endif
%description
v4l-utils is a collection of various video4linux (V4L) utilities.
%lang_package
%package devel-tools
Summary: Utilities for v4l2 / DVB driver development and debugging
License: GPL-2.0-only AND GPL-2.0-or-later
Requires: libv4l = %{version}
%description devel-tools
Utilities for v4l2 / DVB driver authors for development and debugging.
%package -n dvb-utils
Summary: Utilities for DVB devices
License: GPL-2.0-only
Recommends: dtv-scan-tables-v5
%description -n dvb-utils
dvb-utils is a collection of various DVB utilities.
%package -n libdvbv5-%{so_ver}
Summary: Library that provides access to DVB adapter cards
License: GPL-2.0-only
%description -n libdvbv5-%{so_ver}
libdvbv5 is a library meant to be used by digital TV applications that need to
talk with media hardware.
This package contains shared lib for packages that use libdvbv5.
%package -n libdvbv5-devel
Summary: Development files for libdvbv5
License: GPL-2.0-only
Requires: libdvbv5-%{so_ver} = %{version}
%description -n libdvbv5-devel
The libdvbv5-devel package contains libraries and header files for
developing applications that use libdvbv5.
%package -n libv4l
Summary: Collection of video4linux support libraries
License: GPL-2.0-only AND LGPL-2.1-or-later
%description -n libv4l
libv4l is a collection of libraries which adds a thin abstraction layer on
top of video4linux2 devices. The purpose of this (thin) layer is to make it
easy for application writers to support a wide variety of devices without
having to write separate code for different devices in the same class.
%package -n libv4l1-%{so_ver}
Summary: Video4linux support library
License: LGPL-2.1-or-later
Requires: libv4l
%description -n libv4l1-%{so_ver}
libv4l1 offers the (deprecated) v4l1 API on top of v4l2 devices, independent
of the drivers for those devices supporting v4l1 compatibility (which many
v4l2 drivers do not).
This package contains shared lib for packages that use libv4l1.
%package -n libv4l2-%{so_ver}
Summary: Video4linux support library
License: LGPL-2.1-or-later
Requires: libv4l
%description -n libv4l2-%{so_ver}
libv4l2 offers the v4l2 API on top of v4l2 devices, while adding for the
application transparent libv4lconvert conversion where necessary.
This package contains shared lib for packages that use libv4l2.
%package -n libv4l2rds%{so_ver}
Summary: Video4linux support library
License: LGPL-2.1-or-later
Requires: libv4l
%description -n libv4l2rds%{so_ver}
libv4l2rds offers decoding raw RDS data from V4L2 Radio devices and simple ways
to access the received RDS information.
This package contains shared lib for packages that use libv4l2rds.
%package -n libv4lconvert%{so_ver}
Summary: Video4linux support library
License: LGPL-2.1-or-later
Requires: libv4l
%description -n libv4lconvert%{so_ver}
libv4lconvert offers functions to convert from any (known) pixel-format
to V4l2_PIX_FMT_BGR24 or V4l2_PIX_FMT_YUV420.
This package contains shared lib for packages that use libv4lconvert.
%package -n libv4l-devel
Summary: Development files for libv4l
License: LGPL-2.1-or-later
Requires: libv4l1-%{so_ver} = %{version}
Requires: libv4l2-%{so_ver} = %{version}
Requires: libv4l2rds%{so_ver} = %{version}
Requires: libv4lconvert%{so_ver} = %{version}
%description -n libv4l-devel
The libv4l-devel package contains libraries and header files for
developing applications that use libv4l.
%package -n qv4l2
Summary: Video4linux test control and streaming test application
License: GPL-2.0-or-later
Requires: libv4l = %{version}
%description -n qv4l2
qv4l2 is a test control and streaming test application for video4linux.
%prep
%autosetup -p1 -n %{sname}-%{version}
%build
autoreconf -vfi
%configure \
--disable-static \
--disable-silent-rules \
%if "%{flavor}" == "qv4l2"
--disable-libdvbv5 \
%else
--disable-qv4l2 \
%endif
--with-udevdir=%{_udevdir}
%if "%{flavor}" == "qv4l2"
export CXXFLAGS="-std=c++14 %{optflags}"
%make_build -C utils/libmedia_dev
%make_build -C utils/libv4l2util
%make_build -C utils/qv4l2
%else
%make_build
%endif
%install
%if "%{flavor}" == "qv4l2"
%make_install -C utils/qv4l2
%suse_update_desktop_file -N "QV4l2" -G "V4L2 Test Utility" -r qv4l2 Qt AudioVideo Video TV
%else
%make_install
%find_lang "%{name}"
%find_lang libdvbv5
# Not needed (links to plugins in libv4l subdir)
rm %{buildroot}%{_libdir}/{v4l1compat.so,v4l2convert.so}
%endif
find %{buildroot} -type f -name "*.la" -delete -print
%if "%{flavor}" == ""
%post -n libdvbv5-%{so_ver} -p /sbin/ldconfig
%postun -n libdvbv5-%{so_ver} -p /sbin/ldconfig
%post -n libv4l1-%{so_ver} -p /sbin/ldconfig
%postun -n libv4l1-%{so_ver} -p /sbin/ldconfig
%post -n libv4l2-%{so_ver} -p /sbin/ldconfig
%postun -n libv4l2-%{so_ver} -p /sbin/ldconfig
%post -n libv4l2rds%{so_ver} -p /sbin/ldconfig
%postun -n libv4l2rds%{so_ver} -p /sbin/ldconfig
%post -n libv4lconvert%{so_ver} -p /sbin/ldconfig
%postun -n libv4lconvert%{so_ver} -p /sbin/ldconfig
%endif
%if "%{flavor}" == ""
%files
%license COPYING
%doc ChangeLog README.md TODO
%dir %{_sysconfdir}/rc_keymaps/
%config(noreplace) %{_sysconfdir}/rc_maps.cfg
%{_udevdir}/rc_keymaps
%{_udevrulesdir}/70-infrared.rules
%{_bindir}/cx18-ctl
%{_bindir}/cec-compliance
%{_bindir}/cec-ctl
%{_bindir}/cec-follower
%{_bindir}/ir-ctl
%{_bindir}/ir-keytable
%{_bindir}/ivtv-ctl
%{_bindir}/media-ctl
%{_bindir}/rds-ctl
%{_bindir}/v4l2-ctl
%{_bindir}/v4l2-sysfs-path
%{_mandir}/man5/rc_keymap.5%{?ext_man}
%{_mandir}/man1/ir-keytable.1%{?ext_man}
%{_mandir}/man1/v4l2-ctl.1%{?ext_man}
%{_mandir}/man1/cec-compliance.1%{?ext_man}
%{_mandir}/man1/cec-ctl.1%{?ext_man}
%{_mandir}/man1/cec-follower.1%{?ext_man}
%{_mandir}/man1/ir-ctl.1%{?ext_man}
%files lang -f "%{name}.lang"
%files devel-tools
%license COPYING
%doc ChangeLog README.md TODO
%{_bindir}/decode_tm6000
%{_bindir}/v4l2-compliance
%{_sbindir}/v4l2-dbg
%{_mandir}/man1/v4l2-compliance.1%{?ext_man}
%files -n dvb-utils
%license COPYING
%doc ChangeLog README.md TODO
%{_bindir}/dvb-*
%{_bindir}/dvbv5-*
%{_mandir}/man1/dvb-*1%{?ext_man}
%{_mandir}/man1/dvbv5-*1%{?ext_man}
%files -n libdvbv5-%{so_ver} -f libdvbv5.lang
%{_libdir}/libdvbv5.so.%{so_ver}*
%files -n libdvbv5-devel
%license COPYING.libdvbv5
%doc TODO.libdvbv5
%{_includedir}/libdvbv5/
%{_libdir}/libdvbv5.so
%{_libdir}/pkgconfig/libdvbv5*.pc
%files -n libv4l
%license COPYING.libv4l
%doc ChangeLog README.md README.libv4l TODO
%{_libdir}/libv4l/
%files -n libv4l1-%{so_ver}
%{_libdir}/libv4l1.so.%{so_ver}*
%files -n libv4l2-%{so_ver}
%{_libdir}/libv4l2.so.%{so_ver}*
%files -n libv4l2rds%{so_ver}
%{_libdir}/libv4l2rds.so.%{so_ver}*
%files -n libv4lconvert%{so_ver}
%{_libdir}/libv4lconvert.so.%{so_ver}*
%files -n libv4l-devel
%license COPYING.libv4l
%doc README.lib-multi-threading
%{_includedir}/libv4l*.h
%{_libdir}/libv4l*.so
%{_libdir}/pkgconfig/libv4l*.pc
%endif
%if "%{flavor}" == "qv4l2"
%files -n qv4l2
%license COPYING
%doc ChangeLog README.md TODO
%{_bindir}/qv4l2
%{_datadir}/applications/qv4l2.desktop
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/??x??
%dir %{_datadir}/icons/hicolor/??x??/apps
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%{_datadir}/icons/hicolor/*/apps/qv4l2.*
%{_mandir}/man1/qv4l2.1%{?ext_man}
%endif
%changelog