diff options
author | Chris Rees <crees@FreeBSD.org> | 2012-10-24 16:32:17 +0000 |
---|---|---|
committer | Chris Rees <crees@FreeBSD.org> | 2012-10-24 16:32:17 +0000 |
commit | e60f4e63a51818bc5268d4d508ff180070b4731f (patch) | |
tree | aaabd96a25061773bbc6f4b525e6d74b65344273 /multimedia | |
parent | eb2171dd3fd709b5c6357e477f34a030f57ec286 (diff) | |
download | ports-e60f4e63a51818bc5268d4d508ff180070b4731f.tar.gz ports-e60f4e63a51818bc5268d4d508ff180070b4731f.zip |
Notes
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/Makefile | 1 | ||||
-rw-r--r-- | multimedia/mplayer2/Makefile | 399 | ||||
-rw-r--r-- | multimedia/mplayer2/distinfo | 2 | ||||
-rw-r--r-- | multimedia/mplayer2/files/extra-patch-base_system_log2f | 21 | ||||
-rw-r--r-- | multimedia/mplayer2/files/patch-configure | 29 | ||||
-rw-r--r-- | multimedia/mplayer2/files/patch-libao2-ao_oss.c | 18 | ||||
-rw-r--r-- | multimedia/mplayer2/files/patch-stream-tvi_bsdbt848.c | 76 | ||||
-rw-r--r-- | multimedia/mplayer2/files/patch-stream-tvi_v4l.c | 17 | ||||
-rw-r--r-- | multimedia/mplayer2/files/patch-stream-tvi_v4l2.c | 25 | ||||
-rw-r--r-- | multimedia/mplayer2/files/pkg-message.in | 13 | ||||
-rw-r--r-- | multimedia/mplayer2/pkg-descr | 6 | ||||
-rw-r--r-- | multimedia/mplayer2/pkg-plist | 23 |
12 files changed, 630 insertions, 0 deletions
diff --git a/multimedia/Makefile b/multimedia/Makefile index daa2d2c28ba8..c3ad5cf1b749 100644 --- a/multimedia/Makefile +++ b/multimedia/Makefile @@ -221,6 +221,7 @@ SUBDIR += mplayer SUBDIR += mplayer-fonts SUBDIR += mplayer-skins + SUBDIR += mplayer2 SUBDIR += mplayerxp SUBDIR += mplex SUBDIR += msdl diff --git a/multimedia/mplayer2/Makefile b/multimedia/mplayer2/Makefile new file mode 100644 index 000000000000..e43c0703d02f --- /dev/null +++ b/multimedia/mplayer2/Makefile @@ -0,0 +1,399 @@ +# $FreeBSD$ + +PORTNAME= mplayer2 +PORTVERSION= ${MPLAYER2_PORT_VERSION} +CATEGORIES= multimedia audio +MASTER_SITES= http://files.roorback.net/ + +MAINTAINER= magik@roorback.net +COMMENT= Advanced general-purpose video player + +LICENSE= GPLv2 + +LIB_DEPENDS= avcodec:${PORTSDIR}/multimedia/ffmpeg-011 \ + png15:${PORTSDIR}/graphics/png \ + freetype:${PORTSDIR}/print/freetype2 + +USE_XZ= yes +USE_GMAKE= yes +USE_ICONV= yes +USE_NCURSES= yes +HAS_CONFIGURE= yes +CONFIGURE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \ + PTHREAD_LIBS="${PTHREAD_LIBS}" \ + TMPDIR="${WRKSRC}" +CONFIGURE_ARGS= --cc=${CC} \ + --host-cc=${CC} \ + --extra-cflags=-I${LOCALBASE}/include/ffmpeg-011 \ + --extra-ldflags=-L${LOCALBASE}/lib/ffmpeg-011 \ + --mandir=${PREFIX}/man \ + --disable-alsa \ + --disable-bitmap-font \ + --disable-liba52 \ + --disable-directfb \ + --disable-svga \ + --disable-dga1 \ + --disable-dga2 \ + --disable-faad \ + --disable-mng \ + --disable-libdca \ + --disable-xvid \ + --disable-mpg123 \ + --disable-musepack +MAKE_ARGS+= BINDIR=${PREFIX}/bin \ + CONFDIR=${PREFIX}/etc/mplayer + +MPLAYER2_SNAPSHOT_DATE= 2012-05-17 +MPLAYER2_PORT_VERSION= 2.0.${MPLAYER2_SNAPSHOT_DATE:S/-//g} + +MAKE_JOBS_SAFE= yes + +OPTIONS_DEFINE= DEBUG NLS RTC IPV6 SMB JOYSTICK \ + DVDREAD LIBBLURAY V4L LIVEMEDIA DV THEORA \ + X11 XVMC XINERAMA OPENGL SDL VDPAU GIF AALIB CACA \ + MAD SPEEX LIBCDIO LADSPA REALPLAYER \ + JACK NAS PULSE PORTAUDIO \ + ASS FRIBIDI LIRC +OPTIONS_DEFAULT=DVDREAD X11 ASS + +.if !defined(PACKAGE_BUILDING) +OPTIONS_DEFINE+= WIN32 +OPTIONS_DEFAULT+= WIN32 +.endif + +DVDREAD_DESC= Enable dvdread support +RTC_DESC= Enable kernel realtime clock timing +PULSE_DESC= Enable PulseAudio support +THEORA_DESC= Enable ogg theora video support +ASS_DESC= Enable ASS/SSA subtitle rendering +WIN32_DESC= Enable win32 codec set on the IA32 arch +REALPLAYER_DESC=Enable realplayer plugin +LIVEMEDIA_DESC= Enable LIVE555 streaming support +FRIBIDI_DESC= Enable FriBiDi support +LIRC_DESC= Enable lirc support +LIBCDIO_DESC= Enable libcdio support +JOYSTICK_DESC= Enable joystick support +V4L_DESC= Enable Video4Linux TV support + +MAN1= mplayer.1 +MANCOMPRESSED= no + +SUB_FILES= pkg-message + +CONFLICTS= mplayer-1.* + +.include <bsd.port.options.mk> + +.if ${ARCH} == "sparc64" +BROKEN= Does not compile on sparc64 +.endif + +.if ${OSVERSION} < 802502 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-base_system_log2f +.endif + +.if ${OSVERSION} < 803000 +CONFIGURE_ARGS+= --disable-ssse3 +.endif + +.if ${PORT_OPTIONS:MNLS} +USE_GETTEXT= yes +CONFIGURE_ARGS+= --enable-translation --language=all \ + --extra-libs-mplayer=-lintl +MANLANG= "" cs de es fr hu it pl ru zh_CN +.else +CONFIGURE_ARGS+= --disable-translation --language=en +.endif + +#On i386, gcc runs out of general purpose registers when +#trying to compile a debug version with the default flags. +.if ${PORT_OPTIONS:MDEBUG} +.if ${ARCH} == "i386" +DEBUG_FLAGS= -g -O -fomit-frame-pointer +.endif +.else +.if defined(PACKAGE_BUILDING) +CONFIGURE_ARGS+= --enable-runtime-cpudetection +CFLAGS+= -O2 -fomit-frame-pointer +.else +CONFIGURE_ENV+= CPPFLAGS= CFLAGS= LDFLAGS= +.endif +.endif + +.if ${PORT_OPTIONS:MIPV6} +CATEGORIES+= ipv6 +.else +CONFIGURE_ARGS+= --disable-inet6 +.endif + +.if ${PORT_OPTIONS:MGIF} +LIB_DEPENDS+= gif:${PORTSDIR}/graphics/giflib +.else +CONFIGURE_ARGS+= --disable-gif +.endif + +.if ${PORT_OPTIONS:MMAD} +LIB_DEPENDS+= mad:${PORTSDIR}/audio/libmad +.else +CONFIGURE_ARGS+= --disable-mad +.endif + +.if ${PORT_OPTIONS:MDV} +LIB_DEPENDS+= dv:${PORTSDIR}/multimedia/libdv +.else +CONFIGURE_ARGS+= --disable-libdv +.endif + +.if ${PORT_OPTIONS:MTHEORA} +LIB_DEPENDS+= theora:${PORTSDIR}/multimedia/libtheora +.else +CONFIGURE_ARGS+= --disable-theora +.endif + +.if ${PORT_OPTIONS:MSPEEX} +LIB_DEPENDS+= speex:${PORTSDIR}/audio/speex +.else +CONFIGURE_ARGS+= --disable-speex +.endif + +.if ${PORT_OPTIONS:MLIVEMEDIA} +BUILD_DEPENDS+= ${LOCALBASE}/live/liveMedia/libliveMedia.a:${PORTSDIR}/net/liveMedia +.else +CONFIGURE_ARGS+= --disable-live +.endif + +.if ${PORT_OPTIONS:MJACK} +LIB_DEPENDS+= jack:${PORTSDIR}/audio/jack +.else +CONFIGURE_ARGS+= --disable-jack +.endif + +.if ${PORT_OPTIONS:MNAS} +LIB_DEPENDS+= audio:${PORTSDIR}/audio/nas +.else +CONFIGURE_ARGS+= --disable-nas +.endif + +.if ${PORT_OPTIONS:MPULSE} +LIB_DEPENDS+= pulse:${PORTSDIR}/audio/pulseaudio +.else +CONFIGURE_ARGS+= --disable-pulse +.endif + +.if ${PORT_OPTIONS:MPORTAUDIO} +LIB_DEPENDS+= portaudio.2:${PORTSDIR}/audio/portaudio2 +.else +CONFIGURE_ARGS+= --disable-portaudio +.endif + +.if ${PORT_OPTIONS:MLIBBLURAY} +LIB_DEPENDS+= bluray:${PORTSDIR}/multimedia/libbluray +CONFIGURE_ARGS+= --enable-bluray +.else +CONFIGURE_ARGS+= --disable-bluray +.endif + +.if ${PORT_OPTIONS:MDVDREAD} +LIB_DEPENDS+= dvdread:${PORTSDIR}/multimedia/libdvdread +CONFIGURE_ARGS+= --enable-dvdread +.else +CONFIGURE_ARGS+= --disable-dvdread +.endif + +.if ${PORT_OPTIONS:MSMB} +LIB_DEPENDS+= smbclient:${PORTSDIR}/net/samba-libsmbclient +.else +CONFIGURE_ARGS+= --disable-smb +.endif + +.if ${PORT_OPTIONS:MFRIBIDI} +LIB_DEPENDS+= fribidi:${PORTSDIR}/converters/fribidi +.else +CONFIGURE_ARGS+= --disable-fribidi +.endif + +.if ${PORT_OPTIONS:MLIBCDIO} +LIB_DEPENDS+= cdio:${PORTSDIR}/sysutils/libcdio +.else +CONFIGURE_ARGS+= --disable-libcdio +.endif + +.if ${PORT_OPTIONS:MLADSPA} +RUN_DEPENDS+= ${LOCALBASE}/lib/ladspa/amp.so:${PORTSDIR}/audio/ladspa +.else +CONFIGURE_ARGS+= --disable-ladspa +.endif + +.if defined(WITH_DVD_DEVICE) +DEFAULT_DVD_DEVICE= ${WITH_DVD_DEVICE} +.else +DEFAULT_DVD_DEVICE= /dev/cd0 +.endif + +.if defined(WITH_CDROM_DEVICE) +DEFAULT_CDROM_DEVICE= ${WITH_CDROM_DEVICE} +.else +DEFAULT_CDROM_DEVICE= /dev/cd0 +.endif + +.if ${ARCH} == "i386" || ${ARCH} == "amd64" +.if ${PORT_OPTIONS:MWIN32} && !defined(PACKAGE_BUILDING) && ${ARCH} == "i386" +CODEC_PORT= ${PORTSDIR}/multimedia/win32-codecs +CODEC_DETECTION_FILE!= ${MAKE} -f ${CODEC_PORT}/Makefile -V CODEC_DETECTION_FILE +RUN_DEPENDS+= ${CODEC_DETECTION_FILE}:${CODEC_PORT} +CONFIGURE_ARGS+= --codecsdir=${LOCALBASE}/lib/win32 +.else +CONFIGURE_ARGS+= --disable-win32dll --disable-qtx +.endif +.endif # ARCH == i386/amd64 + +.if ${PORT_OPTIONS:MREALPLAYER} +RUN_DEPENDS+= realplay:${PORTSDIR}/multimedia/linux-realplayer +BUILD_DEPENDS+= realplay:${PORTSDIR}/multimedia/linux-realplayer +.else +CONFIGURE_ARGS+= --disable-real +.endif + +.if ${PORT_OPTIONS:MV4L} +BUILD_DEPENDS+= ${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat +LIB_DEPENDS+= v4l2:${PORTSDIR}/multimedia/libv4l +CONFIGURE_ARGS+= --enable-tv-v4l1 --enable-tv-v4l2 +EXTRA_LIBS+= -lv4l1 -lv4l2 +.else +CONFIGURE_ARGS+= --disable-tv-v4l1 --disable-tv-v4l2 +.endif + +.if defined(EXTRA_LIBS) +CONFIGURE_ARGS+= --extra-libs="${EXTRA_LIBS}" +.endif + +.if ${PORT_OPTIONS:MASS} +LIB_DEPENDS+= ass:${PORTSDIR}/multimedia/libass +.else +CONFIGURE_ARGS+= --disable-libass --disable-enca +.endif + +.if ${PORT_OPTIONS:MX11} +USE_XORG= x11 xv xxf86vm +.if ${PORT_OPTIONS:MOPENGL} +USE_XORG+= glproto +LIB_DEPENDS+= GL:${PORTSDIR}/graphics/libGL +.else +CONFIGURE_ARGS+= --disable-gl +.endif +.if ${PORT_OPTIONS:MXINERAMA} +USE_XORG+= xinerama xineramaproto +.else +CONFIGURE_ARGS+= --disable-xinerama +.endif +.if ${PORT_OPTIONS:MXVMC} +USE_XORG+= xvmc +CONFIGURE_ARGS+= --enable-xvmc --with-xvmclib=XvMCW +.endif +.else #WITHOUT_X11 +CONFIGURE_ARGS+= --disable-x11 --disable-fontconfig +.endif + +.if ${PORT_OPTIONS:MVDPAU} +LIB_DEPENDS+= vdpau:${PORTSDIR}/multimedia/libvdpau +.else +CONFIGURE_ARGS+= --disable-vdpau +.endif + +.if ${PORT_OPTIONS:MRTC} +BUILD_DEPENDS+= ${LOCALBASE}/modules/rtc.ko:${PORTSDIR}/emulators/rtc +RUN_DEPENDS+= ${LOCALBASE}/modules/rtc.ko:${PORTSDIR}/emulators/rtc +CONFIGURE_ARGS+= --enable-rtc +.else +CONFIGURE_ARGS+= --disable-rtc +.endif + +.if ${PORT_OPTIONS:MLIBCACA} +LIB_DEPENDS+= caca:${PORTSDIR}/graphics/libcaca +.else +CONFIGURE_ARGS+= --disable-caca +.endif + +.if ${PORT_OPTIONS:MLIRC} +LIB_DEPENDS+= lirc_client:${PORTSDIR}/comms/lirc +.else +CONFIGURE_ARGS+= --disable-lirc +.endif + +.if ${PORT_OPTIONS:MSDL} +USE_SDL= sdl +.else +CONFIGURE_ARGS+= --disable-sdl +.endif + +.if ${PORT_OPTIONS:MAALIB} +LIB_DEPENDS+= aa:${PORTSDIR}/graphics/aalib +.else +CONFIGURE_ARGS+= --disable-aa +.endif + +.if defined(WITH_KERN_HZ) +DEFAULT_KERN_HZ=${WITH_KERN_HZ} +.else +DEFAULT_KERN_HZ=1024 +.endif + +.if ${PORT_OPTIONS:MJOYSTICK} +BUILD_DEPENDS+= ${LOCALBASE}/include/linux/joystick.h:${PORTSDIR}/devel/linux-js +CONFIGURE_ARGS+= --enable-joystick +.else +CONFIGURE_ARGS+= --disable-joystick +.endif + +pre-everything:: + @${ECHO_MSG} "N - O - T - E" + @${ECHO_MSG} "" + @${ECHO_MSG} "There are some knobs which *can* *not* be selected via the" + @${ECHO_MSG} "OPTIONS framework. You might want to check the Makefile in" + @${ECHO_MSG} "order to learn more about them." + +post-patch: +.if ${OSVERSION} >= 900010 + @${REINPLACE_CMD} -e \ + '/CFLAGS.*-D_LARGEFILE64_SOURCE/ s/-D_LARGEFILE64_SOURCE/-D_FILE_OFFSET_BITS=64/' \ + ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} +.endif + @${REINPLACE_CMD} \ + -e 's/libavutil/libavutil-011/' \ + -e 's/libavcodec/libavcodec-011/' \ + -e 's/libavformat/libavformat-011/' \ + -e 's/libswscale/libswscale-011/' \ + ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} + @${REINPLACE_CMD} \ + -e 's|/dev/dvd|${DEFAULT_DVD_DEVICE}|; \ + s|/dev/cdrom|${DEFAULT_CDROM_DEVICE}|' \ + -e 's|/usr/local|${LOCALBASE}|' \ + -e 's|-lbz2|/usr/lib/libbz2.so|' \ + -e 's|-lncurses|/usr/lib/libncurses.so|' \ + ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} + @${FIND} -E ${WRKSRC} -type f \ + -iregex ".*(configure|.sh|Makefile)" -print0 | \ + ${XARGS} -x -0 -n 10 \ + ${REINPLACE_CMD} -E \ + -e 's|[[:space:]]gcc[-[:digit:]\.]+| ${CC}|' \ + -e 's|[[:space:]]gcc| ${CC}|' \ + -e 's|\$$\(CC\)|${CC}|' \ + -e 's|/usr/X11R6|${LOCALBASE}|' + @${FIND} ${WRKSRC}/DOCS/man -name "mplayer.1" | ${XARGS} ${REINPLACE_CMD} -E -e \ + 's|/usr/\\:local/\\:etc/\\:mplayer|${DATADIR:S/\//\/\\\:/g}|g ; \ + s|/dev/\\:(dvd[[:alnum:]]*[[:>:]])|${DEFAULT_DVD_DEVICE:S/dev\//dev\/\\\:/}|g ; \ + s|/dev/\\:(cdrom[[:alnum:]]*[[:>:]])|${DEFAULT_CDROM_DEVICE:S/dev\//dev\/\\\:/}|g' +.if ${PORT_OPTIONS:MRTC} + @${REINPLACE_CMD} -e \ + 's|irqp = 1024|irqp = ${DEFAULT_KERN_HZ}|' \ + ${WRKSRC}/mplayer.c +.endif + +post-install: + @${INSTALL_DATA} ${WRKSRC}/etc/example.conf ${PREFIX}/etc/mplayer/mplayer.conf.sample +.for conf in codecs input + @${INSTALL_DATA} ${WRKSRC}/etc/${conf}.conf ${PREFIX}/etc/mplayer/${conf}.conf.sample +.endfor + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/multimedia/mplayer2/distinfo b/multimedia/mplayer2/distinfo new file mode 100644 index 000000000000..93c61d6eba31 --- /dev/null +++ b/multimedia/mplayer2/distinfo @@ -0,0 +1,2 @@ +SHA256 (mplayer2-2.0.20120517.tar.xz) = 1aba353930064a778f0a3381d8cc54256adafbecd2ae9a581e531ad7ac72ab2b +SIZE (mplayer2-2.0.20120517.tar.xz) = 3320192 diff --git a/multimedia/mplayer2/files/extra-patch-base_system_log2f b/multimedia/mplayer2/files/extra-patch-base_system_log2f new file mode 100644 index 000000000000..b149c29ce690 --- /dev/null +++ b/multimedia/mplayer2/files/extra-patch-base_system_log2f @@ -0,0 +1,21 @@ +--- configure~ 2012-05-12 01:10:33.294799627 -0500 ++++ configure 2012-05-12 01:13:51.714477505 -0500 +@@ -2819,7 +2819,7 @@ if test "$_posix4" = yes ; then + fi + echores "$_posix4" + +-for func in exp2 exp2f llrint log2 log2f lrint lrintf round roundf truncf; do ++for func in exp2 exp2f llrint lrint lrintf round roundf truncf; do + echocheck $func + eval _$func=no + statement_check math.h "${func}(2.0)" -D_ISOC99_SOURCE $_ld_lm && eval _$func=yes +@@ -2831,6 +2831,9 @@ else + echores no + fi + done ++for func in log2 log2f; do ++ eval def_$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\"" ++done + + + echocheck "mkstemp" diff --git a/multimedia/mplayer2/files/patch-configure b/multimedia/mplayer2/files/patch-configure new file mode 100644 index 000000000000..296e732fed79 --- /dev/null +++ b/multimedia/mplayer2/files/patch-configure @@ -0,0 +1,29 @@ +--- configure.orig 2012-05-12 01:08:28.473233004 -0500 ++++ configure 2012-05-12 01:10:33.294799627 -0500 +@@ -3111,7 +3111,7 @@ echocheck "pthread" + if linux ; then + THREAD_CFLAGS=-D_REENTRANT + elif freebsd || netbsd || openbsd || bsdos ; then +- THREAD_CFLAGS=-D_THREAD_SAFE ++ THREAD_CFLAGS=${PTHREAD_CFLAGS} + fi + if test "$_pthreads" = auto ; then + cat > $TMPC << EOF +@@ -3128,7 +3128,7 @@ int main(void) { + EOF + _pthreads=no + if ! hpux ; then +- for _ld_tmp in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do ++ for _ld_tmp in ${PTHREAD_LIBS} ; do + # for crosscompilation, we cannot execute the program, be happy if we can link statically + cc_check $THREAD_CFLAGS $_ld_tmp && (tmp_run || test "$_ld_static") && _ld_pthread="$_ld_tmp" && _pthreads=yes && break + done +@@ -6340,7 +6340,7 @@ TIMER = $_timer + EXESUF = $_exesuf + EXESUFS_ALL = .exe + +-ARCH = $arch ++MPLAYER_ARCH = $arch + $(mak_enable "$arch_all" "$arch" ARCH) + $(mak_enable "$subarch_all" "$subarch" ARCH) + $(mak_enable "$cpuexts_all" "$cpuexts" HAVE) diff --git a/multimedia/mplayer2/files/patch-libao2-ao_oss.c b/multimedia/mplayer2/files/patch-libao2-ao_oss.c new file mode 100644 index 000000000000..da5a47c9ac75 --- /dev/null +++ b/multimedia/mplayer2/files/patch-libao2-ao_oss.c @@ -0,0 +1,18 @@ +--- libao2/ao_oss.c~ 2012-05-10 23:45:22.000000000 -0500 ++++ libao2/ao_oss.c 2012-05-11 00:03:17.820525648 -0500 +@@ -460,6 +460,7 @@ static void reset(void){ + fcntl(audio_fd, F_SETFD, FD_CLOEXEC); + #endif + ++ ioctl (audio_fd, SNDCTL_DSP_SPEED, &ao_data.samplerate); + oss_format = format2oss(ao_data.format); + if(AF_FORMAT_IS_AC3(ao_data.format)) + ioctl (audio_fd, SNDCTL_DSP_SPEED, &ao_data.samplerate); +@@ -471,7 +472,6 @@ static void reset(void){ + int c = ao_data.channels-1; + ioctl (audio_fd, SNDCTL_DSP_STEREO, &c); + } +- ioctl (audio_fd, SNDCTL_DSP_SPEED, &ao_data.samplerate); + } + } + diff --git a/multimedia/mplayer2/files/patch-stream-tvi_bsdbt848.c b/multimedia/mplayer2/files/patch-stream-tvi_bsdbt848.c new file mode 100644 index 000000000000..7b5f55815a04 --- /dev/null +++ b/multimedia/mplayer2/files/patch-stream-tvi_bsdbt848.c @@ -0,0 +1,76 @@ +--- stream/tvi_bsdbt848.c.orig 2009-05-12 21:58:57.000000000 -0500 ++++ stream/tvi_bsdbt848.c 2009-07-23 20:39:13.536681248 -0500 +@@ -352,11 +352,11 @@ + int req_mode = *(int *)arg; + u_short tmp_fps; + +- priv->iformat = METEOR_FMT_AUTOMODE; ++ priv->iformat = BT848_IFORM_F_AUTO; + + if(req_mode == TV_NORM_PAL) + { +- priv->iformat = METEOR_FMT_PAL; ++ priv->iformat = BT848_IFORM_F_PALBDGHI; + priv->maxheight = PAL_HEIGHT; + priv->maxwidth = PAL_WIDTH; + priv->maxfps = PAL_FPS; +@@ -377,7 +377,7 @@ + + if(req_mode == TV_NORM_NTSC) + { +- priv->iformat = METEOR_FMT_NTSC; ++ priv->iformat = BT848_IFORM_F_NTSCM; + priv->maxheight = NTSC_HEIGHT; + priv->maxwidth = NTSC_WIDTH; + priv->maxfps = NTSC_FPS; +@@ -401,9 +401,28 @@ + } + } + +- if(req_mode == TV_NORM_SECAM) priv->iformat = METEOR_FMT_SECAM; ++ if(req_mode == TV_NORM_SECAM) ++ { ++ priv->iformat = BT848_IFORM_F_SECAM; ++ priv->maxheight = PAL_HEIGHT; ++ priv->maxwidth = PAL_WIDTH; ++ priv->maxfps = PAL_FPS; ++ priv->fps = PAL_FPS; ++ ++ if(priv->fps > priv->maxfps) priv->fps = priv->maxfps; ++ ++ if(priv->geom.rows > priv->maxheight) ++ { ++ priv->geom.rows = priv->maxheight; ++ } ++ ++ if(priv->geom.columns > priv->maxwidth) ++ { ++ priv->geom.columns = priv->maxwidth; ++ } ++ } + +- if(ioctl(priv->btfd, METEORSFMT, &priv->iformat) < 0) ++ if(ioctl(priv->btfd, BT848SFMT, &priv->iformat) < 0) + { + mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSFMT", strerror(errno)); + return TVI_CONTROL_FALSE; +@@ -532,8 +551,9 @@ + /* Video Configuration */ + + priv->videoready = TRUE; ++priv->btdev = strdup("/dev/bktr0"); + priv->immediatemode = FALSE; +-priv->iformat = METEOR_FMT_PAL; ++priv->iformat = BT848_IFORM_F_PALBDGHI; + priv->maxheight = PAL_HEIGHT; + priv->maxwidth = PAL_WIDTH; + priv->maxfps = PAL_FPS; +@@ -558,7 +578,7 @@ + } + + if(priv->videoready == TRUE && +- ioctl(priv->btfd, METEORSFMT, &priv->iformat) < 0) ++ ioctl(priv->btfd, BT848SFMT, &priv->iformat) < 0) + { + mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "SETEORSFMT", strerror(errno)); + } diff --git a/multimedia/mplayer2/files/patch-stream-tvi_v4l.c b/multimedia/mplayer2/files/patch-stream-tvi_v4l.c new file mode 100644 index 000000000000..f2ed47905057 --- /dev/null +++ b/multimedia/mplayer2/files/patch-stream-tvi_v4l.c @@ -0,0 +1,17 @@ +--- 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 = { diff --git a/multimedia/mplayer2/files/patch-stream-tvi_v4l2.c b/multimedia/mplayer2/files/patch-stream-tvi_v4l2.c new file mode 100644 index 000000000000..489fd4323753 --- /dev/null +++ b/multimedia/mplayer2/files/patch-stream-tvi_v4l2.c @@ -0,0 +1,25 @@ +--- stream/tvi_v4l2.c~ 2012-05-10 23:45:22.000000000 -0500 ++++ stream/tvi_v4l2.c 2012-05-11 00:08:34.930938536 -0500 +@@ -52,7 +52,6 @@ known issues: + #ifdef HAVE_SYS_VIDEOIO_H + #include <sys/videoio.h> + #else +-#include <linux/types.h> + #include <linux/videodev2.h> + #endif + #include "mp_msg.h" +@@ -62,6 +61,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 */ diff --git a/multimedia/mplayer2/files/pkg-message.in b/multimedia/mplayer2/files/pkg-message.in new file mode 100644 index 000000000000..1a62284d215e --- /dev/null +++ b/multimedia/mplayer2/files/pkg-message.in @@ -0,0 +1,13 @@ + +================================================================== +MPlayer's system-wide configuration dir is + +%%PREFIX%%/etc/mplayer + +=================================================================== +If seeking in streams causes the playback volume to be reset to +the previous setting (on 8.x or newer system with VPC enabled), +you and you dislike this behaviour, you have two options: +- Use mplayer's -softvol command line option +- Set the sysctl hw.snd.vpc_autoreset to 0 +=================================================================== diff --git a/multimedia/mplayer2/pkg-descr b/multimedia/mplayer2/pkg-descr new file mode 100644 index 000000000000..762c0bcc9804 --- /dev/null +++ b/multimedia/mplayer2/pkg-descr @@ -0,0 +1,6 @@ +MPlayer2 is an advanced general-purpose video player. +A fork of the original MPlayer project, it contains significant further +development and supports a number of features not available +in other Unix players. + +WWW: http://www.mplayer2.org/ diff --git a/multimedia/mplayer2/pkg-plist b/multimedia/mplayer2/pkg-plist new file mode 100644 index 000000000000..53d3acb5f55e --- /dev/null +++ b/multimedia/mplayer2/pkg-plist @@ -0,0 +1,23 @@ +bin/mplayer +etc/mplayer/codecs.conf.sample +etc/mplayer/input.conf.sample +etc/mplayer/mplayer.conf.sample +@dirrmtry etc/mplayer +@dirrmtry man/cs/man1 +@dirrmtry man/cs +@dirrmtry man/de/man1 +@dirrmtry man/de +@dirrmtry man/es/man1 +@dirrmtry man/es +@dirrmtry man/fr/man1 +@dirrmtry man/fr +@dirrmtry man/hu/man1 +@dirrmtry man/hu +@dirrmtry man/it/man1 +@dirrmtry man/it +@dirrmtry man/pl/man1 +@dirrmtry man/pl +@dirrmtry man/ru/man1 +@dirrmtry man/ru +@dirrmtry man/zh_CN/man1 +@dirrmtry man/zh_CN |