From owner-freebsd-multimedia@FreeBSD.ORG Wed Jan 27 11:35:03 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 6FA621065672 for ; Wed, 27 Jan 2010 11:35:03 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward11.mail.yandex.net (forward11.mail.yandex.net [95.108.130.93]) by mx1.freebsd.org (Postfix) with ESMTP id 015638FC0A for ; Wed, 27 Jan 2010 11:35:02 +0000 (UTC) Received: from smtp11.mail.yandex.net (smtp11.mail.yandex.net [95.108.130.67]) by forward11.mail.yandex.net (Yandex) with ESMTP id 0F7E4F49045; Wed, 27 Jan 2010 14:25:39 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1264591539; bh=phQHzIgZhx6oc72FQuE4Xfxq2mrNp0edAEdSfBzAl14=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type; b=nCYxJxFNHZMIO+xQjF5klilBU8SFZa7o5whd16vp5JsM3kgjcp/gqtxSS92y48JDu Yg9NJ6Jmlys2rAB2spKMKHysMiBql+XJimgPfgahpbaitf4NWbS3FbWvUnGimLBrPI oI5h4DKCUqeXYeXcPnwukWHmOQSzPflfJpZKoWh8= Received: from [127.0.0.1] (mail.kirov.so-cdu.ru [77.72.136.145]) by smtp11.mail.yandex.net (Yandex) with ESMTPSA id CD05C6730090; Wed, 27 Jan 2010 14:25:38 +0300 (MSK) Message-ID: <4B6022B2.8030900@yandex.ru> Date: Wed, 27 Jan 2010 14:25:38 +0300 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: freebsd-multimedia@freebsd.org References: <201001101437.37269.hselasky@c2i.net> <4B602067.4030702@yandex.ru> In-Reply-To: <4B602067.4030702@yandex.ru> Content-Type: multipart/mixed; boundary="------------070406000106070207000802" X-Yandex-TimeMark: 1264591539 X-Yandex-Spam: 1 X-Yandex-Front: smtp11.mail.yandex.net Cc: riggs@rrr.de Subject: Re: [RFC/RFT][patch] multimedia/mplayer with TV-V4L support 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:35:03 -0000 This is a multi-part message in MIME format. --------------070406000106070207000802 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit On 27.01.2010 14:15, Andrey V. Elsukov wrote: > 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? Small fix for port's Makefile. -- WBR, Andrey V. Elsukov --------------070406000106070207000802 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 14:18:48.634502768 +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 @@ -228,6 +229,13 @@ CONFIGURE_ARGS+=--enable-joystick CONFIGURE_ARGS+=--disable-joystick .endif +.if defined(WITH_V4L) +LIB_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 */ --------------070406000106070207000802--