Hello, Due to the fact that videodev.h was removed from the kernels from 2.6.38 AFAIK, current libv4l seems too old. The attached patch adds support for v4l-utils (should replace libv4l).
Kind regards, Maxim
From 87ce6479d65a61419713c491347805be7a48a3ac Mon Sep 17 00:00:00 2001 From: Maxim Osipov <[email protected]> Date: Sun, 26 Jun 2011 23:27:02 +0100 Subject: [PATCH 1/4] Add flexibity version of v4l-utils Signed-off-by: Maxim Osipov <[email protected]> --- v4l-utils/Makefile | 77 +++++++++++++++++++++++++++++++++++ v4l-utils/patches/001-libargp.patch | 48 ++++++++++++++++++++++ 2 files changed, 125 insertions(+), 0 deletions(-) create mode 100644 v4l-utils/Makefile create mode 100644 v4l-utils/patches/001-libargp.patch diff --git a/v4l-utils/Makefile b/v4l-utils/Makefile new file mode 100644 index 0000000..d407cc3 --- /dev/null +++ b/v4l-utils/Makefile @@ -0,0 +1,77 @@ +# +# Copyright (C) 2011 Maxim Osipov <[email protected]> +# Copyright (C) 2009 David Cooper <[email protected]> +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=v4l-utils +PKG_VERSION:=0.8.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://linuxtv.org/downloads/v4l-utils/ + +include $(INCLUDE_DIR)/package.mk + +define Package/v4l-utils + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Video 4 Linux utilities + URL:=http://people.atrpms.net/~hdegoede/ + DEPENDS:=+libpthread @!LINUX_2_4 +argp-standalone +argtable +libjpeg +endef + +define Package/v4l-utils/description + v4l-utils 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. libv4l + consists of 3 different libraries: libv4lconvert, libv4l1 and libv4l2. + + 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). + + libv4l2 offers the v4l2 API on top of v4l2 devices, while adding for the + application transparent libv4lconvert conversion where necessary. +endef + +TARGET_CFLAGS += $(FPIC) + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" PREFIX="/usr" \ + $(CONFIGURE_VARS) \ + all install + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" PREFIX="/usr" \ + $(CONFIGURE_VARS) \ + LINKTYPE="static" \ + all install +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert}.{a,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libv4l{1,2,convert}.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/v4l-utils/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l{1,2,convert}.so.* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/libv4l + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libv4l/v4l{1compat,2convert}.so $(1)/usr/lib/libv4l +endef + +$(eval $(call BuildPackage,v4l-utils)) + diff --git a/v4l-utils/patches/001-libargp.patch b/v4l-utils/patches/001-libargp.patch new file mode 100644 index 0000000..29b28ae --- /dev/null +++ b/v4l-utils/patches/001-libargp.patch @@ -0,0 +1,48 @@ +diff -Nuar v4l-utils-0.8.4-orig/utils/decode_tm6000/Makefile v4l-utils-0.8.4/utils/decode_tm6000/Makefile +--- v4l-utils-0.8.4-orig/utils/decode_tm6000/Makefile 2011-06-01 12:23:03.000000000 +0100 ++++ v4l-utils-0.8.4/utils/decode_tm6000/Makefile 2011-06-29 23:23:17.721058396 +0100 +@@ -5,7 +5,7 @@ + -include *.d + + decode_tm6000: decode_tm6000.o ../libv4l2util/libv4l2util.a +- $(CC) $(LDFLAGS) -o $@ $^ ++ $(CC) $(LDFLAGS) -o $@ $^ -largp + + install: $(TARGETS) + mkdir -p $(DESTDIR)$(PREFIX)/bin +diff -Nuar v4l-utils-0.8.4-orig/utils/keytable/Makefile v4l-utils-0.8.4/utils/keytable/Makefile +--- v4l-utils-0.8.4-orig/utils/keytable/Makefile 2011-06-01 12:23:03.000000000 +0100 ++++ v4l-utils-0.8.4/utils/keytable/Makefile 2011-06-29 23:23:43.041058396 +0100 +@@ -5,7 +5,7 @@ + -include *.d + + ir-keytable: keytable.o +- $(CC) $(LDFLAGS) -o $@ $^ ++ $(CC) $(LDFLAGS) -o $@ $^ -largp + + keytable.o: keytable.c parse.h + +diff -Nuar v4l-utils-0.8.4-orig/utils/v4l2-compliance/Makefile v4l-utils-0.8.4/utils/v4l2-compliance/Makefile +--- v4l-utils-0.8.4-orig/utils/v4l2-compliance/Makefile 2011-06-01 12:23:03.000000000 +0100 ++++ v4l-utils-0.8.4/utils/v4l2-compliance/Makefile 2011-06-29 23:42:07.217058397 +0100 +@@ -6,7 +6,7 @@ + + v4l2-compliance: v4l2-compliance.o v4l2-test-debug.o v4l2-test-input-output.o \ + v4l2-test-controls.o v4l2-test-io-config.o +- $(CXX) $(LDFLAGS) -o $@ $^ -lv4l2 -lv4lconvert -lrt ++ $(CXX) $(LDFLAGS) -o $@ $^ -lv4l2 -lv4lconvert -lrt -ljpeg + + install: $(TARGETS) + mkdir -p $(DESTDIR)$(PREFIX)/bin +diff -Nuar v4l-utils-0.8.4-orig/utils/v4l2-ctl/Makefile v4l-utils-0.8.4/utils/v4l2-ctl/Makefile +--- v4l-utils-0.8.4-orig/utils/v4l2-ctl/Makefile 2011-06-01 12:23:03.000000000 +0100 ++++ v4l-utils-0.8.4/utils/v4l2-ctl/Makefile 2011-06-29 23:56:12.557058397 +0100 +@@ -13,7 +13,7 @@ + $(CC) $(LDFLAGS) -o $@ $^ -lm + + v4l2-ctl: v4l2-ctl.o +- $(CXX) $(LDFLAGS) -o $@ $^ -lv4l2 -lv4lconvert -lrt ++ $(CXX) $(LDFLAGS) -o $@ $^ -lv4l2 -lv4lconvert -lrt -ljpeg + + install: $(TARGETS) + mkdir -p $(DESTDIR)$(PREFIX)/bin -- 1.7.4.1
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
