From owner-freebsd-multimedia@FreeBSD.ORG Wed Jan 27 11:27:53 2010 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43DE7106566B for ; Wed, 27 Jan 2010 11:27:53 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward12.mail.yandex.net (forward12.mail.yandex.net [95.108.130.94]) by mx1.freebsd.org (Postfix) with ESMTP id C84828FC19 for ; Wed, 27 Jan 2010 11:27:52 +0000 (UTC) Received: from smtp2.mail.yandex.net (smtp2.mail.yandex.net [77.88.46.102]) by forward12.mail.yandex.net (Yandex) with ESMTP id ABD7115D117C; Wed, 27 Jan 2010 14:15:52 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1264590952; bh=WpETLxhMI9nDSTYuYFY5udnrwOibgPB4/p/JhQHAGM0=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type; b=ElwzF/wu9ceil6iveRDzE5X/jGVsZqLykArH8r5NzsdQsiaiz3rWqbIWCjXGPUMAr E7hCYjGSExPOQJCN61dvSujHElqNrmUkMGML9bEVV2wrBWUsO+J88FKDtB8MrfdItc 7NVMDCJxU9SMrF3IsN3IssJuoSpmaXJDWDSl1gNc= Received: from [127.0.0.1] (ns.kirov.so-cdu.ru [77.72.136.145]) by smtp2.mail.yandex.net (Yandex) with ESMTPSA id 5652DD18103; Wed, 27 Jan 2010 14:15:52 +0300 (MSK) Message-ID: <4B602067.4030702@yandex.ru> Date: Wed, 27 Jan 2010 14:15:51 +0300 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: Hans Petter Selasky References: <201001101437.37269.hselasky@c2i.net> In-Reply-To: <201001101437.37269.hselasky@c2i.net> Content-Type: multipart/mixed; boundary="------------090506020804000005010808" X-Yandex-TimeMark: 1264590952 X-Yandex-Spam: 1 X-Yandex-Front: smtp2.mail.yandex.net Cc: freebsd-multimedia@freebsd.org, riggs@rrr.de Subject: [RFC/RFT][patch] multimedia/mplayer with TV-V4L support (was: [FreeBSD 8/9] USB webcamd and video4bsd: Call for testing) X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 11:27:53 -0000 This is a multi-part message in MIME format. --------------090506020804000005010808 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit On 10.01.2010 16:37, Hans Petter Selasky wrote: > Feedback and bug reports are welcome. > > Yes, I am working on getting this into ports! Hi, Thank you for your work. Now i can use my webcam almost out of the box :) Webcam on ASUS EEEPC works with `pwcview -s vga` and i made patch for multimedia/mplayer, so now i can use mplayer with my webcam :) Can someone review these changes? Is it a correct way to use libv4l? -- WBR, Andrey V. Elsukov --------------090506020804000005010808 Content-Type: text/plain; name="mplayer.diff.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="mplayer.diff.txt" diff -burNp /usr/ports/multimedia/mplayer/Makefile mplayer/Makefile --- /usr/ports/multimedia/mplayer/Makefile 2009-07-17 22:34:49.000000000 +0400 +++ mplayer/Makefile 2010-01-27 12:47:39.280345746 +0300 @@ -66,6 +66,7 @@ OPTIONS+= LIBCDIO "Enable libcdio suppor OPTIONS+= CDPARANOIA "Enable cdparanoia support" off OPTIONS+= LIBLZO "Enable external liblzo library" off OPTIONS+= JOYSTICK "Enable joystick support" off +OPTIONS+= V4L "Enable v4l driver support for TV" off MAN1= mplayer.1 MANCOMPRESSED= no @@ -222,12 +223,19 @@ DEFAULT_KERN_HZ=1024 .endif .if defined(WITH_JOYSTICK) -BUILD_DEPENDS+= ${LOCALBASE}/include/linux/joystick.h:${PORTSDIR}/devel/linux-js +LIB_DEPENDS+= ${LOCALBASE}/include/linux/joystick.h:${PORTSDIR}/devel/linux-js CONFIGURE_ARGS+=--enable-joystick .else CONFIGURE_ARGS+=--disable-joystick .endif +.if defined(WITH_V4L) +BUILD_DEPENDS+= ${LOCALBASE}/lib/libv4l2.so:${PORTSDIR}/multimedia/libv4l +CONFIGURE_ARGS+=--enable-tv-v4l1 --enable-tv-v4l2 +.else +CONFIGURE_ARGS+=--disable-tv-v4l1 --disable-tv-v4l2 +.endif + pre-everything:: @${ECHO_MSG} "N - O - T - E" @${ECHO_MSG} "" diff -burNp /usr/ports/multimedia/mplayer/Makefile.shared mplayer/Makefile.shared --- /usr/ports/multimedia/mplayer/Makefile.shared 2009-05-21 15:55:56.000000000 +0400 +++ mplayer/Makefile.shared 2010-01-27 11:51:05.029688749 +0300 @@ -33,8 +33,6 @@ CONFIGURE_ARGS= --enable-png \ --enable-menu \ --disable-faad-external \ --disable-vidix-external \ - --disable-tv-v4l1 \ - --disable-tv-v4l2 \ --disable-dvdnav WANT_GNOME= yes diff -burNp /usr/ports/multimedia/mplayer/files/patch-tv-v4l mplayer/files/patch-tv-v4l --- /usr/ports/multimedia/mplayer/files/patch-tv-v4l 1970-01-01 03:00:00.000000000 +0300 +++ mplayer/files/patch-tv-v4l 2010-01-27 13:48:38.204958790 +0300 @@ -0,0 +1,60 @@ +--- configure 2010-01-27 12:49:02.310984277 +0300 ++++ configure 2010-01-27 13:33:45.902924872 +0300 +@@ -6786,6 +6786,7 @@ if test "$_tv_v4l1" = yes ; then + _def_tv_v4l='#define HAVE_TV_V4L 1' + _def_tv_v4l1='#define HAVE_TV_V4L1 1' + _inputmodules="tv-v4l $_inputmodules" ++ _ld_extra="$_ld_extra -lv4l1" + else + _noinputmodules="tv-v4l1 $_noinputmodules" + _def_tv_v4l='#undef HAVE_TV_V4L' +@@ -6812,6 +6813,7 @@ if test "$_tv_v4l2" = yes ; then + _def_tv_v4l='#define HAVE_TV_V4L 1' + _def_tv_v4l2='#define HAVE_TV_V4L2 1' + _inputmodules="tv-v4l2 $_inputmodules" ++ _ld_extra="$_ld_extra -lv4l2" + else + _noinputmodules="tv-v4l2 $_noinputmodules" + _def_tv_v4l2='#undef HAVE_TV_V4L2' +--- stream/tvi_v4l.c 2007-10-07 23:49:26.000000000 +0400 ++++ stream/tvi_v4l.c 2010-01-27 13:42:17.781746063 +0300 +@@ -48,6 +48,14 @@ + + #include "audio_in.h" + ++#include ++#define open v4l1_open ++#define close v4l1_close ++#define dup v4l1_dup ++#define ioctl v4l1_ioctl ++#define mmap v4l1_mmap ++#define munmap v4l1_munmap ++ + static tvi_handle_t *tvi_init_v4l(tv_param_t* tv_param); + + tvi_info_t tvi_info_v4l = { +--- stream/tvi_v4l2.c 2007-10-07 23:49:26.000000000 +0400 ++++ stream/tvi_v4l2.c 2010-01-27 13:25:47.000000000 +0300 +@@ -38,7 +38,6 @@ known issues: + #ifdef HAVE_SYS_SYSINFO_H + #include + #endif +-#include + #include + #include "mp_msg.h" + #include "libmpcodecs/img_format.h" +@@ -46,6 +46,14 @@ known issues: + #include "tv.h" + #include "audio_in.h" + ++#include ++#define open v4l2_open ++#define close v4l2_close ++#define dup v4l2_dup ++#define ioctl v4l2_ioctl ++#define mmap v4l2_mmap ++#define munmap v4l2_munmap ++ + #define info tvi_info_v4l2 + static tvi_handle_t *tvi_init_v4l2(tv_param_t* tv_param); + /* information about this file */ --------------090506020804000005010808--