mirror of
git://nv-tegra.nvidia.com/tegra/v4l2-src/v4l2_libs.git
synced 2025-12-22 09:21:28 +03:00
Updating prebuilts and/or headers
f07563fa1628a75c578152387638b1f217f730be - libv4lconvert/Makefile 6ac3c887c56c7d4345499cb5b7bfac9579a57d16 - libv4lconvert/cpia1.c 2d385802ec3690e78a961ce95431e98eb3f5fc6a - libv4lconvert/rgbyuv.c 43843cbdb81f3efee5873f5ed25ae1eb7745a9e5 - libv4lconvert/libv4lconvert-priv.h 002783c808dc565478c18bd27373792028264bb6 - libv4lconvert/ov518-decomp.c 4d49e6e897046e66e41c3563fec2eb2562abf813 - libv4lconvert/jpeg_memsrcdest.c a38fdb4c79518e972678745c93cd62881d72972b - libv4lconvert/Makefile.dGPU e9f783fb933606224252dfd3093afa36490f6f4c - libv4lconvert/Makefile.in 52900601a24ee9ffea87ca7fe6651e912e20235e - libv4lconvert/libv4lsyscall-priv.h d37f854500cbd759ad93ae89c6aa75c00b000931 - libv4lconvert/bayer.c 2cd1b994bb7999d0c08c19b1a2efd11707250852 - libv4lconvert/helper.c adac14b8826d05ddab33d595a803e92eaf84b797 - libv4lconvert/Makefile.am 6e806290f6e426c881322d362f189fa7b9e2f917 - libv4lconvert/sn9c10x.c ba44b6ac00a643e6df484f3172022e1b2628c0cc - libv4lconvert/jpgl.c fa06343de31dcf6d3d5862cc278396272fa838c4 - libv4lconvert/se401.c 4bd081bf25b63f5463d582ef36f77ba5e3711d0d - libv4lconvert/sq905c.c 940250beb5898bf254e7cd1ef9d7950a8db10af6 - libv4lconvert/mr97310a.c 5e177c3a7c157c25c4afcae031e79830237510f6 - libv4lconvert/libv4lconvert.c 1f362080c319355070cf409cfccf28d8c68d024e - libv4lconvert/sn9c2028-decomp.c 703ce22dc98d834490c7aa23ae73b9113e386221 - libv4lconvert/sn9c20x.c 018e503969b2e06a0ea639fc08f03a7476cc15b5 - libv4lconvert/jpeg_memsrcdest.h fb3344cfa8df97688332ee4fd3b17968437e8ad5 - libv4lconvert/helper-funcs.h d378cbdd377027e7528af47362a94ccb1ae15da3 - libv4lconvert/libv4lconvert.export 61710972d4e9bfcd00490c563d1bb5bde5480c9e - libv4lconvert/tinyjpeg.c 231571db9f8caa6fdc68138102029127a6b93812 - libv4lconvert/crop.c d62448a06539ecf6e3daae7faa299b6da8878054 - libv4lconvert/pac207.c 72b65c9f0f3c87dcae86a2afbea65a76f2c6bafd - libv4lconvert/tinyjpeg-internal.h a016f896e0e9f0cd8af7447b52651ed14c5a5b29 - libv4lconvert/jpeg.c 608a4c341a5df9daea647fbddc415cdaf27b0482 - libv4lconvert/spca561-decompress.c b03b32eae024bf59b6ceaf6b6d342383cd0b0673 - libv4lconvert/jl2005bcd.c 803c4d0b9364050eda163452b8792e62e221ab6d - libv4lconvert/tinyjpeg.h 2df34af8f9d747fb0e5c7c71954c788aff1c483f - libv4lconvert/stv0680.c 3e8e6c1fb85e3c4b58c4e9b2b0a223ddc793edcb - libv4lconvert/libv4lconvert.pc.in 02aa2e7d12b72fe4ce79cdf4009da61f35091e94 - libv4lconvert/flip.c 05038ef9efab175322a12d3d6620dba6298aa2a9 - libv4lconvert/spca501.c b2c19c2eac71d39d3fb883cdc159a69c2afa8fd6 - libv4lconvert/ov511-decomp.c 1d9c446cd8a232da87bd79acebc93e018ec72499 - libv4lconvert/jidctflt.c ed215eca170d07a6838be3796aad933adf89ece2 - libv4lconvert/hm12.c 193e9d2c997e21ce8ca02f25050fb8d2d62b6bfd - libv4lconvert/processing/autogain.c c894d4a9b9e0f95be9e7bade4f7f734ae0c6996c - libv4lconvert/processing/libv4lprocessing.c 4158e9c3d21cf0a064b99bdf8571df4f3ba6d5bb - libv4lconvert/processing/whitebalance.c be34baf0d2ce1374c841494ba27ccc352c444e98 - libv4lconvert/processing/gamma.c b48edcb4036ee5f4e77e9cb49dd1b52b1e7f2427 - libv4lconvert/processing/libv4lprocessing.h 967d27c0e09849338a69dc4b5647d1824f2cd2fb - libv4lconvert/processing/libv4lprocessing-priv.h 9f382ff1f2895b926f3596e0a8ae7637b5e6a2ac - libv4lconvert/control/libv4lcontrol.c 8c523bd3838004a4fa00430a38cbc6dbaa47286f - libv4lconvert/control/libv4lcontrol.h 4ce5e891af7857a3504d1350ef13015997dde62a - libv4lconvert/control/libv4lcontrol-priv.h bda0c1296aad2b3b178a76f38e26c20ce3b81233 - include/libv4l1.h a95818658d95c1602f2422e5f1fb54b9ca70536e - include/libv4l2rds.h 2d1932763a064ef1176450b1bb4dd242aa3c77bb - include/libv4lconvert.h 3517bc15e30852ad01ad9966ec7111a16a2263df - include/libv4l2.h 944cd9bc32420e73da3a7d3cb1d0ce707263c9f0 - include/libv4l1-videodev.h 7d9d199f4e6f4ba6f0d669ee5decd74355507137 - include/libv4l-plugin.h cfeaf0c16571e0c64bce50bcb8a6cd8d8c976187 - include/config.h d7d4fd219e36edadc17837bff78eb8323e2a115e - include/libdvbv5/libdvb-version.h 33071176eda60242f39927e572ac6b1c1bab32e2 - include/libdvbv5/desc_event_extended.h 29c2cd2554e4f4285ab8709e6eace38046d8ecdc - include/libdvbv5/desc_t2_delivery.h b42819db457bc6a23324faf259c0db1104741d99 - include/libdvbv5/dvb-scan.h bae10c2fa28bb522e9fc0bb5e4b0128ab6f90e65 - include/libdvbv5/desc_partial_reception.h f797ddac8e1adc6b29750f076df0f3a23cf630eb - include/libdvbv5/dvb-v5-std.h 48079dcae511070a8eeb55b004bd8ac06735ecc7 - include/libdvbv5/desc_ca.h f4eb8b615b7c5a245c76e3f448e6cd848d8cf765 - include/libdvbv5/desc_cable_delivery.h 170a50b570691975e0ff22faffeb0131fc47c7c8 - include/libdvbv5/desc_logical_channel.h c8f11e89456fc078c607d424e887babe72cd3684 - include/libdvbv5/nit.h d39a24d0d0a0fbe732881dd2734b10d842d88de9 - include/libdvbv5/header.h badc03677ddbcfa1d1188ddaaa4c272fccfe4a21 - include/libdvbv5/desc_atsc_service_location.h d3bad046037cad4a95778555021a1a1a6b3040d9 - include/libdvbv5/cat.h a614739513f62affb1059df81c064203d9fe2fcd - include/libdvbv5/desc_ca_identifier.h 6d70f699eb912c974dc06a19f9bdcb7dd0c27932 - include/libdvbv5/desc_service.h 0eda1161b34ca39b8528bc53d05fb0fc7d457f80 - include/libdvbv5/desc_frequency_list.h 22f6b663d50de467539201ecfdb363e9252c88bd - include/libdvbv5/atsc_eit.h 1c1292f060664abf6c12273a41b2bf6f704dd19b - include/libdvbv5/desc_sat.h 22de6de5e65530aa1ab38a2373db128e81983a4c - include/libdvbv5/desc_network_name.h 91178a5945e63c81051b57b7b2842139947a3b39 - include/libdvbv5/desc_extension.h 9ca776ad159cf84b2f68101bf279472741829047 - include/libdvbv5/descriptors.h fa7e8d5e996310e1dd47d5467780d533c8a93ad8 - include/libdvbv5/dvb-dev.h fed6115825c5b23e1e31ff80aab997f0a7b6c3fc - include/libdvbv5/sdt.h 4b892acd2ce77c060b50cf67f5faf9dc9b76edbb - include/libdvbv5/dvb-frontend.h 8b9f9e00f7bcdce58aef1d8d7234567af82e49b8 - include/libdvbv5/dvb-file.h b8a077b8e3c6e337223fc37685d217a81df112f1 - include/libdvbv5/dvb-demux.h 01a0afbe1a4f41cf58f9ce47d65b31e3df7c8680 - include/libdvbv5/pat.h 4a49c8b46947be16356d6355aa36d72d7baa946c - include/libdvbv5/vct.h c83200debc98ff8fa82030d36371a2caa230281a - include/libdvbv5/desc_language.h 21cea15c5d4faff2726f18bdf5b83e2210d472c4 - include/libdvbv5/mpeg_pes.h 825f75350da9fb148acc7d36af513da977105169 - include/libdvbv5/desc_isdbt_delivery.h 8f60bf43907b1eac3c1c2f031cf68a9bdebb3662 - include/libdvbv5/desc_ts_info.h 89cbb75f3e0952e4dfb145fdea776b45e05b7e76 - include/libdvbv5/desc_hierarchy.h 5c80a7ee23d1da2c91f60e79f7292248694b4f65 - include/libdvbv5/crc32.h 93b7b27ccc89e1ad4279eb12560e1dfc3d2ff1eb - include/libdvbv5/dvb-fe.h aeeb75989de4b2ecafa1b2fc5ed30787999eec1b - include/libdvbv5/mpeg_es.h dc684983365ffef353993faad0b105bcb87f4218 - include/libdvbv5/desc_event_short.h 5e3be50d1292109d59c80f920ba1b7a4bcbbdf56 - include/libdvbv5/eit.h f95a0206952db4cce561455accad66a37f9a4104 - include/libdvbv5/mgt.h 88f8c78bbaf22b345e2ccb68e9b787e649dac2c1 - include/libdvbv5/libdvb-version.h.in 74a66644980a66adeba21ecc40ebefa2b4480e25 - include/libdvbv5/pmt.h 7671f125c6f61eef85f55eb314097435b3772431 - include/libdvbv5/dvb-sat.h 26fd40a10548cdb9bd4aafdda4486f9d39fd5c9e - include/libdvbv5/countries.h 65db3beaf2ec19a43a870b2759e6aecb15a95c7b - include/libdvbv5/atsc_header.h 149f7eb3c71b8f65127d3c4f2143080b115697e5 - include/libdvbv5/desc_terrestrial_delivery.h 708af2b77b2c94ee9cf593b31e20471c80ea556b - include/libdvbv5/mpeg_ts.h ba205468e43ca16edf1ebec59dce9822044c1064 - include/libdvbv5/desc_registration_id.h e70b24d8d1f3a248735c2d724d3b92c49b7aaba5 - include/libdvbv5/dvb-log.h 2d0557eadd4cff02ab52e26778d35b6c34f09158 - libv4l2/libv4l2-priv.h 487af43db163be6d3604371b9a504c1df2a9bf6c - libv4l2/v4l2-plugin-android.c 0ac38b46fa1659db4c05660205f212389295e7ff - libv4l2/Makefile 8ac3789333a6cd18e7f35d3b66a8a4d0293feb78 - libv4l2/Makefile.dGPU fdd6e5e27aa8b41d5da77cb3b9be3fc3b8a44763 - libv4l2/libv4l2.export 1d37e5ea9231e7e0eea7d1a02938c6d1ae8ba791 - libv4l2/Makefile.in 650b8919b8e10f871be161dc5056fbe30618282c - libv4l2/v4l2-plugin.c d4c7daee644a35244ac8a5e1009a3aeb1d4fd3da - libv4l2/Makefile.am 87856c7113d150dceb254b5d548f942e7fcaf8f1 - libv4l2/libv4l2.c d11ec5b8ce8390a72fd61457d7b8667378311191 - libv4l2/log.c cbcee4426c19c168c6f49d04af3a0b2e30c0b681 - libv4l2/libv4l2.pc.in 55bb16d05817a3ecf076174175b2ca5b56e729d8 - libv4l2/v4l2convert.c Change-Id: I4133a070aa0ca5235776128e56699fed86e8522e
This commit is contained in:
68
libv4l2/Makefile
Normal file
68
libv4l2/Makefile
Normal file
@@ -0,0 +1,68 @@
|
||||
###############################################################################
|
||||
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
###############################################################################
|
||||
|
||||
SO_NAME := libnvv4l2.so
|
||||
|
||||
SRCS := libv4l2.c log.c v4l2convert.c v4l2-plugin.c
|
||||
|
||||
INCLUDES += -I./ -I../include
|
||||
|
||||
OBJS := $(SRCS:.c=.o)
|
||||
|
||||
CFLAGS := -fPIC
|
||||
|
||||
MACHINE = $(shell uname -m)
|
||||
|
||||
ifeq ($(MACHINE),x86_64)
|
||||
CFLAGS += -DLIBV4L2_PLUGIN_DIR_PATH_X86
|
||||
DEST_DIR ?= /opt/nvidia/deepstream/deepstream-4.0/lib/
|
||||
SYM_LINK_DIR = $(DEST_DIR)
|
||||
else
|
||||
DEST_DIR ?= /usr/lib/$(MACHINE)-linux-gnu/nvidia
|
||||
SYM_LINK_DIR = $(shell realpath $(DEST_DIR)/..)
|
||||
endif
|
||||
|
||||
LDFLAGS := -L$(DEST_DIR) -Wl,-soname,libv4l2.so.0
|
||||
|
||||
LIBS := -lv4lconvert -ldl
|
||||
|
||||
all: $(SO_NAME)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c $< $(CFLAGS) $(INCLUDES) -o $@
|
||||
|
||||
$(SO_NAME): $(OBJS)
|
||||
$(CC) -shared -o $(SO_NAME) $(OBJS) $(LIBS) $(LDFLAGS)
|
||||
|
||||
.PHONY: install
|
||||
install: $(SO_NAME)
|
||||
cp -vp $(SO_NAME) $(DEST_DIR)
|
||||
if [ "$(MACHINE)" = "aarch64" ]; then \
|
||||
ln -sf nvidia/$(SO_NAME) $(SYM_LINK_DIR)/libv4l2.so.0.0.999999 ; \
|
||||
else \
|
||||
ln -sf $(SO_NAME) $(SYM_LINK_DIR)/libv4l2.so.0.0.999999 ; \
|
||||
fi
|
||||
ln -sf libv4l2.so.0.0.999999 \
|
||||
$(SYM_LINK_DIR)/libv4l2.so
|
||||
ln -sf libv4l2.so.0.0.999999 \
|
||||
${SYM_LINK_DIR}/libv4l2.so.0
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf $(OBJS) $(SO_NAME)
|
||||
32
libv4l2/Makefile.am
Normal file
32
libv4l2/Makefile.am
Normal file
@@ -0,0 +1,32 @@
|
||||
if WITH_DYN_LIBV4L
|
||||
lib_LTLIBRARIES = libv4l2.la
|
||||
include_HEADERS = ../include/libv4l2.h ../include/libv4l-plugin.h
|
||||
pkgconfig_DATA = libv4l2.pc
|
||||
LIBV4L2_VERSION = -version-info 0
|
||||
if WITH_V4L_WRAPPERS
|
||||
libv4l2priv_LTLIBRARIES = v4l2convert.la
|
||||
|
||||
install-exec-hook:
|
||||
$(mkdir_p) $(DESTDIR)/$(libdir)
|
||||
(cd $(DESTDIR)/$(libdir) && rm -f v4l2convert.so && $(LN_S) $(libv4l2subdir)/v4l2convert.so v4l2convert.so)
|
||||
|
||||
endif
|
||||
else
|
||||
noinst_LTLIBRARIES = libv4l2.la
|
||||
endif
|
||||
|
||||
libv4l2_la_SOURCES = libv4l2.c log.c libv4l2-priv.h
|
||||
if WITH_V4L_PLUGINS
|
||||
libv4l2_la_SOURCES += v4l2-plugin.c
|
||||
endif
|
||||
|
||||
libv4l2_la_CPPFLAGS = $(CFLAG_VISIBILITY) $(ENFORCE_LIBV4L_STATIC)
|
||||
libv4l2_la_LDFLAGS = $(LIBV4L2_VERSION) -lpthread $(DLOPEN_LIBS) $(ENFORCE_LIBV4L_STATIC)
|
||||
libv4l2_la_LIBADD = ../libv4lconvert/libv4lconvert.la
|
||||
|
||||
v4l2convert_la_SOURCES = v4l2convert.c
|
||||
v4l2convert_la_LIBADD = libv4l2.la
|
||||
v4l2convert_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
|
||||
v4l2convert_la_LIBTOOLFLAGS = --tag=disable-static
|
||||
|
||||
EXTRA_DIST = Android.mk v4l2-plugin-android.c
|
||||
38
libv4l2/Makefile.dGPU
Normal file
38
libv4l2/Makefile.dGPU
Normal file
@@ -0,0 +1,38 @@
|
||||
###############################################################################
|
||||
#
|
||||
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
# SPDX-License-Identifier: LicenseRef-NvidiaProprietary
|
||||
#
|
||||
# NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
|
||||
# property and proprietary rights in and to this material, related
|
||||
# documentation and any modifications thereto. Any use, reproduction,
|
||||
# disclosure or distribution of this material and related documentation
|
||||
# without an express license agreement from NVIDIA CORPORATION or
|
||||
# its affiliates is strictly prohibited.
|
||||
#
|
||||
###############################################################################
|
||||
CC:=gcc
|
||||
TARGET_NAME:= libnvv4l2.so
|
||||
|
||||
SRCS := libv4l2.c log.c v4l2convert.c v4l2-plugin.c
|
||||
|
||||
INC_PATHS := ./ ../include ../../include
|
||||
|
||||
CFLAGS := -fPIC
|
||||
CFLAGS += -DLIBV4L2_PLUGIN_DIR_PATH_X86
|
||||
|
||||
IGNORE_DS_PACKAGE_NAMING:=1
|
||||
|
||||
LDFLAGS:= -shared
|
||||
LIBS:= -lv4lconvert -ldl -Wl,-soname,libv4l2.so.0
|
||||
|
||||
#IS_V4L2_LIB:=1
|
||||
PACKAGE_BINARY_IN_DS:=1
|
||||
|
||||
BUILD_DIR:=../../../../../deepstream/sdk/build/libs/libv4l/
|
||||
|
||||
include ../../../../../deepstream/sdk/Rules.mk
|
||||
|
||||
install::
|
||||
ln -sf $(INSTALL_DIR)/$(TARGET_NAME) /usr/lib/x86_64-linux-gnu/libv4l2.so.0.0.99999
|
||||
ldconfig
|
||||
966
libv4l2/Makefile.in
Normal file
966
libv4l2/Makefile.in
Normal file
@@ -0,0 +1,966 @@
|
||||
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
@WITH_V4L_PLUGINS_TRUE@am__append_1 = v4l2-plugin.c
|
||||
subdir = lib/libv4l2
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
|
||||
$(top_srcdir)/m4/ax_prog_doxygen.m4 \
|
||||
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/visibility.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__include_HEADERS_DIST) \
|
||||
$(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES = libv4l2.pc
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libv4l2privdir)" \
|
||||
"$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES) $(libv4l2priv_LTLIBRARIES) \
|
||||
$(noinst_LTLIBRARIES)
|
||||
libv4l2_la_DEPENDENCIES = ../libv4lconvert/libv4lconvert.la
|
||||
am__libv4l2_la_SOURCES_DIST = libv4l2.c log.c libv4l2-priv.h \
|
||||
v4l2-plugin.c
|
||||
@WITH_V4L_PLUGINS_TRUE@am__objects_1 = libv4l2_la-v4l2-plugin.lo
|
||||
am_libv4l2_la_OBJECTS = libv4l2_la-libv4l2.lo libv4l2_la-log.lo \
|
||||
$(am__objects_1)
|
||||
libv4l2_la_OBJECTS = $(am_libv4l2_la_OBJECTS)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
libv4l2_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(libv4l2_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
@WITH_DYN_LIBV4L_FALSE@am_libv4l2_la_rpath =
|
||||
@WITH_DYN_LIBV4L_TRUE@am_libv4l2_la_rpath = -rpath $(libdir)
|
||||
v4l2convert_la_DEPENDENCIES = libv4l2.la
|
||||
am_v4l2convert_la_OBJECTS = v4l2convert_la-v4l2convert.lo
|
||||
v4l2convert_la_OBJECTS = $(am_v4l2convert_la_OBJECTS)
|
||||
v4l2convert_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
|
||||
$(v4l2convert_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
|
||||
$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(v4l2convert_la_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
@WITH_DYN_LIBV4L_TRUE@@WITH_V4L_WRAPPERS_TRUE@am_v4l2convert_la_rpath = \
|
||||
@WITH_DYN_LIBV4L_TRUE@@WITH_V4L_WRAPPERS_TRUE@ -rpath \
|
||||
@WITH_DYN_LIBV4L_TRUE@@WITH_V4L_WRAPPERS_TRUE@ $(libv4l2privdir)
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
|
||||
am__maybe_remake_depfiles = depfiles
|
||||
am__depfiles_remade = ./$(DEPDIR)/libv4l2_la-libv4l2.Plo \
|
||||
./$(DEPDIR)/libv4l2_la-log.Plo \
|
||||
./$(DEPDIR)/libv4l2_la-v4l2-plugin.Plo \
|
||||
./$(DEPDIR)/v4l2convert_la-v4l2convert.Plo
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = $(libv4l2_la_SOURCES) $(v4l2convert_la_SOURCES)
|
||||
DIST_SOURCES = $(am__libv4l2_la_SOURCES_DIST) \
|
||||
$(v4l2convert_la_SOURCES)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
DATA = $(pkgconfig_DATA)
|
||||
am__include_HEADERS_DIST = ../include/libv4l2.h \
|
||||
../include/libv4l-plugin.h
|
||||
HEADERS = $(include_HEADERS)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libv4l2.pc.in \
|
||||
$(top_srcdir)/build-aux/depcomp
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALSA_CFLAGS = @ALSA_CFLAGS@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
ARGP_LIBS = @ARGP_LIBS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
|
||||
CLANG = @CLANG@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CSCOPE = @CSCOPE@
|
||||
CTAGS = @CTAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DLOPEN_LIBS = @DLOPEN_LIBS@
|
||||
DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
DX_CONFIG = @DX_CONFIG@
|
||||
DX_DOCDIR = @DX_DOCDIR@
|
||||
DX_DOT = @DX_DOT@
|
||||
DX_DOXYGEN = @DX_DOXYGEN@
|
||||
DX_DVIPS = @DX_DVIPS@
|
||||
DX_EGREP = @DX_EGREP@
|
||||
DX_ENV = @DX_ENV@
|
||||
DX_FLAG_chi = @DX_FLAG_chi@
|
||||
DX_FLAG_chm = @DX_FLAG_chm@
|
||||
DX_FLAG_doc = @DX_FLAG_doc@
|
||||
DX_FLAG_dot = @DX_FLAG_dot@
|
||||
DX_FLAG_html = @DX_FLAG_html@
|
||||
DX_FLAG_man = @DX_FLAG_man@
|
||||
DX_FLAG_pdf = @DX_FLAG_pdf@
|
||||
DX_FLAG_ps = @DX_FLAG_ps@
|
||||
DX_FLAG_rtf = @DX_FLAG_rtf@
|
||||
DX_FLAG_xml = @DX_FLAG_xml@
|
||||
DX_HHC = @DX_HHC@
|
||||
DX_LATEX = @DX_LATEX@
|
||||
DX_MAKEINDEX = @DX_MAKEINDEX@
|
||||
DX_PDFLATEX = @DX_PDFLATEX@
|
||||
DX_PERL = @DX_PERL@
|
||||
DX_PROJECT = @DX_PROJECT@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
ENFORCE_LIBDVBV5_STATIC = @ENFORCE_LIBDVBV5_STATIC@
|
||||
ENFORCE_LIBV4L_STATIC = @ENFORCE_LIBV4L_STATIC@
|
||||
ETAGS = @ETAGS@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
|
||||
GIT_COMMIT_CNT = @GIT_COMMIT_CNT@
|
||||
GIT_COMMIT_DATE = @GIT_COMMIT_DATE@
|
||||
GIT_SHA = @GIT_SHA@
|
||||
GLU_CFLAGS = @GLU_CFLAGS@
|
||||
GLU_LIBS = @GLU_LIBS@
|
||||
GL_CFLAGS = @GL_CFLAGS@
|
||||
GL_LIBS = @GL_LIBS@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
GREP = @GREP@
|
||||
HAVE_VISIBILITY = @HAVE_VISIBILITY@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
|
||||
IR_KEYTABLE_SYSTEM_DIR = @IR_KEYTABLE_SYSTEM_DIR@
|
||||
IR_KEYTABLE_USER_DIR = @IR_KEYTABLE_USER_DIR@
|
||||
JPEG_LIBS = @JPEG_LIBS@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBBPF_CFLAGS = @LIBBPF_CFLAGS@
|
||||
LIBBPF_LIBS = @LIBBPF_LIBS@
|
||||
LIBDVBV5_DOMAIN = @LIBDVBV5_DOMAIN@
|
||||
LIBELF_CFLAGS = @LIBELF_CFLAGS@
|
||||
LIBELF_LIBS = @LIBELF_LIBS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@
|
||||
LIBUDEV_LIBS = @LIBUDEV_LIBS@
|
||||
LIBV4L1_PRIV_DIR = @LIBV4L1_PRIV_DIR@
|
||||
LIBV4L2_PLUGIN_DIR = @LIBV4L2_PLUGIN_DIR@
|
||||
LIBV4L2_PRIV_DIR = @LIBV4L2_PRIV_DIR@
|
||||
LIBV4LCONVERT_PRIV_DIR = @LIBV4LCONVERT_PRIV_DIR@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAINT = @MAINT@
|
||||
MAJOR = @MAJOR@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MINOR = @MINOR@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MOC = @MOC@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATCH = @PATCH@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
POSUB = @POSUB@
|
||||
PTHREAD_CC = @PTHREAD_CC@
|
||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||
PTHREAD_CXX = @PTHREAD_CXX@
|
||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||
QT5GL_CFLAGS = @QT5GL_CFLAGS@
|
||||
QT5GL_LIBS = @QT5GL_LIBS@
|
||||
QT5_CFLAGS = @QT5_CFLAGS@
|
||||
QT5_LIBS = @QT5_LIBS@
|
||||
QTGL_CFLAGS = @QTGL_CFLAGS@
|
||||
QTGL_LIBS = @QTGL_LIBS@
|
||||
QT_CFLAGS = @QT_CFLAGS@
|
||||
QT_LIBS = @QT_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
RCC = @RCC@
|
||||
SDL2_CFLAGS = @SDL2_CFLAGS@
|
||||
SDL2_LIBS = @SDL2_LIBS@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
UIC = @UIC@
|
||||
USE_NLS = @USE_NLS@
|
||||
V4L_UTILS_VERSION = @V4L_UTILS_VERSION@
|
||||
VERSION = @VERSION@
|
||||
X11_CFLAGS = @X11_CFLAGS@
|
||||
X11_LIBS = @X11_LIBS@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XGETTEXT_015 = @XGETTEXT_015@
|
||||
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
ax_pthread_config = @ax_pthread_config@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
gconvsysdir = @gconvsysdir@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
keytablesystemdir = @keytablesystemdir@
|
||||
keytableuserdir = @keytableuserdir@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
libudev_CFLAGS = @libudev_CFLAGS@
|
||||
libudev_LIBS = @libudev_LIBS@
|
||||
libv4l1privdir = @libv4l1privdir@
|
||||
libv4l1subdir = @libv4l1subdir@
|
||||
libv4l2plugindir = @libv4l2plugindir@
|
||||
libv4l2privdir = @libv4l2privdir@
|
||||
libv4l2subdir = @libv4l2subdir@
|
||||
libv4lconvertprivdir = @libv4lconvertprivdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
pkgconfigdir = @pkgconfigdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
systemdsystemunitdir = @systemdsystemunitdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
udevrulesdir = @udevrulesdir@
|
||||
@WITH_DYN_LIBV4L_TRUE@lib_LTLIBRARIES = libv4l2.la
|
||||
@WITH_DYN_LIBV4L_TRUE@include_HEADERS = ../include/libv4l2.h ../include/libv4l-plugin.h
|
||||
@WITH_DYN_LIBV4L_TRUE@pkgconfig_DATA = libv4l2.pc
|
||||
@WITH_DYN_LIBV4L_TRUE@LIBV4L2_VERSION = -version-info 0
|
||||
@WITH_DYN_LIBV4L_TRUE@@WITH_V4L_WRAPPERS_TRUE@libv4l2priv_LTLIBRARIES = v4l2convert.la
|
||||
@WITH_DYN_LIBV4L_FALSE@noinst_LTLIBRARIES = libv4l2.la
|
||||
libv4l2_la_SOURCES = libv4l2.c log.c libv4l2-priv.h $(am__append_1)
|
||||
libv4l2_la_CPPFLAGS = $(CFLAG_VISIBILITY) $(ENFORCE_LIBV4L_STATIC)
|
||||
libv4l2_la_LDFLAGS = $(LIBV4L2_VERSION) -lpthread $(DLOPEN_LIBS) $(ENFORCE_LIBV4L_STATIC)
|
||||
libv4l2_la_LIBADD = ../libv4lconvert/libv4lconvert.la
|
||||
v4l2convert_la_SOURCES = v4l2convert.c
|
||||
v4l2convert_la_LIBADD = libv4l2.la
|
||||
v4l2convert_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
|
||||
v4l2convert_la_LIBTOOLFLAGS = --tag=disable-static
|
||||
EXTRA_DIST = Android.mk v4l2-plugin-android.c
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/libv4l2/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu lib/libv4l2/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
libv4l2.pc: $(top_builddir)/config.status $(srcdir)/libv4l2.pc.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
list2=; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
list2="$$list2 $$p"; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
test -z "$$list2" || { \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
|
||||
}
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; \
|
||||
locs=`for p in $$list; do echo $$p; done | \
|
||||
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
||||
sort -u`; \
|
||||
test -z "$$locs" || { \
|
||||
echo rm -f $${locs}; \
|
||||
rm -f $${locs}; \
|
||||
}
|
||||
|
||||
install-libv4l2privLTLIBRARIES: $(libv4l2priv_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(libv4l2priv_LTLIBRARIES)'; test -n "$(libv4l2privdir)" || list=; \
|
||||
list2=; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
list2="$$list2 $$p"; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
test -z "$$list2" || { \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(libv4l2privdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(libv4l2privdir)" || exit 1; \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libv4l2privdir)'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libv4l2privdir)"; \
|
||||
}
|
||||
|
||||
uninstall-libv4l2privLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(libv4l2priv_LTLIBRARIES)'; test -n "$(libv4l2privdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libv4l2privdir)/$$f'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libv4l2privdir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-libv4l2privLTLIBRARIES:
|
||||
-test -z "$(libv4l2priv_LTLIBRARIES)" || rm -f $(libv4l2priv_LTLIBRARIES)
|
||||
@list='$(libv4l2priv_LTLIBRARIES)'; \
|
||||
locs=`for p in $$list; do echo $$p; done | \
|
||||
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
||||
sort -u`; \
|
||||
test -z "$$locs" || { \
|
||||
echo rm -f $${locs}; \
|
||||
rm -f $${locs}; \
|
||||
}
|
||||
|
||||
clean-noinstLTLIBRARIES:
|
||||
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
|
||||
@list='$(noinst_LTLIBRARIES)'; \
|
||||
locs=`for p in $$list; do echo $$p; done | \
|
||||
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
||||
sort -u`; \
|
||||
test -z "$$locs" || { \
|
||||
echo rm -f $${locs}; \
|
||||
rm -f $${locs}; \
|
||||
}
|
||||
|
||||
libv4l2.la: $(libv4l2_la_OBJECTS) $(libv4l2_la_DEPENDENCIES) $(EXTRA_libv4l2_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(libv4l2_la_LINK) $(am_libv4l2_la_rpath) $(libv4l2_la_OBJECTS) $(libv4l2_la_LIBADD) $(LIBS)
|
||||
|
||||
v4l2convert.la: $(v4l2convert_la_OBJECTS) $(v4l2convert_la_DEPENDENCIES) $(EXTRA_v4l2convert_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(v4l2convert_la_LINK) $(am_v4l2convert_la_rpath) $(v4l2convert_la_OBJECTS) $(v4l2convert_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libv4l2_la-libv4l2.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libv4l2_la-log.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libv4l2_la-v4l2-plugin.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v4l2convert_la-v4l2convert.Plo@am__quote@ # am--include-marker
|
||||
|
||||
$(am__depfiles_remade):
|
||||
@$(MKDIR_P) $(@D)
|
||||
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
|
||||
|
||||
am--depfiles: $(am__depfiles_remade)
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
libv4l2_la-libv4l2.lo: libv4l2.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libv4l2_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libv4l2_la-libv4l2.lo -MD -MP -MF $(DEPDIR)/libv4l2_la-libv4l2.Tpo -c -o libv4l2_la-libv4l2.lo `test -f 'libv4l2.c' || echo '$(srcdir)/'`libv4l2.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libv4l2_la-libv4l2.Tpo $(DEPDIR)/libv4l2_la-libv4l2.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libv4l2.c' object='libv4l2_la-libv4l2.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libv4l2_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libv4l2_la-libv4l2.lo `test -f 'libv4l2.c' || echo '$(srcdir)/'`libv4l2.c
|
||||
|
||||
libv4l2_la-log.lo: log.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libv4l2_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libv4l2_la-log.lo -MD -MP -MF $(DEPDIR)/libv4l2_la-log.Tpo -c -o libv4l2_la-log.lo `test -f 'log.c' || echo '$(srcdir)/'`log.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libv4l2_la-log.Tpo $(DEPDIR)/libv4l2_la-log.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='log.c' object='libv4l2_la-log.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libv4l2_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libv4l2_la-log.lo `test -f 'log.c' || echo '$(srcdir)/'`log.c
|
||||
|
||||
libv4l2_la-v4l2-plugin.lo: v4l2-plugin.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libv4l2_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libv4l2_la-v4l2-plugin.lo -MD -MP -MF $(DEPDIR)/libv4l2_la-v4l2-plugin.Tpo -c -o libv4l2_la-v4l2-plugin.lo `test -f 'v4l2-plugin.c' || echo '$(srcdir)/'`v4l2-plugin.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libv4l2_la-v4l2-plugin.Tpo $(DEPDIR)/libv4l2_la-v4l2-plugin.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='v4l2-plugin.c' object='libv4l2_la-v4l2-plugin.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libv4l2_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libv4l2_la-v4l2-plugin.lo `test -f 'v4l2-plugin.c' || echo '$(srcdir)/'`v4l2-plugin.c
|
||||
|
||||
v4l2convert_la-v4l2convert.lo: v4l2convert.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(v4l2convert_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT v4l2convert_la-v4l2convert.lo -MD -MP -MF $(DEPDIR)/v4l2convert_la-v4l2convert.Tpo -c -o v4l2convert_la-v4l2convert.lo `test -f 'v4l2convert.c' || echo '$(srcdir)/'`v4l2convert.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/v4l2convert_la-v4l2convert.Tpo $(DEPDIR)/v4l2convert_la-v4l2convert.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='v4l2convert.c' object='v4l2convert_la-v4l2convert.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(v4l2convert_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v4l2convert_la-v4l2convert.lo `test -f 'v4l2convert.c' || echo '$(srcdir)/'`v4l2convert.c
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-pkgconfigDATA: $(pkgconfig_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-pkgconfigDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
|
||||
$(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
|
||||
install-libv4l2privLTLIBRARIES: install-libLTLIBRARIES
|
||||
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libv4l2privdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
@WITH_DYN_LIBV4L_FALSE@install-exec-hook:
|
||||
@WITH_V4L_WRAPPERS_FALSE@install-exec-hook:
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
clean-libv4l2privLTLIBRARIES clean-noinstLTLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f ./$(DEPDIR)/libv4l2_la-libv4l2.Plo
|
||||
-rm -f ./$(DEPDIR)/libv4l2_la-log.Plo
|
||||
-rm -f ./$(DEPDIR)/libv4l2_la-v4l2-plugin.Plo
|
||||
-rm -f ./$(DEPDIR)/v4l2convert_la-v4l2convert.Plo
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-includeHEADERS install-libv4l2privLTLIBRARIES \
|
||||
install-pkgconfigDATA
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f ./$(DEPDIR)/libv4l2_la-libv4l2.Plo
|
||||
-rm -f ./$(DEPDIR)/libv4l2_la-log.Plo
|
||||
-rm -f ./$(DEPDIR)/libv4l2_la-v4l2-plugin.Plo
|
||||
-rm -f ./$(DEPDIR)/v4l2convert_la-v4l2convert.Plo
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \
|
||||
uninstall-libv4l2privLTLIBRARIES uninstall-pkgconfigDATA
|
||||
|
||||
.MAKE: install-am install-exec-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
|
||||
clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
clean-libv4l2privLTLIBRARIES clean-noinstLTLIBRARIES \
|
||||
cscopelist-am ctags ctags-am distclean distclean-compile \
|
||||
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-exec-hook install-html \
|
||||
install-html-am install-includeHEADERS install-info \
|
||||
install-info-am install-libLTLIBRARIES \
|
||||
install-libv4l2privLTLIBRARIES install-man install-pdf \
|
||||
install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
|
||||
uninstall-includeHEADERS uninstall-libLTLIBRARIES \
|
||||
uninstall-libv4l2privLTLIBRARIES uninstall-pkgconfigDATA
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
@WITH_DYN_LIBV4L_TRUE@@WITH_V4L_WRAPPERS_TRUE@install-exec-hook:
|
||||
@WITH_DYN_LIBV4L_TRUE@@WITH_V4L_WRAPPERS_TRUE@ $(mkdir_p) $(DESTDIR)/$(libdir)
|
||||
@WITH_DYN_LIBV4L_TRUE@@WITH_V4L_WRAPPERS_TRUE@ (cd $(DESTDIR)/$(libdir) && rm -f v4l2convert.so && $(LN_S) $(libv4l2subdir)/v4l2convert.so v4l2convert.so)
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
136
libv4l2/libv4l2-priv.h
Normal file
136
libv4l2/libv4l2-priv.h
Normal file
@@ -0,0 +1,136 @@
|
||||
/*
|
||||
# (C) 2008 Hans de Goede <hdegoede@redhat.com>
|
||||
#
|
||||
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
|
||||
*/
|
||||
|
||||
#ifndef __LIBV4L2_PRIV_H
|
||||
#define __LIBV4L2_PRIV_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
#include <libv4lconvert.h> /* includes videodev2.h for us */
|
||||
|
||||
#include "../libv4lconvert/libv4lsyscall-priv.h"
|
||||
|
||||
#define V4L2_MAX_DEVICES 1024
|
||||
/* Warning when making this larger the frame_queued and frame_mapped members of
|
||||
the v4l2_dev_info struct can no longer be a bitfield, so the code needs to
|
||||
be adjusted! */
|
||||
#define V4L2_MAX_NO_FRAMES 32
|
||||
#define V4L2_DEFAULT_NREADBUFFERS 4
|
||||
#define V4L2_IGNORE_FIRST_FRAME_ERRORS 3
|
||||
#define V4L2_DEFAULT_FPS 30
|
||||
|
||||
#define V4L2_LOG_ERR(...) \
|
||||
do { \
|
||||
if (v4l2_log_file) { \
|
||||
fprintf(v4l2_log_file, "libv4l2: error " __VA_ARGS__); \
|
||||
fflush(v4l2_log_file); \
|
||||
} else \
|
||||
fprintf(stderr, "libv4l2: error " __VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#define V4L2_PERROR(format, ...) \
|
||||
do { \
|
||||
if (errno == ENODEV) { \
|
||||
devices[index].gone = 1;\
|
||||
break; \
|
||||
} \
|
||||
V4L2_LOG_ERR(format ": %s\n", ##__VA_ARGS__, strerror(errno)); \
|
||||
} while (0)
|
||||
|
||||
#define V4L2_LOG_WARN(...) \
|
||||
do { \
|
||||
if (v4l2_log_file) { \
|
||||
fprintf(v4l2_log_file, "libv4l2: warning " __VA_ARGS__); \
|
||||
fflush(v4l2_log_file); \
|
||||
} else \
|
||||
fprintf(stderr, "libv4l2: warning " __VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#define V4L2_LOG(...) \
|
||||
do { \
|
||||
if (v4l2_log_file) { \
|
||||
fprintf(v4l2_log_file, "libv4l2: " __VA_ARGS__); \
|
||||
fflush(v4l2_log_file); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
struct v4l2_dev_info {
|
||||
int fd;
|
||||
int flags;
|
||||
int open_count;
|
||||
int gone; /* Set to 1 when a device is detached (ENODEV encountered) */
|
||||
long page_size;
|
||||
/* actual format of the cam */
|
||||
struct v4l2_format src_fmt;
|
||||
/* fmt as seen by the application (iow after conversion) */
|
||||
struct v4l2_format dest_fmt;
|
||||
pthread_mutex_t stream_lock;
|
||||
unsigned int no_frames;
|
||||
unsigned int nreadbuffers;
|
||||
int fps;
|
||||
int first_frame;
|
||||
struct v4lconvert_data *convert;
|
||||
unsigned char *convert_mmap_buf;
|
||||
size_t convert_mmap_buf_size;
|
||||
size_t convert_mmap_frame_size;
|
||||
/* Frame bookkeeping is only done when in read or mmap-conversion mode */
|
||||
unsigned char *frame_pointers[V4L2_MAX_NO_FRAMES];
|
||||
int frame_sizes[V4L2_MAX_NO_FRAMES];
|
||||
int frame_queued; /* 1 status bit per frame */
|
||||
int frame_info_generation;
|
||||
/* mapping tracking of our fake (converting mmap) frame buffers */
|
||||
unsigned char frame_map_count[V4L2_MAX_NO_FRAMES];
|
||||
/* buffer when doing conversion and using read() for read() */
|
||||
int readbuf_size;
|
||||
unsigned char *readbuf;
|
||||
/* plugin info */
|
||||
void *plugin_library;
|
||||
void *dev_ops_priv;
|
||||
const struct libv4l_dev_ops *dev_ops;
|
||||
};
|
||||
|
||||
/* From v4l2-plugin.c */
|
||||
#if defined(HAVE_V4L_PLUGINS)
|
||||
void v4l2_plugin_init(int fd, void **plugin_lib_ret, void **plugin_priv_ret,
|
||||
const struct libv4l_dev_ops **dev_ops_ret);
|
||||
void v4l2_plugin_cleanup(void *plugin_lib, void *plugin_priv,
|
||||
const struct libv4l_dev_ops *dev_ops);
|
||||
#else
|
||||
static inline void v4l2_plugin_init(int fd, void **plugin_lib_ret, void **plugin_priv_ret,
|
||||
const struct libv4l_dev_ops **dev_ops_ret)
|
||||
{
|
||||
*dev_ops_ret = v4lconvert_get_default_dev_ops();
|
||||
*plugin_lib_ret = NULL;
|
||||
*plugin_priv_ret = NULL;
|
||||
}
|
||||
static inline void v4l2_plugin_cleanup(void *plugin_lib, void *plugin_priv,
|
||||
const struct libv4l_dev_ops *dev_ops)
|
||||
{
|
||||
}
|
||||
#endif /* WITH_V4L_PLUGINS */
|
||||
|
||||
/* From log.c */
|
||||
extern const char *v4l2_ioctls[];
|
||||
void v4l2_log_ioctl(unsigned long int request, void *arg, int result);
|
||||
|
||||
#endif
|
||||
1787
libv4l2/libv4l2.c
Normal file
1787
libv4l2/libv4l2.c
Normal file
File diff suppressed because it is too large
Load Diff
14
libv4l2/libv4l2.export
Normal file
14
libv4l2/libv4l2.export
Normal file
@@ -0,0 +1,14 @@
|
||||
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
v4l2_close
|
||||
v4l2_dup
|
||||
v4l2_fd_open
|
||||
v4l2_get_control
|
||||
v4l2_ioctl
|
||||
v4l2_log_file
|
||||
v4l2_mmap
|
||||
v4l2_munmap
|
||||
v4l2_open
|
||||
v4l2_read
|
||||
v4l2_set_control
|
||||
v4l2_write
|
||||
12
libv4l2/libv4l2.pc.in
Normal file
12
libv4l2/libv4l2.pc.in
Normal file
@@ -0,0 +1,12 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
includedir=@includedir@
|
||||
libdir=@libdir@
|
||||
|
||||
Name: libv4l2
|
||||
Description: v4l2 device access library
|
||||
Version: @PACKAGE_VERSION@
|
||||
Requires.private: libv4lconvert
|
||||
Libs: -L${libdir} -lv4l2
|
||||
Libs.private: -lpthread
|
||||
Cflags: -I${includedir}
|
||||
263
libv4l2/log.c
Normal file
263
libv4l2/log.c
Normal file
@@ -0,0 +1,263 @@
|
||||
/*
|
||||
# (C) 2008 Elmar Kleijn <elmar_kleijn@hotmail.com>
|
||||
# (C) 2008 Sjoerd Piepenbrink <need4weed@gmail.com>
|
||||
# (C) 2008 Hans de Goede <hdegoede@redhat.com>
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
|
||||
*/
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <android-config.h>
|
||||
#else
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "../libv4lconvert/libv4lsyscall-priv.h"
|
||||
#if defined(__OpenBSD__)
|
||||
#include <sys/videoio.h>
|
||||
#else
|
||||
#include <linux/videodev2.h>
|
||||
#endif
|
||||
#include "libv4l2.h"
|
||||
#include "libv4l2-priv.h"
|
||||
|
||||
#define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
|
||||
|
||||
FILE *v4l2_log_file = NULL;
|
||||
|
||||
const char *v4l2_ioctls[] = {
|
||||
/* start v4l2 ioctls */
|
||||
[_IOC_NR(VIDIOC_QUERYCAP)] = "VIDIOC_QUERYCAP",
|
||||
[_IOC_NR(VIDIOC_ENUM_FMT)] = "VIDIOC_ENUM_FMT",
|
||||
[_IOC_NR(VIDIOC_G_FMT)] = "VIDIOC_G_FMT",
|
||||
[_IOC_NR(VIDIOC_S_FMT)] = "VIDIOC_S_FMT",
|
||||
[_IOC_NR(VIDIOC_REQBUFS)] = "VIDIOC_REQBUFS",
|
||||
[_IOC_NR(VIDIOC_QUERYBUF)] = "VIDIOC_QUERYBUF",
|
||||
[_IOC_NR(VIDIOC_G_FBUF)] = "VIDIOC_G_FBUF",
|
||||
[_IOC_NR(VIDIOC_S_FBUF)] = "VIDIOC_S_FBUF",
|
||||
[_IOC_NR(VIDIOC_OVERLAY)] = "VIDIOC_OVERLAY",
|
||||
[_IOC_NR(VIDIOC_QBUF)] = "VIDIOC_QBUF",
|
||||
[_IOC_NR(VIDIOC_DQBUF)] = "VIDIOC_DQBUF",
|
||||
[_IOC_NR(VIDIOC_STREAMON)] = "VIDIOC_STREAMON",
|
||||
[_IOC_NR(VIDIOC_STREAMOFF)] = "VIDIOC_STREAMOFF",
|
||||
[_IOC_NR(VIDIOC_G_PARM)] = "VIDIOC_G_PARM",
|
||||
[_IOC_NR(VIDIOC_S_PARM)] = "VIDIOC_S_PARM",
|
||||
[_IOC_NR(VIDIOC_G_STD)] = "VIDIOC_G_STD",
|
||||
[_IOC_NR(VIDIOC_S_STD)] = "VIDIOC_S_STD",
|
||||
[_IOC_NR(VIDIOC_ENUMSTD)] = "VIDIOC_ENUMSTD",
|
||||
[_IOC_NR(VIDIOC_ENUMINPUT)] = "VIDIOC_ENUMINPUT",
|
||||
[_IOC_NR(VIDIOC_G_CTRL)] = "VIDIOC_G_CTRL",
|
||||
[_IOC_NR(VIDIOC_S_CTRL)] = "VIDIOC_S_CTRL",
|
||||
[_IOC_NR(VIDIOC_G_TUNER)] = "VIDIOC_G_TUNER",
|
||||
[_IOC_NR(VIDIOC_S_TUNER)] = "VIDIOC_S_TUNER",
|
||||
[_IOC_NR(VIDIOC_G_AUDIO)] = "VIDIOC_G_AUDIO",
|
||||
[_IOC_NR(VIDIOC_S_AUDIO)] = "VIDIOC_S_AUDIO",
|
||||
[_IOC_NR(VIDIOC_QUERYCTRL)] = "VIDIOC_QUERYCTRL",
|
||||
[_IOC_NR(VIDIOC_QUERYMENU)] = "VIDIOC_QUERYMENU",
|
||||
[_IOC_NR(VIDIOC_G_INPUT)] = "VIDIOC_G_INPUT",
|
||||
[_IOC_NR(VIDIOC_S_INPUT)] = "VIDIOC_S_INPUT",
|
||||
[_IOC_NR(VIDIOC_G_OUTPUT)] = "VIDIOC_G_OUTPUT",
|
||||
[_IOC_NR(VIDIOC_S_OUTPUT)] = "VIDIOC_S_OUTPUT",
|
||||
[_IOC_NR(VIDIOC_ENUMOUTPUT)] = "VIDIOC_ENUMOUTPUT",
|
||||
[_IOC_NR(VIDIOC_G_AUDOUT)] = "VIDIOC_G_AUDOUT",
|
||||
[_IOC_NR(VIDIOC_S_AUDOUT)] = "VIDIOC_S_AUDOUT",
|
||||
[_IOC_NR(VIDIOC_G_MODULATOR)] = "VIDIOC_G_MODULATOR",
|
||||
[_IOC_NR(VIDIOC_S_MODULATOR)] = "VIDIOC_S_MODULATOR",
|
||||
[_IOC_NR(VIDIOC_G_FREQUENCY)] = "VIDIOC_G_FREQUENCY",
|
||||
[_IOC_NR(VIDIOC_S_FREQUENCY)] = "VIDIOC_S_FREQUENCY",
|
||||
[_IOC_NR(VIDIOC_CROPCAP)] = "VIDIOC_CROPCAP",
|
||||
[_IOC_NR(VIDIOC_G_CROP)] = "VIDIOC_G_CROP",
|
||||
[_IOC_NR(VIDIOC_S_CROP)] = "VIDIOC_S_CROP",
|
||||
[_IOC_NR(VIDIOC_G_JPEGCOMP)] = "VIDIOC_G_JPEGCOMP",
|
||||
[_IOC_NR(VIDIOC_S_JPEGCOMP)] = "VIDIOC_S_JPEGCOMP",
|
||||
[_IOC_NR(VIDIOC_QUERYSTD)] = "VIDIOC_QUERYSTD",
|
||||
[_IOC_NR(VIDIOC_TRY_FMT)] = "VIDIOC_TRY_FMT",
|
||||
[_IOC_NR(VIDIOC_ENUMAUDIO)] = "VIDIOC_ENUMAUDIO",
|
||||
[_IOC_NR(VIDIOC_ENUMAUDOUT)] = "VIDIOC_ENUMAUDOUT",
|
||||
[_IOC_NR(VIDIOC_G_PRIORITY)] = "VIDIOC_G_PRIORITY",
|
||||
[_IOC_NR(VIDIOC_S_PRIORITY)] = "VIDIOC_S_PRIORITY",
|
||||
[_IOC_NR(VIDIOC_G_SLICED_VBI_CAP)] = "VIDIOC_G_SLICED_VBI_CAP",
|
||||
[_IOC_NR(VIDIOC_LOG_STATUS)] = "VIDIOC_LOG_STATUS",
|
||||
[_IOC_NR(VIDIOC_G_EXT_CTRLS)] = "VIDIOC_G_EXT_CTRLS",
|
||||
[_IOC_NR(VIDIOC_S_EXT_CTRLS)] = "VIDIOC_S_EXT_CTRLS",
|
||||
[_IOC_NR(VIDIOC_TRY_EXT_CTRLS)] = "VIDIOC_TRY_EXT_CTRLS",
|
||||
[_IOC_NR(VIDIOC_ENUM_FRAMESIZES)] = "VIDIOC_ENUM_FRAMESIZES",
|
||||
[_IOC_NR(VIDIOC_ENUM_FRAMEINTERVALS)] = "VIDIOC_ENUM_FRAMEINTERVALS",
|
||||
[_IOC_NR(VIDIOC_G_ENC_INDEX)] = "VIDIOC_G_ENC_INDEX",
|
||||
[_IOC_NR(VIDIOC_ENCODER_CMD)] = "VIDIOC_ENCODER_CMD",
|
||||
[_IOC_NR(VIDIOC_TRY_ENCODER_CMD)] = "VIDIOC_TRY_ENCODER_CMD",
|
||||
[_IOC_NR(VIDIOC_DBG_S_REGISTER)] = "VIDIOC_DBG_S_REGISTER",
|
||||
[_IOC_NR(VIDIOC_DBG_G_REGISTER)] = "VIDIOC_DBG_G_REGISTER",
|
||||
[_IOC_NR(VIDIOC_S_HW_FREQ_SEEK)] = "VIDIOC_S_HW_FREQ_SEEK",
|
||||
[_IOC_NR(VIDIOC_S_DV_TIMINGS)] = "VIDIOC_S_DV_TIMINGS",
|
||||
[_IOC_NR(VIDIOC_G_DV_TIMINGS)] = "VIDIOC_G_DV_TIMINGS",
|
||||
[_IOC_NR(VIDIOC_DQEVENT)] = "VIDIOC_DQEVENT",
|
||||
[_IOC_NR(VIDIOC_SUBSCRIBE_EVENT)] = "VIDIOC_SUBSCRIBE_EVENT",
|
||||
[_IOC_NR(VIDIOC_UNSUBSCRIBE_EVENT)] = "VIDIOC_UNSUBSCRIBE_EVENT",
|
||||
[_IOC_NR(VIDIOC_CREATE_BUFS)] = "VIDIOC_CREATE_BUFS",
|
||||
[_IOC_NR(VIDIOC_PREPARE_BUF)] = "VIDIOC_PREPARE_BUF",
|
||||
[_IOC_NR(VIDIOC_G_SELECTION)] = "VIDIOC_G_SELECTION",
|
||||
[_IOC_NR(VIDIOC_S_SELECTION)] = "VIDIOC_S_SELECTION",
|
||||
[_IOC_NR(VIDIOC_DECODER_CMD)] = "VIDIOC_DECODER_CMD",
|
||||
[_IOC_NR(VIDIOC_TRY_DECODER_CMD)] = "VIDIOC_TRY_DECODER_CMD",
|
||||
[_IOC_NR(VIDIOC_ENUM_DV_TIMINGS)] = "VIDIOC_ENUM_DV_TIMINGS",
|
||||
[_IOC_NR(VIDIOC_QUERY_DV_TIMINGS)] = "VIDIOC_QUERY_DV_TIMINGS",
|
||||
[_IOC_NR(VIDIOC_DV_TIMINGS_CAP)] = "VIDIOC_DV_TIMINGS_CAP",
|
||||
[_IOC_NR(VIDIOC_ENUM_FREQ_BANDS)] = "VIDIOC_ENUM_FREQ_BANDS",
|
||||
[_IOC_NR(VIDIOC_DBG_G_CHIP_INFO)] = "VIDIOC_DBG_G_CHIP_INFO",
|
||||
};
|
||||
|
||||
void v4l2_log_ioctl(unsigned long int request, void *arg, int result)
|
||||
{
|
||||
const char *ioctl_str;
|
||||
char buf[40];
|
||||
int saved_errno = errno;
|
||||
|
||||
if (!v4l2_log_file)
|
||||
return;
|
||||
|
||||
if (_IOC_TYPE(request) == 'V' && _IOC_NR(request) < ARRAY_SIZE(v4l2_ioctls))
|
||||
ioctl_str = v4l2_ioctls[_IOC_NR(request)];
|
||||
else {
|
||||
snprintf(buf, sizeof(buf), "unknown request: %c %d",
|
||||
(int)_IOC_TYPE(request), (int)_IOC_NR(request));
|
||||
ioctl_str = buf;
|
||||
}
|
||||
|
||||
fprintf(v4l2_log_file, "request == %s\n", ioctl_str);
|
||||
|
||||
switch (request) {
|
||||
case VIDIOC_ENUM_FMT: {
|
||||
struct v4l2_fmtdesc *fmt = arg;
|
||||
|
||||
fprintf(v4l2_log_file, " index: %u, description: %s\n",
|
||||
fmt->index, (result < 0) ? "" : (const char *)fmt->description);
|
||||
break;
|
||||
}
|
||||
case VIDIOC_G_FMT:
|
||||
case VIDIOC_S_FMT:
|
||||
case VIDIOC_TRY_FMT: {
|
||||
struct v4l2_format *fmt = arg;
|
||||
int pixfmt = fmt->fmt.pix.pixelformat;
|
||||
|
||||
if (fmt->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) {
|
||||
fprintf(v4l2_log_file, " pixelformat: %c%c%c%c %ux%u\n",
|
||||
pixfmt & 0xff,
|
||||
(pixfmt >> 8) & 0xff,
|
||||
(pixfmt >> 16) & 0xff,
|
||||
pixfmt >> 24,
|
||||
fmt->fmt.pix.width,
|
||||
fmt->fmt.pix.height);
|
||||
fprintf(v4l2_log_file, " field: %d bytesperline: %d imagesize: %d\n",
|
||||
(int)fmt->fmt.pix.field, (int)fmt->fmt.pix.bytesperline,
|
||||
(int)fmt->fmt.pix.sizeimage);
|
||||
fprintf(v4l2_log_file, " colorspace: %d, priv: %x\n",
|
||||
(int)fmt->fmt.pix.colorspace, (int)fmt->fmt.pix.priv);
|
||||
} else {
|
||||
fprintf(v4l2_log_file, " type: %d\n", (int)fmt->type);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VIDIOC_REQBUFS: {
|
||||
struct v4l2_requestbuffers *req = arg;
|
||||
|
||||
fprintf(v4l2_log_file, " count: %u type: %d memory: %d\n",
|
||||
req->count, (int)req->type, (int)req->memory);
|
||||
break;
|
||||
}
|
||||
case VIDIOC_DQBUF: {
|
||||
struct v4l2_buffer *buf = arg;
|
||||
fprintf(v4l2_log_file, " timestamp %ld.%06ld\n",
|
||||
(long)buf->timestamp.tv_sec,
|
||||
(long)buf->timestamp.tv_usec);
|
||||
break;
|
||||
}
|
||||
case VIDIOC_ENUM_FRAMESIZES: {
|
||||
struct v4l2_frmsizeenum *frmsize = arg;
|
||||
int pixfmt = frmsize->pixel_format;
|
||||
|
||||
fprintf(v4l2_log_file, " index: %u pixelformat: %c%c%c%c\n",
|
||||
frmsize->index,
|
||||
pixfmt & 0xff,
|
||||
(pixfmt >> 8) & 0xff,
|
||||
(pixfmt >> 16) & 0xff,
|
||||
pixfmt >> 24);
|
||||
switch (frmsize->type) {
|
||||
case V4L2_FRMSIZE_TYPE_DISCRETE:
|
||||
fprintf(v4l2_log_file, " %ux%u\n", frmsize->discrete.width,
|
||||
frmsize->discrete.height);
|
||||
break;
|
||||
case V4L2_FRMSIZE_TYPE_CONTINUOUS:
|
||||
case V4L2_FRMSIZE_TYPE_STEPWISE:
|
||||
fprintf(v4l2_log_file, " %ux%u -> %ux%u\n",
|
||||
frmsize->stepwise.min_width, frmsize->stepwise.min_height,
|
||||
frmsize->stepwise.max_width, frmsize->stepwise.max_height);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VIDIOC_ENUM_FRAMEINTERVALS: {
|
||||
struct v4l2_frmivalenum *frmival = arg;
|
||||
int pixfmt = frmival->pixel_format;
|
||||
|
||||
fprintf(v4l2_log_file, " index: %u pixelformat: %c%c%c%c %ux%u:\n",
|
||||
frmival->index,
|
||||
pixfmt & 0xff,
|
||||
(pixfmt >> 8) & 0xff,
|
||||
(pixfmt >> 16) & 0xff,
|
||||
pixfmt >> 24,
|
||||
frmival->width,
|
||||
frmival->height);
|
||||
switch (frmival->type) {
|
||||
case V4L2_FRMIVAL_TYPE_DISCRETE:
|
||||
fprintf(v4l2_log_file, " %u/%u\n", frmival->discrete.numerator,
|
||||
frmival->discrete.denominator);
|
||||
break;
|
||||
case V4L2_FRMIVAL_TYPE_CONTINUOUS:
|
||||
case V4L2_FRMIVAL_TYPE_STEPWISE:
|
||||
fprintf(v4l2_log_file, " %u/%u -> %u/%u\n",
|
||||
frmival->stepwise.min.numerator,
|
||||
frmival->stepwise.min.denominator,
|
||||
frmival->stepwise.max.numerator,
|
||||
frmival->stepwise.max.denominator);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VIDIOC_G_PARM:
|
||||
case VIDIOC_S_PARM: {
|
||||
struct v4l2_streamparm *parm = arg;
|
||||
|
||||
if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
||||
break;
|
||||
|
||||
if (parm->parm.capture.capability & V4L2_CAP_TIMEPERFRAME)
|
||||
fprintf(v4l2_log_file, "timeperframe: %u/%u\n",
|
||||
parm->parm.capture.timeperframe.numerator,
|
||||
parm->parm.capture.timeperframe.denominator);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (result < 0)
|
||||
fprintf(v4l2_log_file, "result == %d (%s)\n", result, strerror(saved_errno));
|
||||
else
|
||||
fprintf(v4l2_log_file, "result == %d\n", result);
|
||||
|
||||
fflush(v4l2_log_file);
|
||||
}
|
||||
155
libv4l2/v4l2-plugin-android.c
Normal file
155
libv4l2/v4l2-plugin-android.c
Normal file
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
* Copyright (C) 2010 Nokia Corporation <multimedia@maemo.org>
|
||||
*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <android-config.h>
|
||||
#else
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <dlfcn.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "libv4l2.h"
|
||||
#include "libv4l2-priv.h"
|
||||
#include "libv4l-plugin.h"
|
||||
|
||||
/* libv4l plugin support:
|
||||
it is provided by functions v4l2_plugin_[open,close,etc].
|
||||
|
||||
When open() is called libv4l dlopens files in /usr/lib[64]/libv4l/plugins
|
||||
1 at a time and call open callback passing through the applications
|
||||
parameters unmodified.
|
||||
|
||||
If a plugin is relevant for the specified device node, it can indicate so
|
||||
by returning a value other than -1 (the actual file descriptor).
|
||||
As soon as a plugin returns another value than -1 plugin loading stops and
|
||||
information about it (fd and corresponding library handle) is stored. For
|
||||
each function v4l2_[ioctl,read,close,etc] is called corresponding
|
||||
v4l2_plugin_* function which looks if there is loaded plugin for that file
|
||||
and call it's callbacks.
|
||||
|
||||
v4l2_plugin_* function indicates by it's first argument if plugin was used,
|
||||
and if it was not then v4l2_* functions proceed with their usual behavior.
|
||||
*/
|
||||
|
||||
/* list of plugin search paths */
|
||||
static const char *g_plugin_search_paths[] = {
|
||||
"/system/lib/libv4l/plugins",
|
||||
"/vendor/lib/libv4l/plugins",
|
||||
NULL /* list terminator */
|
||||
};
|
||||
|
||||
void v4l2_plugin_init(int fd, void **plugin_lib_ret, void **plugin_priv_ret,
|
||||
const struct libv4l_dev_ops **dev_ops_ret)
|
||||
{
|
||||
char *error;
|
||||
void *plugin_library = NULL;
|
||||
const struct libv4l_dev_ops *libv4l2_plugin = NULL;
|
||||
DIR *plugin_dir = NULL;
|
||||
struct dirent *entry;
|
||||
char *suffix = NULL;
|
||||
int length, i;
|
||||
char filename[256];
|
||||
|
||||
/* initialize output params */
|
||||
*dev_ops_ret = v4lconvert_get_default_dev_ops();
|
||||
*plugin_lib_ret = NULL;
|
||||
*plugin_priv_ret = NULL;
|
||||
|
||||
/* read the plugin directory for "*.so" files */
|
||||
for (i = 0; g_plugin_search_paths[i] != NULL; i++) {
|
||||
plugin_dir = opendir(g_plugin_search_paths[i]);
|
||||
if (plugin_dir == NULL) {
|
||||
V4L2_LOG_ERR("PLUGIN: opening plugin directory (%s) failed\n",
|
||||
g_plugin_search_paths[i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
while ((entry = readdir(plugin_dir))) {
|
||||
/* get last 3 letter suffix from the filename */
|
||||
length = strlen(entry->d_name);
|
||||
if (length > 3)
|
||||
suffix = entry->d_name + (length - 3);
|
||||
|
||||
if (!suffix || strcmp(suffix, ".so")) {
|
||||
suffix = NULL; /* reset for next iteration */
|
||||
continue;
|
||||
}
|
||||
|
||||
/* load library and get desired symbol */
|
||||
sprintf(filename, "%s/%s", g_plugin_search_paths[i], entry->d_name);
|
||||
V4L2_LOG("PLUGIN: dlopen(%s);\n", filename);
|
||||
plugin_library = dlopen(filename, RTLD_LAZY);
|
||||
if (!plugin_library)
|
||||
continue;
|
||||
|
||||
dlerror(); /* Clear any existing error */
|
||||
libv4l2_plugin = (struct libv4l_dev_ops *)
|
||||
dlsym(plugin_library, "libv4l2_plugin");
|
||||
error = dlerror();
|
||||
if (error != NULL) {
|
||||
V4L2_LOG_ERR("PLUGIN: dlsym failed: %s\n", error);
|
||||
dlclose(plugin_library);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!libv4l2_plugin->init ||
|
||||
!libv4l2_plugin->close ||
|
||||
!libv4l2_plugin->ioctl) {
|
||||
V4L2_LOG("PLUGIN: does not have all mandatory ops\n");
|
||||
dlclose(plugin_library);
|
||||
continue;
|
||||
}
|
||||
|
||||
*plugin_priv_ret = libv4l2_plugin->init(fd);
|
||||
if (!*plugin_priv_ret) {
|
||||
V4L2_LOG("PLUGIN: plugin open() returned NULL\n");
|
||||
dlclose(plugin_library);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* exit loop when a suitable plugin is found */
|
||||
*plugin_lib_ret = plugin_library;
|
||||
*dev_ops_ret = libv4l2_plugin;
|
||||
break;
|
||||
}
|
||||
closedir(plugin_dir);
|
||||
|
||||
/* exit loop when a suitable plugin is found */
|
||||
if (*plugin_lib_ret && *plugin_priv_ret && *dev_ops_ret)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void v4l2_plugin_cleanup(void *plugin_lib, void *plugin_priv,
|
||||
const struct libv4l_dev_ops *dev_ops)
|
||||
{
|
||||
if (plugin_lib) {
|
||||
dev_ops->close(plugin_priv);
|
||||
dlclose(plugin_lib);
|
||||
}
|
||||
}
|
||||
136
libv4l2/v4l2-plugin.c
Normal file
136
libv4l2/v4l2-plugin.c
Normal file
@@ -0,0 +1,136 @@
|
||||
/*
|
||||
* Copyright (C) 2010 Nokia Corporation <multimedia@maemo.org>
|
||||
*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <stdarg.h>
|
||||
#include <dlfcn.h>
|
||||
#include <fcntl.h>
|
||||
#include <glob.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
#include <stdlib.h>
|
||||
#include "libv4l2.h"
|
||||
#include "libv4l2-priv.h"
|
||||
#include "libv4l-plugin.h"
|
||||
|
||||
/* libv4l plugin support:
|
||||
it is provided by functions v4l2_plugin_[open,close,etc].
|
||||
|
||||
When open() is called libv4l dlopens files in /usr/lib[64]/libv4l/plugins
|
||||
1 at a time and call open callback passing through the applications
|
||||
parameters unmodified.
|
||||
|
||||
If a plugin is relevant for the specified device node, it can indicate so
|
||||
by returning a value other than -1 (the actual file descriptor).
|
||||
As soon as a plugin returns another value than -1 plugin loading stops and
|
||||
information about it (fd and corresponding library handle) is stored. For
|
||||
each function v4l2_[ioctl,read,close,etc] is called corresponding
|
||||
v4l2_plugin_* function which looks if there is loaded plugin for that file
|
||||
and call it's callbacks.
|
||||
|
||||
v4l2_plugin_* function indicates by it's first argument if plugin was used,
|
||||
and if it was not then v4l2_* functions proceed with their usual behavior.
|
||||
*/
|
||||
|
||||
#define PLUGINS_PATTERN LIBV4L2_PLUGIN_DIR "/*.so"
|
||||
|
||||
void v4l2_plugin_init(int fd, void **plugin_lib_ret, void **plugin_priv_ret,
|
||||
const struct libv4l_dev_ops **dev_ops_ret)
|
||||
{
|
||||
char *error;
|
||||
int glob_ret, i;
|
||||
void *plugin_library = NULL;
|
||||
const struct libv4l_dev_ops *libv4l2_plugin = NULL;
|
||||
glob_t globbuf;
|
||||
|
||||
*dev_ops_ret = v4lconvert_get_default_dev_ops();
|
||||
*plugin_lib_ret = NULL;
|
||||
*plugin_priv_ret = NULL;
|
||||
|
||||
glob_ret = glob(PLUGINS_PATTERN, 0, NULL, &globbuf);
|
||||
|
||||
if (glob_ret == GLOB_NOSPACE)
|
||||
return;
|
||||
|
||||
if (glob_ret == GLOB_ABORTED || glob_ret == GLOB_NOMATCH)
|
||||
goto leave;
|
||||
|
||||
/* WAR: Reverse open the libs to avoid memleak - Bug 4697575 */
|
||||
for (i = globbuf.gl_pathc - 1; i >= 0; i--) {
|
||||
V4L2_LOG("PLUGIN: dlopen(%s);\n", globbuf.gl_pathv[i]);
|
||||
|
||||
/* WAR: V4L2 applications are crashing at the time of exit
|
||||
* if v4l2_open and v4l2_close are done inside thread context
|
||||
* because of dlopen and dlclose which causes the issues
|
||||
* during thread cleanup. Use flag RTLD_NODELETE to avoid
|
||||
* the crash. Bug 4210082
|
||||
*/
|
||||
if (getenv("LIBV4L2_ENABLE_RTLD_NODELETE")) {
|
||||
plugin_library = dlopen(globbuf.gl_pathv[i], (RTLD_LAZY | RTLD_NODELETE));
|
||||
}
|
||||
else {
|
||||
plugin_library = dlopen(globbuf.gl_pathv[i], RTLD_LAZY);
|
||||
}
|
||||
if (!plugin_library)
|
||||
continue;
|
||||
|
||||
dlerror(); /* Clear any existing error */
|
||||
libv4l2_plugin = (struct libv4l_dev_ops *)
|
||||
dlsym(plugin_library, "libv4l2_plugin");
|
||||
error = dlerror();
|
||||
if (error != NULL) {
|
||||
V4L2_LOG_ERR("PLUGIN: dlsym failed: %s\n", error);
|
||||
dlclose(plugin_library);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!libv4l2_plugin->init ||
|
||||
!libv4l2_plugin->close ||
|
||||
!libv4l2_plugin->ioctl) {
|
||||
V4L2_LOG("PLUGIN: does not have all mandatory ops\n");
|
||||
dlclose(plugin_library);
|
||||
continue;
|
||||
}
|
||||
|
||||
*plugin_priv_ret = libv4l2_plugin->init(fd);
|
||||
if (!*plugin_priv_ret) {
|
||||
V4L2_LOG("PLUGIN: plugin open() returned NULL\n");
|
||||
dlclose(plugin_library);
|
||||
continue;
|
||||
}
|
||||
|
||||
*plugin_lib_ret = plugin_library;
|
||||
*dev_ops_ret = libv4l2_plugin;
|
||||
break;
|
||||
}
|
||||
|
||||
leave:
|
||||
globfree(&globbuf);
|
||||
}
|
||||
|
||||
void v4l2_plugin_cleanup(void *plugin_lib, void *plugin_priv,
|
||||
const struct libv4l_dev_ops *dev_ops)
|
||||
{
|
||||
if (plugin_lib) {
|
||||
dev_ops->close(plugin_priv);
|
||||
dlclose(plugin_lib);
|
||||
}
|
||||
}
|
||||
175
libv4l2/v4l2convert.c
Normal file
175
libv4l2/v4l2convert.c
Normal file
@@ -0,0 +1,175 @@
|
||||
/*
|
||||
# open/close/ioctl/mmap/munmap library call wrapper doing format conversion
|
||||
# for v4l2 applications which want to be able to simply capture bgr24 / yuv420
|
||||
# from v4l2 devices with more exotic frame formats.
|
||||
|
||||
# (C) 2008 Hans de Goede <hdegoede@redhat.com>
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
|
||||
*/
|
||||
|
||||
/* prevent GCC 4.7 inlining error */
|
||||
#undef _FORTIFY_SOURCE
|
||||
|
||||
/* ensure we see *64 variants and they aren't transparently used */
|
||||
#undef _LARGEFILE_SOURCE
|
||||
#undef _FILE_OFFSET_BITS
|
||||
#define _LARGEFILE64_SOURCE 1
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <android-config.h>
|
||||
#else
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
#if defined(__OpenBSD__)
|
||||
#include <sys/videoio.h>
|
||||
#else
|
||||
#include <linux/videodev2.h>
|
||||
#endif
|
||||
#include <libv4l2.h>
|
||||
#include "../libv4lconvert/libv4lsyscall-priv.h"
|
||||
|
||||
/* Check that open/read/mmap is not a define */
|
||||
#if defined open || defined read || defined mmap
|
||||
#error open/read/mmap is a prepocessor macro !!
|
||||
#endif
|
||||
|
||||
#if HAVE_VISIBILITY
|
||||
#define LIBV4L_PUBLIC __attribute__ ((visibility("default")))
|
||||
#else
|
||||
#define LIBV4L_PUBLIC
|
||||
#endif
|
||||
|
||||
LIBV4L_PUBLIC int open(const char *file, int oflag, ...)
|
||||
{
|
||||
int fd;
|
||||
int v4l_device = 0;
|
||||
|
||||
/* check if we're opening a video4linux2 device */
|
||||
if (!strncmp(file, "/dev/video", 10) || !strncmp(file, "/dev/v4l/", 9)) {
|
||||
/* Some apps open the device read-only, but we need rw rights as the
|
||||
buffers *MUST* be mapped rw */
|
||||
oflag = (oflag & ~O_ACCMODE) | O_RDWR;
|
||||
v4l_device = 1;
|
||||
}
|
||||
|
||||
/* original open code */
|
||||
if (oflag & O_CREAT) {
|
||||
va_list ap;
|
||||
mode_t mode;
|
||||
|
||||
va_start(ap, oflag);
|
||||
mode = va_arg(ap, PROMOTED_MODE_T);
|
||||
|
||||
fd = SYS_OPEN(file, oflag, mode);
|
||||
|
||||
va_end(ap);
|
||||
} else {
|
||||
fd = SYS_OPEN(file, oflag, 0);
|
||||
}
|
||||
/* end of original open code */
|
||||
|
||||
if (fd == -1 || !v4l_device)
|
||||
return fd;
|
||||
|
||||
/* Try to Register with libv4l2 (in case of failure pass the fd to the
|
||||
application as is) */
|
||||
v4l2_fd_open(fd, 0);
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
#if defined(linux) && defined(__GLIBC__)
|
||||
LIBV4L_PUBLIC int open64(const char *file, int oflag, ...)
|
||||
{
|
||||
int fd;
|
||||
|
||||
/* original open code */
|
||||
if (oflag & O_CREAT) {
|
||||
va_list ap;
|
||||
mode_t mode;
|
||||
|
||||
va_start(ap, oflag);
|
||||
mode = va_arg(ap, PROMOTED_MODE_T);
|
||||
|
||||
fd = open(file, oflag | O_LARGEFILE, mode);
|
||||
|
||||
va_end(ap);
|
||||
} else {
|
||||
fd = open(file, oflag | O_LARGEFILE);
|
||||
}
|
||||
/* end of original open code */
|
||||
|
||||
return fd;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef ANDROID
|
||||
LIBV4L_PUBLIC int close(int fd)
|
||||
{
|
||||
return v4l2_close(fd);
|
||||
}
|
||||
|
||||
LIBV4L_PUBLIC int dup(int fd)
|
||||
{
|
||||
return v4l2_dup(fd);
|
||||
}
|
||||
|
||||
#ifdef HAVE_POSIX_IOCTL
|
||||
LIBV4L_PUBLIC int ioctl(int fd, int request, ...)
|
||||
#else
|
||||
LIBV4L_PUBLIC int ioctl(int fd, unsigned long int request, ...)
|
||||
#endif
|
||||
{
|
||||
void *arg;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, request);
|
||||
arg = va_arg(ap, void *);
|
||||
va_end(ap);
|
||||
|
||||
return v4l2_ioctl(fd, request, arg);
|
||||
}
|
||||
|
||||
LIBV4L_PUBLIC ssize_t read(int fd, void *buffer, size_t n)
|
||||
{
|
||||
return v4l2_read(fd, buffer, n);
|
||||
}
|
||||
|
||||
LIBV4L_PUBLIC void *mmap(void *start, size_t length, int prot, int flags, int fd,
|
||||
off_t offset)
|
||||
{
|
||||
return v4l2_mmap(start, length, prot, flags, fd, offset);
|
||||
}
|
||||
|
||||
#if defined(linux) && defined(__GLIBC__)
|
||||
LIBV4L_PUBLIC void *mmap64(void *start, size_t length, int prot, int flags, int fd,
|
||||
off64_t offset)
|
||||
{
|
||||
return v4l2_mmap(start, length, prot, flags, fd, offset);
|
||||
}
|
||||
#endif
|
||||
|
||||
LIBV4L_PUBLIC int munmap(void *start, size_t length)
|
||||
{
|
||||
return v4l2_munmap(start, length);
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user