Date: Wed, 27 Jan 2010 14:25:38 +0300 From: "Andrey V. Elsukov" <bu7cher@yandex.ru> To: freebsd-multimedia@freebsd.org Cc: riggs@rrr.de Subject: Re: [RFC/RFT][patch] multimedia/mplayer with TV-V4L support Message-ID: <4B6022B2.8030900@yandex.ru> In-Reply-To: <4B602067.4030702@yandex.ru> References: <201001101437.37269.hselasky@c2i.net> <4B602067.4030702@yandex.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <libv4l1.h> ++#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 <sys/sysinfo.h> + #endif +-#include <linux/types.h> + #include <linux/videodev2.h> + #include "mp_msg.h" + #include "libmpcodecs/img_format.h" +@@ -46,6 +46,14 @@ known issues: + #include "tv.h" + #include "audio_in.h" + ++#include <libv4l2.h> ++#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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B6022B2.8030900>