diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-video/mplayer/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-video/mplayer/files')
13 files changed, 1020 insertions, 0 deletions
diff --git a/media-video/mplayer/files/dump_ffmpeg.sh b/media-video/mplayer/files/dump_ffmpeg.sh new file mode 100755 index 000000000000..885946df8cc7 --- /dev/null +++ b/media-video/mplayer/files/dump_ffmpeg.sh @@ -0,0 +1,74 @@ +#!/bin/sh + +FFMPEG_DIR=ffmpeg +FFMPEG_MOVED_DIR=ffmpeg_removed +SYSTEM_FFMPEG_DIR=${EPREFIX}/usr/include + +# Move directories + +[ -d "${FFMPEG_DIR}" ] && mv "${FFMPEG_DIR}" "${FFMPEG_MOVED_DIR}" +[ -d "${FFMPEG_MOVED_DIR}" ] || exit 1 +[ -d "${FFMPEG_DIR}" ] || mkdir "${FFMPEG_DIR}" + +# Keep required files and check them + +SANITIZED_REGEXP='^\#[[:space:]]*include.*\".*[.]h\"' +sanitize_includes() { + sed -e "s/^\#[[:space:]]*include.*\"config[.]h\"/#include <config.h>/" \ + -e "s/^\#[[:space:]]*include.*\"\(libav.*\/.*[.]h\)\"/#include \<\1\>/" \ + -e "/${SANITIZED_REGEXP}/{s:\"\(.*\)\":\<${2}\/\1\>:}" ${1} +} + +check_sanitized_includes() { + grep -q "${SANITIZED_REGEXP}" $1 +} + +get_header_deps() { + grep "^#[[:space:]]*include.*\<libav.*[.]h\>" ${1} | \ + sed -e "s/^#[[:space:]]*include.*\<\(libav.*[.]h\)\>/\1/" | \ + tr -d '<>' | tr '\n' ' ' +} + +check_header_deps() { + for i ; do + printf "Checking for the presence of ${i}...\n" + if [ ! -f "${SYSTEM_FFMPEG_DIR}/${i}" -a ! -f "${FFMPEG_DIR}/${i}" ] ; then + printf "Header depends on ${i}\n" + printf "... but that file cannot be found, aborting\n" + exit 1 + fi + done +} + +move_file() { + mydir="$(dirname $1)" + printf "Moving and checking file: ${1}\n" + [ -d "${FFMPEG_DIR}/${mydir}" ] || mkdir -p "${FFMPEG_DIR}/${mydir}" + if [ ! -f "${FFMPEG_DIR}/${1}" ] ; then + sanitize_includes "${FFMPEG_MOVED_DIR}/${1}" ${mydir} > "${FFMPEG_DIR}/${1}" + fi + if $(check_sanitized_includes "${FFMPEG_DIR}/${1}") ; then + printf "Error, found non sanitized file in ffmpeg:\n" + printf "${FFMPEG_DIR}/${1}\n" + printf "Please report it at bugs.gentoo.org\n" + exit 1 + fi + if [ "${1%.h}" != "${1}" ] ; then + mydeps=$(get_header_deps "${FFMPEG_DIR}/${1}") + check_header_deps ${mydeps} + fi +} + +# HEADERS (order matters for the consistency checks: leaves come first) +FILES="libavutil/wchar_filename.h libavformat/os_support.h libavformat/internal.h libavutil/x86/asm.h" +# Files that are sed'ed but not compiled, used to check for availability of +# some codecs +FILES="${FILES} libavcodec/allcodecs.c libavformat/allformats.c libavfilter/allfilters.c" + +for i in ${FILES} ; do + move_file $i +done + +rm -rf "${FFMPEG_MOVED_DIR}" + +exit 0 diff --git a/media-video/mplayer/files/mplayer-1.0_rc4-pkg-config.patch b/media-video/mplayer/files/mplayer-1.0_rc4-pkg-config.patch new file mode 100644 index 000000000000..a93136cf8671 --- /dev/null +++ b/media-video/mplayer/files/mplayer-1.0_rc4-pkg-config.patch @@ -0,0 +1,74 @@ +respect $PKG_CONFIG, and use pkg-config for libdvdnav/libdvdread by +default rather than the ugly xxx-config scripts + +https://bugs.gentoo.org/410189 + +hassle vapier@gentoo.org if this causes issues + +--- configure ++++ configure +@@ -4042,7 +4042,7 @@ echores "$_apple_ir" + fi #if linux + + echocheck "pkg-config" +-_pkg_config=pkg-config ++_pkg_config=${PKG_CONFIG:-pkg-config} + if $($_pkg_config --version > /dev/null 2>&1); then + if test "$ld_static"; then + _pkg_config="$_pkg_config --static" +@@ -5740,8 +5740,13 @@ if test "$_dvdread_internal" = auto ; th + elif test "$_dvdread" = auto ; then + _dvdread=no + if test "$_dl" = yes; then +- _dvdreadcflags=$($_dvdreadconfig --cflags 2> /dev/null) +- _dvdreadlibs=$($_dvdreadconfig --libs 2> /dev/null) ++ if ! $_pkg_config --exists dvdread ; then ++ _dvdreadcflags=$($_pkgconfig dvdread --cflags) ++ _dvdreadlibs=$($_pkgconfig dvdread --libs) ++ else ++ _dvdreadcflags=$($_dvdreadconfig --cflags 2> /dev/null) ++ _dvdreadlibs=$($_dvdreadconfig --libs 2> /dev/null) ++ fi + if header_check dvdread/dvd_reader.h $_dvdreadcflags $_dvdreadlibs $ld_dl ; then + _dvdread=yes + extra_cflags="$extra_cflags $_dvdreadcflags" +@@ -7721,13 +7726,20 @@ if test "$_dvdnav" = auto ; then + dvdnav_internal=yes + res_comment="internal" + else +- $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no ++ if ! $_pkg_config --exists dvdnavmini ; then ++ $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no ++ fi + fi + fi + if test "$_dvdnav" = auto ; then + _dvdnav=no +- _dvdnavdir=$($_dvdnavconfig --cflags) +- _dvdnavlibs=$($_dvdnavconfig --libs) ++ if $_pkg_config --exists dvdnavmini ; then ++ _dvdnavdir=$($_pkg_config --cflags dvdnavmini) ++ _dvdnavlibs=$($_pkg_config --libs dvdnavmini) ++ else ++ _dvdnavdir=$($_dvdnavconfig --cflags) ++ _dvdnavlibs=$($_dvdnavconfig --libs) ++ fi + statement_check_broken stdint.h dvdnav/dvdnav.h 'dvdnav_t *dvd = 0' $_dvdnavdir $_dvdnavlibs $ld_dl $ld_pthread && _dvdnav=yes + fi + if test "$_dvdnav" = yes ; then +@@ -7736,8 +7748,13 @@ if test "$_dvdnav" = yes ; then + cflags_libdvdnav="-Ilibdvdnav" + inputmodules="dvdnav(internal) $inputmodules" + else +- extra_cflags="$extra_cflags $($_dvdnavconfig --cflags)" +- extra_ldflags="$extra_ldflags $($_dvdnavconfig --minilibs)" ++ if $_pkg_config --exists dvdnavmini ; then ++ extra_cflags="$extra_cflags $($_pkg_config --cflags dvdnavmini)" ++ extra_ldflags="$extra_ldflags $($_pkg_config --libs dvdnavmini)" ++ else ++ extra_cflags="$extra_cflags $($_dvdnavconfig --cflags)" ++ extra_ldflags="$extra_ldflags $($_dvdnavconfig --minilibs)" ++ fi + inputmodules="dvdnav $inputmodules" + fi + else diff --git a/media-video/mplayer/files/mplayer-1.1-codecid.patch b/media-video/mplayer/files/mplayer-1.1-codecid.patch new file mode 100644 index 000000000000..38a58aa0f47b --- /dev/null +++ b/media-video/mplayer/files/mplayer-1.1-codecid.patch @@ -0,0 +1,19 @@ +r35075 | iive | 2012-08-11 12:42:43 -0400 (Sat, 11 Aug 2012) | 4 lines + +Quick Build Fix. FFmpeg CodecID is redefined as AVCodecID. +It needs the FFmpeg includes in all places that use it. + + +Index: libmpdemux/mp_taglists.h +=================================================================== +--- libmpdemux/mp_taglists.h (revision 35074) ++++ libmpdemux/mp_taglists.h (revision 35075) +@@ -20,6 +20,8 @@ + #define MPLAYER_MP_TAGLISTS_H + + #include <stdint.h> ++#include "libavutil/common.h" ++#include "libavformat/avformat.h" + + enum CodecID mp_tag2codec_id(uint32_t tag, int audio); + uint32_t mp_codec_id2tag(enum CodecID codec_id, uint32_t old_tag, int audio); diff --git a/media-video/mplayer/files/mplayer-1.1-ffmpeg.patch b/media-video/mplayer/files/mplayer-1.1-ffmpeg.patch new file mode 100644 index 000000000000..6ec6ef72fe8c --- /dev/null +++ b/media-video/mplayer/files/mplayer-1.1-ffmpeg.patch @@ -0,0 +1,34 @@ +Let it build with ffmpeg 0.10.3. + +Index: MPlayer-1.1/fmt-conversion.c +=================================================================== +--- MPlayer-1.1.orig/fmt-conversion.c ++++ MPlayer-1.1/fmt-conversion.c +@@ -65,9 +65,13 @@ static const struct { + {IMGFMT_RGBA, PIX_FMT_RGB0}, + {IMGFMT_RGB64LE, PIX_FMT_RGBA64LE}, + {IMGFMT_RGB64BE, PIX_FMT_RGBA64BE}, ++#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 50, 0) + {IMGFMT_422A, PIX_FMT_YUVA422P}, ++#endif ++#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 35, 101) + {IMGFMT_444A, PIX_FMT_YUVA444P}, + #endif ++#endif + #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 20, 1) + {IMGFMT_GBR24P, PIX_FMT_GBRP}, + #endif +Index: MPlayer-1.1/libmpdemux/mp_taglists.c +=================================================================== +--- MPlayer-1.1.orig/libmpdemux/mp_taglists.c ++++ MPlayer-1.1/libmpdemux/mp_taglists.c +@@ -125,7 +125,9 @@ static const struct AVCodecTag mp_bmp_ta + { CODEC_ID_BMV_VIDEO, MKTAG('B', 'M', 'V', 'V')}, + { CODEC_ID_C93, MKTAG('C', '9', '3', 'V')}, + { CODEC_ID_CDGRAPHICS, MKTAG('C', 'D', 'G', 'R')}, ++#if LIBAVCODEC_VERSION_INT > AV_VERSION_INT(54,1,0) + { CODEC_ID_CDXL, MKTAG('C', 'D', 'X', 'L')}, ++#endif + { CODEC_ID_CMV, MKTAG('M', 'V', 'I', 'f')}, + { CODEC_ID_DFA, MKTAG('C', 'D', 'F', 'A')}, + { CODEC_ID_DNXHD, MKTAG('A', 'V', 'd', 'n')}, diff --git a/media-video/mplayer/files/mplayer-1.1-libav-0.8.patch b/media-video/mplayer/files/mplayer-1.1-libav-0.8.patch new file mode 100644 index 000000000000..acfb60584a96 --- /dev/null +++ b/media-video/mplayer/files/mplayer-1.1-libav-0.8.patch @@ -0,0 +1,21 @@ +--- mplayer-1.0~svn34750.orig/libmpcodecs/vd_ffmpeg.c ++++ mplayer-1.0~svn34750/libmpcodecs/vd_ffmpeg.c +@@ -47,6 +47,18 @@ + + #include "libavcodec/avcodec.h" + ++#ifndef AV_EF_COMPLIANT ++#define AV_EF_COMPLIANT 0 ++#endif ++ ++#ifndef AV_EF_CAREFUL ++#define AV_EF_CAREFUL 0 ++#endif ++ ++#ifndef AV_EF_AGGRESSIVE ++#define AV_EF_AGGRESSIVE 0 ++#endif ++ + #if AVPALETTE_SIZE > 1024 + #error palette too large, adapt libmpcodecs/vf.c:vf_get_image + #endif diff --git a/media-video/mplayer/files/mplayer-1.1-libav-9.patch b/media-video/mplayer/files/mplayer-1.1-libav-9.patch new file mode 100644 index 000000000000..a2630b61bbcf --- /dev/null +++ b/media-video/mplayer/files/mplayer-1.1-libav-9.patch @@ -0,0 +1,488 @@ +diff -urN MPlayer-1.1.orig//av_opts.c MPlayer-1.1/av_opts.c +--- MPlayer-1.1.orig//av_opts.c 2012-01-28 14:51:57.000000000 +0100 ++++ MPlayer-1.1/av_opts.c 2013-01-17 09:29:34.472213703 +0100 +@@ -42,7 +42,7 @@ + arg = strchr(str, '='); + if(arg) *arg++= 0; + +- if(av_set_string3(v, str, arg, 0, NULL) < 0){ ++ if(av_opt_set(v, str, arg, 0) < 0){ + free(start); + return -1; + } +diff -urN MPlayer-1.1.orig//bstr.c MPlayer-1.1/bstr.c +--- MPlayer-1.1.orig//bstr.c 2010-07-19 00:00:48.000000000 +0200 ++++ MPlayer-1.1/bstr.c 2013-01-17 09:43:10.787183988 +0100 +@@ -18,6 +18,7 @@ + + #include <string.h> + #include <libavutil/avutil.h> ++#include <libavutil/common.h> + + #include "bstr.h" + +diff -urN MPlayer-1.1.orig//codec-cfg.c MPlayer-1.1/codec-cfg.c +--- MPlayer-1.1.orig//codec-cfg.c 2012-05-08 12:56:22.000000000 +0200 ++++ MPlayer-1.1/codec-cfg.c 2013-01-17 09:34:39.860202586 +0100 +@@ -54,6 +54,7 @@ + #include "help_mp.h" + + #include "libavutil/avutil.h" ++#include "libavutil/common.h" + #include "libmpcodecs/img_format.h" + #include "codec-cfg.h" + +diff -urN MPlayer-1.1.orig//fmt-conversion.c MPlayer-1.1/fmt-conversion.c +--- MPlayer-1.1.orig//fmt-conversion.c 2013-01-17 09:16:03.213243232 +0100 ++++ MPlayer-1.1/fmt-conversion.c 2013-01-17 09:28:32.490215959 +0100 +@@ -26,134 +26,134 @@ + + static const struct { + int fmt; +- enum PixelFormat pix_fmt; ++ enum AVPixelFormat pix_fmt; + } conversion_map[] = { +- {IMGFMT_ARGB, PIX_FMT_ARGB}, +- {IMGFMT_BGRA, PIX_FMT_BGRA}, +- {IMGFMT_BGR24, PIX_FMT_BGR24}, +- {IMGFMT_BGR16BE, PIX_FMT_RGB565BE}, +- {IMGFMT_BGR16LE, PIX_FMT_RGB565LE}, +- {IMGFMT_BGR15BE, PIX_FMT_RGB555BE}, +- {IMGFMT_BGR15LE, PIX_FMT_RGB555LE}, +- {IMGFMT_BGR12BE, PIX_FMT_RGB444BE}, +- {IMGFMT_BGR12LE, PIX_FMT_RGB444LE}, +- {IMGFMT_BGR8, PIX_FMT_RGB8}, +- {IMGFMT_BGR4, PIX_FMT_RGB4}, +- {IMGFMT_BGR1, PIX_FMT_MONOBLACK}, +- {IMGFMT_RGB1, PIX_FMT_MONOBLACK}, +- {IMGFMT_RG4B, PIX_FMT_BGR4_BYTE}, +- {IMGFMT_BG4B, PIX_FMT_RGB4_BYTE}, +- {IMGFMT_RGB48LE, PIX_FMT_RGB48LE}, +- {IMGFMT_RGB48BE, PIX_FMT_RGB48BE}, +- {IMGFMT_ABGR, PIX_FMT_ABGR}, +- {IMGFMT_RGBA, PIX_FMT_RGBA}, +- {IMGFMT_RGB24, PIX_FMT_RGB24}, +- {IMGFMT_RGB16BE, PIX_FMT_BGR565BE}, +- {IMGFMT_RGB16LE, PIX_FMT_BGR565LE}, +- {IMGFMT_RGB15BE, PIX_FMT_BGR555BE}, +- {IMGFMT_RGB15LE, PIX_FMT_BGR555LE}, +- {IMGFMT_RGB12BE, PIX_FMT_BGR444BE}, +- {IMGFMT_RGB12LE, PIX_FMT_BGR444LE}, +- {IMGFMT_RGB8, PIX_FMT_BGR8}, +- {IMGFMT_RGB4, PIX_FMT_BGR4}, +- {IMGFMT_BGR8, PIX_FMT_PAL8}, +-// NB: This works only because PIX_FMT_0RGB32 is a CPP Macro. +-// note that most other PIX_FMT values are enums +-#ifdef PIX_FMT_0RGB32 +- {IMGFMT_BGR32, PIX_FMT_0RGB32}, +- {IMGFMT_BGRA, PIX_FMT_BGR0}, +- {IMGFMT_RGBA, PIX_FMT_RGB0}, +- {IMGFMT_RGB64LE, PIX_FMT_RGBA64LE}, +- {IMGFMT_RGB64BE, PIX_FMT_RGBA64BE}, ++ {IMGFMT_ARGB, AV_PIX_FMT_ARGB}, ++ {IMGFMT_BGRA, AV_PIX_FMT_BGRA}, ++ {IMGFMT_BGR24, AV_PIX_FMT_BGR24}, ++ {IMGFMT_BGR16BE, AV_PIX_FMT_RGB565BE}, ++ {IMGFMT_BGR16LE, AV_PIX_FMT_RGB565LE}, ++ {IMGFMT_BGR15BE, AV_PIX_FMT_RGB555BE}, ++ {IMGFMT_BGR15LE, AV_PIX_FMT_RGB555LE}, ++ {IMGFMT_BGR12BE, AV_PIX_FMT_RGB444BE}, ++ {IMGFMT_BGR12LE, AV_PIX_FMT_RGB444LE}, ++ {IMGFMT_BGR8, AV_PIX_FMT_RGB8}, ++ {IMGFMT_BGR4, AV_PIX_FMT_RGB4}, ++ {IMGFMT_BGR1, AV_PIX_FMT_MONOBLACK}, ++ {IMGFMT_RGB1, AV_PIX_FMT_MONOBLACK}, ++ {IMGFMT_RG4B, AV_PIX_FMT_BGR4_BYTE}, ++ {IMGFMT_BG4B, AV_PIX_FMT_RGB4_BYTE}, ++ {IMGFMT_RGB48LE, AV_PIX_FMT_RGB48LE}, ++ {IMGFMT_RGB48BE, AV_PIX_FMT_RGB48BE}, ++ {IMGFMT_ABGR, AV_PIX_FMT_ABGR}, ++ {IMGFMT_RGBA, AV_PIX_FMT_RGBA}, ++ {IMGFMT_RGB24, AV_PIX_FMT_RGB24}, ++ {IMGFMT_RGB16BE, AV_PIX_FMT_BGR565BE}, ++ {IMGFMT_RGB16LE, AV_PIX_FMT_BGR565LE}, ++ {IMGFMT_RGB15BE, AV_PIX_FMT_BGR555BE}, ++ {IMGFMT_RGB15LE, AV_PIX_FMT_BGR555LE}, ++ {IMGFMT_RGB12BE, AV_PIX_FMT_BGR444BE}, ++ {IMGFMT_RGB12LE, AV_PIX_FMT_BGR444LE}, ++ {IMGFMT_RGB8, AV_PIX_FMT_BGR8}, ++ {IMGFMT_RGB4, AV_PIX_FMT_BGR4}, ++ {IMGFMT_BGR8, AV_PIX_FMT_PAL8}, ++// NB: This works only because AV_PIX_FMT_0RGB32 is a CPP Macro. ++// note that most other AV_PIX_FMT values are enums ++#ifdef AV_PIX_FMT_0RGB32 ++ {IMGFMT_BGR32, AV_PIX_FMT_0RGB32}, ++ {IMGFMT_BGRA, AV_PIX_FMT_BGR0}, ++ {IMGFMT_RGBA, AV_PIX_FMT_RGB0}, ++ {IMGFMT_RGB64LE, AV_PIX_FMT_RGBA64LE}, ++ {IMGFMT_RGB64BE, AV_PIX_FMT_RGBA64BE}, + #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 50, 0) +- {IMGFMT_422A, PIX_FMT_YUVA422P}, ++ {IMGFMT_422A, AV_PIX_FMT_YUVA422P}, + #endif + #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 35, 101) +- {IMGFMT_444A, PIX_FMT_YUVA444P}, ++ {IMGFMT_444A, AV_PIX_FMT_YUVA444P}, + #endif + #endif + #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 20, 1) +- {IMGFMT_GBR24P, PIX_FMT_GBRP}, ++ {IMGFMT_GBR24P, AV_PIX_FMT_GBRP}, + #endif +- {IMGFMT_YUY2, PIX_FMT_YUYV422}, +- {IMGFMT_UYVY, PIX_FMT_UYVY422}, +- {IMGFMT_NV12, PIX_FMT_NV12}, +- {IMGFMT_NV21, PIX_FMT_NV21}, +- {IMGFMT_Y800, PIX_FMT_GRAY8}, +- {IMGFMT_Y8, PIX_FMT_GRAY8}, +- {IMGFMT_YVU9, PIX_FMT_YUV410P}, +- {IMGFMT_IF09, PIX_FMT_YUV410P}, +- {IMGFMT_YV12, PIX_FMT_YUV420P}, +- {IMGFMT_I420, PIX_FMT_YUV420P}, +- {IMGFMT_IYUV, PIX_FMT_YUV420P}, +- {IMGFMT_411P, PIX_FMT_YUV411P}, +- {IMGFMT_422P, PIX_FMT_YUV422P}, +- {IMGFMT_444P, PIX_FMT_YUV444P}, +- {IMGFMT_440P, PIX_FMT_YUV440P}, +- +- {IMGFMT_420A, PIX_FMT_YUVA420P}, +- +- {IMGFMT_420P16_LE, PIX_FMT_YUV420P16LE}, +- {IMGFMT_420P16_BE, PIX_FMT_YUV420P16BE}, +- {IMGFMT_420P10_LE, PIX_FMT_YUV420P10LE}, +- {IMGFMT_420P10_BE, PIX_FMT_YUV420P10BE}, +- {IMGFMT_420P9_LE, PIX_FMT_YUV420P9LE}, +- {IMGFMT_420P9_BE, PIX_FMT_YUV420P9BE}, +- {IMGFMT_422P16_LE, PIX_FMT_YUV422P16LE}, +- {IMGFMT_422P16_BE, PIX_FMT_YUV422P16BE}, +- {IMGFMT_422P10_LE, PIX_FMT_YUV422P10LE}, +- {IMGFMT_422P10_BE, PIX_FMT_YUV422P10BE}, +- {IMGFMT_422P9_LE, PIX_FMT_YUV422P9LE}, +- {IMGFMT_422P9_BE, PIX_FMT_YUV422P9BE}, +- {IMGFMT_444P16_LE, PIX_FMT_YUV444P16LE}, +- {IMGFMT_444P16_BE, PIX_FMT_YUV444P16BE}, +- {IMGFMT_444P10_LE, PIX_FMT_YUV444P10LE}, +- {IMGFMT_444P10_BE, PIX_FMT_YUV444P10BE}, +- {IMGFMT_444P9_LE, PIX_FMT_YUV444P9LE}, +- {IMGFMT_444P9_BE, PIX_FMT_YUV444P9BE}, ++ {IMGFMT_YUY2, AV_PIX_FMT_YUYV422}, ++ {IMGFMT_UYVY, AV_PIX_FMT_UYVY422}, ++ {IMGFMT_NV12, AV_PIX_FMT_NV12}, ++ {IMGFMT_NV21, AV_PIX_FMT_NV21}, ++ {IMGFMT_Y800, AV_PIX_FMT_GRAY8}, ++ {IMGFMT_Y8, AV_PIX_FMT_GRAY8}, ++ {IMGFMT_YVU9, AV_PIX_FMT_YUV410P}, ++ {IMGFMT_IF09, AV_PIX_FMT_YUV410P}, ++ {IMGFMT_YV12, AV_PIX_FMT_YUV420P}, ++ {IMGFMT_I420, AV_PIX_FMT_YUV420P}, ++ {IMGFMT_IYUV, AV_PIX_FMT_YUV420P}, ++ {IMGFMT_411P, AV_PIX_FMT_YUV411P}, ++ {IMGFMT_422P, AV_PIX_FMT_YUV422P}, ++ {IMGFMT_444P, AV_PIX_FMT_YUV444P}, ++ {IMGFMT_440P, AV_PIX_FMT_YUV440P}, ++ ++ {IMGFMT_420A, AV_PIX_FMT_YUVA420P}, ++ ++ {IMGFMT_420P16_LE, AV_PIX_FMT_YUV420P16LE}, ++ {IMGFMT_420P16_BE, AV_PIX_FMT_YUV420P16BE}, ++ {IMGFMT_420P10_LE, AV_PIX_FMT_YUV420P10LE}, ++ {IMGFMT_420P10_BE, AV_PIX_FMT_YUV420P10BE}, ++ {IMGFMT_420P9_LE, AV_PIX_FMT_YUV420P9LE}, ++ {IMGFMT_420P9_BE, AV_PIX_FMT_YUV420P9BE}, ++ {IMGFMT_422P16_LE, AV_PIX_FMT_YUV422P16LE}, ++ {IMGFMT_422P16_BE, AV_PIX_FMT_YUV422P16BE}, ++ {IMGFMT_422P10_LE, AV_PIX_FMT_YUV422P10LE}, ++ {IMGFMT_422P10_BE, AV_PIX_FMT_YUV422P10BE}, ++ {IMGFMT_422P9_LE, AV_PIX_FMT_YUV422P9LE}, ++ {IMGFMT_422P9_BE, AV_PIX_FMT_YUV422P9BE}, ++ {IMGFMT_444P16_LE, AV_PIX_FMT_YUV444P16LE}, ++ {IMGFMT_444P16_BE, AV_PIX_FMT_YUV444P16BE}, ++ {IMGFMT_444P10_LE, AV_PIX_FMT_YUV444P10LE}, ++ {IMGFMT_444P10_BE, AV_PIX_FMT_YUV444P10BE}, ++ {IMGFMT_444P9_LE, AV_PIX_FMT_YUV444P9LE}, ++ {IMGFMT_444P9_BE, AV_PIX_FMT_YUV444P9BE}, + + // YUVJ are YUV formats that use the full Y range and not just + // 16 - 235 (see colorspaces.txt). + // Currently they are all treated the same way. +- {IMGFMT_YV12, PIX_FMT_YUVJ420P}, +- {IMGFMT_422P, PIX_FMT_YUVJ422P}, +- {IMGFMT_444P, PIX_FMT_YUVJ444P}, +- {IMGFMT_440P, PIX_FMT_YUVJ440P}, +- +- {IMGFMT_XVMC_MOCO_MPEG2, PIX_FMT_XVMC_MPEG2_MC}, +- {IMGFMT_XVMC_IDCT_MPEG2, PIX_FMT_XVMC_MPEG2_IDCT}, +- {IMGFMT_VDPAU_MPEG1, PIX_FMT_VDPAU_MPEG1}, +- {IMGFMT_VDPAU_MPEG2, PIX_FMT_VDPAU_MPEG2}, +- {IMGFMT_VDPAU_H264, PIX_FMT_VDPAU_H264}, +- {IMGFMT_VDPAU_WMV3, PIX_FMT_VDPAU_WMV3}, +- {IMGFMT_VDPAU_VC1, PIX_FMT_VDPAU_VC1}, +- {IMGFMT_VDPAU_MPEG4, PIX_FMT_VDPAU_MPEG4}, +- {0, PIX_FMT_NONE} ++ {IMGFMT_YV12, AV_PIX_FMT_YUVJ420P}, ++ {IMGFMT_422P, AV_PIX_FMT_YUVJ422P}, ++ {IMGFMT_444P, AV_PIX_FMT_YUVJ444P}, ++ {IMGFMT_440P, AV_PIX_FMT_YUVJ440P}, ++ ++ {IMGFMT_XVMC_MOCO_MPEG2, AV_PIX_FMT_XVMC_MPEG2_MC}, ++ {IMGFMT_XVMC_IDCT_MPEG2, AV_PIX_FMT_XVMC_MPEG2_IDCT}, ++ {IMGFMT_VDPAU_MPEG1, AV_PIX_FMT_VDPAU_MPEG1}, ++ {IMGFMT_VDPAU_MPEG2, AV_PIX_FMT_VDPAU_MPEG2}, ++ {IMGFMT_VDPAU_H264, AV_PIX_FMT_VDPAU_H264}, ++ {IMGFMT_VDPAU_WMV3, AV_PIX_FMT_VDPAU_WMV3}, ++ {IMGFMT_VDPAU_VC1, AV_PIX_FMT_VDPAU_VC1}, ++ {IMGFMT_VDPAU_MPEG4, AV_PIX_FMT_VDPAU_MPEG4}, ++ {0, AV_PIX_FMT_NONE} + }; + +-enum PixelFormat imgfmt2pixfmt(int fmt) ++enum AVPixelFormat imgfmt2pixfmt(int fmt) + { + int i; +- enum PixelFormat pix_fmt; ++ enum AVPixelFormat pix_fmt; + for (i = 0; conversion_map[i].fmt; i++) + if (conversion_map[i].fmt == fmt) + break; + pix_fmt = conversion_map[i].pix_fmt; +- if (pix_fmt == PIX_FMT_NONE) ++ if (pix_fmt == AV_PIX_FMT_NONE) + mp_msg(MSGT_GLOBAL, MSGL_ERR, "Unsupported format %s\n", vo_format_name(fmt)); + return pix_fmt; + } + +-int pixfmt2imgfmt(enum PixelFormat pix_fmt) ++int pixfmt2imgfmt(enum AVPixelFormat pix_fmt) + { + int i; + int fmt; +- for (i = 0; conversion_map[i].pix_fmt != PIX_FMT_NONE; i++) ++ for (i = 0; conversion_map[i].pix_fmt != AV_PIX_FMT_NONE; i++) + if (conversion_map[i].pix_fmt == pix_fmt) + break; + fmt = conversion_map[i].fmt; + if (!fmt) +- mp_msg(MSGT_GLOBAL, MSGL_ERR, "Unsupported PixelFormat %i\n", pix_fmt); ++ mp_msg(MSGT_GLOBAL, MSGL_ERR, "Unsupported AVPixelFormat %i\n", pix_fmt); + return fmt; + } + +diff -urN MPlayer-1.1.orig//fmt-conversion.h MPlayer-1.1/fmt-conversion.h +--- MPlayer-1.1.orig//fmt-conversion.h 2011-03-01 22:44:15.000000000 +0100 ++++ MPlayer-1.1/fmt-conversion.h 2013-01-17 09:28:38.120215759 +0100 +@@ -23,8 +23,8 @@ + #include "libavutil/avutil.h" + #include "libavutil/samplefmt.h" + +-enum PixelFormat imgfmt2pixfmt(int fmt); +-int pixfmt2imgfmt(enum PixelFormat pix_fmt); ++enum AVPixelFormat imgfmt2pixfmt(int fmt); ++int pixfmt2imgfmt(enum AVPixelFormat pix_fmt); + enum AVSampleFormat affmt2samplefmt(int fmt); + int samplefmt2affmt(enum AVSampleFormat sample_fmt); + +diff -urN MPlayer-1.1.orig//libaf/af_format.c MPlayer-1.1/libaf/af_format.c +--- MPlayer-1.1.orig//libaf/af_format.c 2011-10-26 17:12:35.000000000 +0200 ++++ MPlayer-1.1/libaf/af_format.c 2013-01-17 09:43:32.770183189 +0100 +@@ -34,6 +34,7 @@ + #include "libvo/fastmemcpy.h" + + #include "libavutil/avutil.h" ++#include "libavutil/common.h" + + /* Functions used by play to convert the input audio to the correct + format */ +diff -urN MPlayer-1.1.orig//libaf/af_lavcac3enc.c MPlayer-1.1/libaf/af_lavcac3enc.c +--- MPlayer-1.1.orig//libaf/af_lavcac3enc.c 2012-02-19 16:21:23.000000000 +0100 ++++ MPlayer-1.1/libaf/af_lavcac3enc.c 2013-01-17 09:44:27.103181211 +0100 +@@ -32,6 +32,7 @@ + #include "reorder_ch.h" + #include "av_helpers.h" + ++#include "libavutil/common.h" + #include "libavcodec/avcodec.h" + #include "libavutil/intreadwrite.h" + +diff -urN MPlayer-1.1.orig//libmpcodecs/vf.c MPlayer-1.1/libmpcodecs/vf.c +--- MPlayer-1.1.orig//libmpcodecs/vf.c 2012-05-30 23:08:05.000000000 +0200 ++++ MPlayer-1.1/libmpcodecs/vf.c 2013-01-17 09:50:25.861168154 +0100 +@@ -40,6 +40,7 @@ + #include "vf.h" + + #include "libvo/fastmemcpy.h" ++#include "libavutil/common.h" + #include "libavutil/mem.h" + + extern const vf_info_t vf_info_1bpp; +diff -urN MPlayer-1.1.orig//libmpcodecs/vf_geq.c MPlayer-1.1/libmpcodecs/vf_geq.c +--- MPlayer-1.1.orig//libmpcodecs/vf_geq.c 2011-04-19 09:32:36.000000000 +0200 ++++ MPlayer-1.1/libmpcodecs/vf_geq.c 2013-01-17 09:44:01.045182161 +0100 +@@ -34,6 +34,8 @@ + + #include "libavcodec/avcodec.h" + #include "libavutil/eval.h" ++#include "libavutil/common.h" ++#include "libavutil/mem.h" + + struct vf_priv_s { + AVExpr * e[3]; +diff -urN MPlayer-1.1.orig//libmpcodecs/vf_gradfun.c MPlayer-1.1/libmpcodecs/vf_gradfun.c +--- MPlayer-1.1.orig//libmpcodecs/vf_gradfun.c 2010-04-06 11:46:47.000000000 +0200 ++++ MPlayer-1.1/libmpcodecs/vf_gradfun.c 2013-01-17 09:47:10.679175257 +0100 +@@ -39,6 +39,7 @@ + #include "vf.h" + #include "libvo/fastmemcpy.h" + #include "libavutil/avutil.h" ++#include "libavutil/common.h" + #include "libavutil/x86_cpu.h" + + struct vf_priv_s { +diff -urN MPlayer-1.1.orig//libmpcodecs/vf_sab.c MPlayer-1.1/libmpcodecs/vf_sab.c +--- MPlayer-1.1.orig//libmpcodecs/vf_sab.c 2011-05-25 15:46:32.000000000 +0200 ++++ MPlayer-1.1/libmpcodecs/vf_sab.c 2013-01-17 09:28:59.964214957 +0100 +@@ -32,6 +32,7 @@ + #endif + + #include "libavutil/avutil.h" ++#include "libavutil/mem.h" + #include "img_format.h" + #include "mp_image.h" + #include "vf.h" +diff -urN MPlayer-1.1.orig//libmpcodecs/vf_screenshot.c MPlayer-1.1/libmpcodecs/vf_screenshot.c +--- MPlayer-1.1.orig//libmpcodecs/vf_screenshot.c 2012-02-19 23:09:30.000000000 +0100 ++++ MPlayer-1.1/libmpcodecs/vf_screenshot.c 2013-01-17 09:28:04.643216971 +0100 +@@ -39,6 +39,7 @@ + + #include "libswscale/swscale.h" + #include "libavcodec/avcodec.h" ++#include "libavutil/mem.h" + + struct vf_priv_s { + int frameno; +diff -urN MPlayer-1.1.orig//libmpdemux/demux_lavf.c MPlayer-1.1/libmpdemux/demux_lavf.c +--- MPlayer-1.1.orig//libmpdemux/demux_lavf.c 2012-04-07 22:08:53.000000000 +0200 ++++ MPlayer-1.1/libmpdemux/demux_lavf.c 2013-01-17 09:41:44.880187116 +0100 +@@ -317,20 +317,20 @@ + sh_audio->samplerate= codec->sample_rate; + sh_audio->i_bps= codec->bit_rate/8; + switch (codec->codec_id) { +- case CODEC_ID_PCM_S8: +- case CODEC_ID_PCM_U8: ++ case AV_CODEC_ID_PCM_S8: ++ case AV_CODEC_ID_PCM_U8: + sh_audio->samplesize = 1; + break; +- case CODEC_ID_PCM_S16LE: +- case CODEC_ID_PCM_S16BE: +- case CODEC_ID_PCM_U16LE: +- case CODEC_ID_PCM_U16BE: ++ case AV_CODEC_ID_PCM_S16LE: ++ case AV_CODEC_ID_PCM_S16BE: ++ case AV_CODEC_ID_PCM_U16LE: ++ case AV_CODEC_ID_PCM_U16BE: + sh_audio->samplesize = 2; + break; +- case CODEC_ID_PCM_ALAW: ++ case AV_CODEC_ID_PCM_ALAW: + sh_audio->format = 0x6; + break; +- case CODEC_ID_PCM_MULAW: ++ case AV_CODEC_ID_PCM_MULAW: + sh_audio->format = 0x7; + break; + } +@@ -358,7 +358,7 @@ + priv->vstreams[priv->video_streams] = i; + bih=calloc(sizeof(*bih) + codec->extradata_size,1); + +- if(codec->codec_id == CODEC_ID_RAWVIDEO) { ++ if(codec->codec_id == AV_CODEC_ID_RAWVIDEO) { + switch (codec->pix_fmt) { + case PIX_FMT_RGB24: + codec->codec_tag= MKTAG(24, 'B', 'G', 'R'); +@@ -423,24 +423,24 @@ + case AVMEDIA_TYPE_SUBTITLE:{ + sh_sub_t* sh_sub; + char type; +- if(codec->codec_id == CODEC_ID_TEXT) ++ if(codec->codec_id == AV_CODEC_ID_TEXT) + type = 't'; +- else if(codec->codec_id == CODEC_ID_MOV_TEXT) ++ else if(codec->codec_id == AV_CODEC_ID_MOV_TEXT) + type = 'm'; +- else if(codec->codec_id == CODEC_ID_SSA) ++ else if(codec->codec_id == AV_CODEC_ID_SSA) + type = 'a'; +- else if(codec->codec_id == CODEC_ID_DVD_SUBTITLE) ++ else if(codec->codec_id == AV_CODEC_ID_DVD_SUBTITLE) + type = 'v'; +- else if(codec->codec_id == CODEC_ID_XSUB) ++ else if(codec->codec_id == AV_CODEC_ID_XSUB) + type = 'x'; +- else if(codec->codec_id == CODEC_ID_DVB_SUBTITLE) ++ else if(codec->codec_id == AV_CODEC_ID_DVB_SUBTITLE) + type = 'b'; +- else if(codec->codec_id == CODEC_ID_DVB_TELETEXT) ++ else if(codec->codec_id == AV_CODEC_ID_DVB_TELETEXT) + type = 'd'; +- else if(codec->codec_id == CODEC_ID_HDMV_PGS_SUBTITLE) ++ else if(codec->codec_id == AV_CODEC_ID_HDMV_PGS_SUBTITLE) + type = 'p'; +-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 14, 100) +- else if(codec->codec_id == CODEC_ID_EIA_608) ++#if LIBAVUTIL_VERSION_MICRO >= 100 && LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 14, 100) ++ else if(codec->codec_id == AV_CODEC_ID_EIA_608) + type = 'c'; + #endif + else if(codec->codec_tag == MKTAG('c', '6', '0', '8')) +@@ -465,7 +465,7 @@ + break; + } + case AVMEDIA_TYPE_ATTACHMENT:{ +- if (st->codec->codec_id == CODEC_ID_TTF) { ++ if (st->codec->codec_id == AV_CODEC_ID_TTF) { + AVDictionaryEntry *fnametag = av_dict_get(st->metadata, "filename", NULL, 0); + demuxer_add_attachment(demuxer, fnametag ? fnametag->value : NULL, + "application/x-truetype-font", +@@ -808,7 +808,7 @@ + prog->aid = program->stream_index[i]; + break; + case AVMEDIA_TYPE_SUBTITLE: +- if(prog->sid == -2 && priv->avfc->streams[program->stream_index[i]]->codec->codec_id == CODEC_ID_TEXT) ++ if(prog->sid == -2 && priv->avfc->streams[program->stream_index[i]]->codec->codec_id == AV_CODEC_ID_TEXT) + prog->sid = program->stream_index[i]; + break; + } +diff -urN MPlayer-1.1.orig//stream/cache2.c MPlayer-1.1/stream/cache2.c +--- MPlayer-1.1.orig//stream/cache2.c 2012-03-04 16:11:50.000000000 +0100 ++++ MPlayer-1.1/stream/cache2.c 2013-01-17 09:30:01.501212718 +0100 +@@ -40,6 +40,7 @@ + #include <errno.h> + + #include "libavutil/avutil.h" ++#include "libavutil/common.h" + #include "osdep/shmem.h" + #include "osdep/timer.h" + #if defined(__MINGW32__) +diff -urN MPlayer-1.1.orig//sub/spudec.c MPlayer-1.1/sub/spudec.c +--- MPlayer-1.1.orig//sub/spudec.c 2012-04-23 20:39:16.000000000 +0200 ++++ MPlayer-1.1/sub/spudec.c 2013-01-17 09:46:50.054176009 +0100 +@@ -42,6 +42,7 @@ + #include "spudec.h" + #include "vobsub.h" + #include "libavutil/avutil.h" ++#include "libavutil/common.h" + #include "libavutil/intreadwrite.h" + #include "libswscale/swscale.h" + +diff -urN MPlayer-1.1.orig//sub/sub_cc.c MPlayer-1.1/sub/sub_cc.c +--- MPlayer-1.1.orig//sub/sub_cc.c 2012-04-07 22:08:53.000000000 +0200 ++++ MPlayer-1.1/sub/sub_cc.c 2013-01-17 09:46:31.413176687 +0100 +@@ -42,6 +42,7 @@ + #include "sub.h" + + #include "libavutil/avutil.h" ++#include "libavutil/common.h" + + + #define CC_MAX_LINE_LENGTH 64 diff --git a/media-video/mplayer/files/mplayer-1.1-missingbreak.patch b/media-video/mplayer/files/mplayer-1.1-missingbreak.patch new file mode 100644 index 000000000000..0dd7064e8f0c --- /dev/null +++ b/media-video/mplayer/files/mplayer-1.1-missingbreak.patch @@ -0,0 +1,18 @@ +------------------------------------------------------------------------ +r35436 | upsuper | 2012-11-21 08:37:24 -0300 (Wed, 21 Nov 2012) | 2 lines + +Add missing break. + +------------------------------------------------------------------------ +Index: libmpcodecs/ad_ffmpeg.c +=================================================================== +--- libmpcodecs/ad_ffmpeg.c (revision 35435) ++++ libmpcodecs/ad_ffmpeg.c (revision 35436) +@@ -245,6 +245,7 @@ + case 4: + copy_samples_planar(4, frame->nb_samples, channels, + buf, frame->extended_data); ++ break; + default: + copy_samples_planar(sample_size, frame->nb_samples, channels, + buf, frame->extended_data); diff --git a/media-video/mplayer/files/mplayer-1.1-planaraudio.patch b/media-video/mplayer/files/mplayer-1.1-planaraudio.patch new file mode 100644 index 000000000000..48dcb4cb4823 --- /dev/null +++ b/media-video/mplayer/files/mplayer-1.1-planaraudio.patch @@ -0,0 +1,138 @@ +------------------------------------------------------------------------ +r35228 | cigaes | 2012-10-04 15:04:42 -0300 (Thu, 04 Oct 2012) | 5 lines + +ad_ffmpeg: basic support for planar formats. + +Upgrade to avcodec_decode_audio4(). +Planar formats are immediately converted to packet formats. +A lot of optimizations are still possible. +------------------------------------------------------------------------ + + +Index: libmpcodecs/ad_ffmpeg.c +=================================================================== +--- libmpcodecs/ad_ffmpeg.c (revision 35227) ++++ libmpcodecs/ad_ffmpeg.c (revision 35228) +@@ -57,7 +57,7 @@ + { + int broken_srate = 0; + int samplerate = lavc_context->sample_rate; +- int sample_format = samplefmt2affmt(lavc_context->sample_fmt); ++ int sample_format = samplefmt2affmt(av_get_packed_sample_fmt(lavc_context->sample_fmt)); + if (!sample_format) + sample_format = sh_audio->sample_format; + if(sh_audio->wf){ +@@ -169,10 +169,10 @@ + sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec; + + switch (lavc_context->sample_fmt) { +- case AV_SAMPLE_FMT_U8: +- case AV_SAMPLE_FMT_S16: +- case AV_SAMPLE_FMT_S32: +- case AV_SAMPLE_FMT_FLT: ++ case AV_SAMPLE_FMT_U8: case AV_SAMPLE_FMT_U8P: ++ case AV_SAMPLE_FMT_S16: case AV_SAMPLE_FMT_S16P: ++ case AV_SAMPLE_FMT_S32: case AV_SAMPLE_FMT_S32P: ++ case AV_SAMPLE_FMT_FLT: case AV_SAMPLE_FMT_FLTP: + break; + default: + return 0; +@@ -202,10 +202,68 @@ + return CONTROL_UNKNOWN; + } + ++static av_always_inline void copy_samples_planar(unsigned bps, ++ unsigned nb_samples, ++ unsigned nb_channels, ++ unsigned char *dst, ++ unsigned char **src) ++{ ++ unsigned s, c, o = 0; ++ ++ for (s = 0; s < nb_samples; s++) { ++ for (c = 0; c < nb_channels; c++) { ++ memcpy(dst, src[c] + o, bps); ++ dst += bps; ++ } ++ o += bps; ++ } ++} ++ ++static int copy_samples(AVCodecContext *avc, AVFrame *frame, ++ unsigned char *buf, int max_size) ++{ ++ int channels = avc->channels; ++ int sample_size = av_get_bytes_per_sample(avc->sample_fmt); ++ int size = channels * sample_size * frame->nb_samples; ++ ++ if (size > max_size) { ++ av_log(avc, AV_LOG_ERROR, ++ "Buffer overflow while decoding a single frame\n"); ++ return AVERROR(EINVAL); /* same as avcodec_decode_audio3 */ ++ } ++ /* TODO reorder channels at the same time */ ++ if (av_sample_fmt_is_planar(avc->sample_fmt)) { ++ switch (sample_size) { ++ case 1: ++ copy_samples_planar(1, frame->nb_samples, channels, ++ buf, frame->extended_data); ++ break; ++ case 2: ++ copy_samples_planar(2, frame->nb_samples, channels, ++ buf, frame->extended_data); ++ break; ++ case 4: ++ copy_samples_planar(4, frame->nb_samples, channels, ++ buf, frame->extended_data); ++ default: ++ copy_samples_planar(sample_size, frame->nb_samples, channels, ++ buf, frame->extended_data); ++ } ++ } else { ++ memcpy(buf, frame->data[0], size); ++ } ++ return size; ++} ++ + static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen) + { + unsigned char *start=NULL; +- int y,len=-1; ++ int y,len=-1, got_frame; ++ AVFrame *frame = avcodec_alloc_frame(); ++ ++ if (!frame) ++ return AVERROR(ENOMEM); ++ + while(len<minlen){ + AVPacket pkt; + int len2=maxlen; +@@ -230,7 +288,7 @@ + sh_audio->pts = pts; + sh_audio->pts_bytes = 0; + } +- y=avcodec_decode_audio3(sh_audio->context,(int16_t*)buf,&len2,&pkt); ++ y=avcodec_decode_audio4(sh_audio->context, frame, &got_frame, &pkt); + //printf("return:%d samples_out:%d bitstream_in:%d sample_sum:%d\n", y, len2, x, len); fflush(stdout); + // LATM may need many packets to find mux info + if (y == AVERROR(EAGAIN)) +@@ -238,6 +296,11 @@ + if(y<0){ mp_msg(MSGT_DECAUDIO,MSGL_V,"lavc_audio: error\n");break; } + if(!sh_audio->parser && y<x) + sh_audio->ds->buffer_pos+=y-x; // put back data (HACK!) ++ if (!got_frame) ++ continue; ++ len2 = copy_samples(sh_audio->context, frame, buf, maxlen); ++ if (len2 < 0) ++ return len2; + if(len2>0){ + if (((AVCodecContext *)sh_audio->context)->channels >= 5) { + int samplesize = av_get_bytes_per_sample(((AVCodecContext *) +@@ -258,5 +321,7 @@ + if (setup_format(sh_audio, sh_audio->context)) + break; + } ++ ++ av_free(frame); + return len; + } diff --git a/media-video/mplayer/files/mplayer-1.1.1-avcodecidsubrip.patch b/media-video/mplayer/files/mplayer-1.1.1-avcodecidsubrip.patch new file mode 100644 index 000000000000..2e357db34785 --- /dev/null +++ b/media-video/mplayer/files/mplayer-1.1.1-avcodecidsubrip.patch @@ -0,0 +1,17 @@ +Index: MPlayer-1.1.1/libmpdemux/demux_lavf.c +=================================================================== +--- MPlayer-1.1.1.orig/libmpdemux/demux_lavf.c ++++ MPlayer-1.1.1/libmpdemux/demux_lavf.c +@@ -423,7 +423,11 @@ static void handle_stream(demuxer_t *dem + case AVMEDIA_TYPE_SUBTITLE:{ + sh_sub_t* sh_sub; + char type; +- if(codec->codec_id == AV_CODEC_ID_TEXT) ++ if(codec->codec_id == AV_CODEC_ID_TEXT ++#if LIBAVUTIL_VERSION_MICRO >= 100 ++ || codec->codec_id == AV_CODEC_ID_SUBRIP ++#endif ++ ) + type = 't'; + else if(codec->codec_id == AV_CODEC_ID_MOV_TEXT) + type = 'm'; diff --git a/media-video/mplayer/files/mplayer-1.1.1-codecidsubrip.patch b/media-video/mplayer/files/mplayer-1.1.1-codecidsubrip.patch new file mode 100644 index 000000000000..27bd9db7943c --- /dev/null +++ b/media-video/mplayer/files/mplayer-1.1.1-codecidsubrip.patch @@ -0,0 +1,17 @@ +Index: MPlayer-1.1.1/libmpdemux/demux_lavf.c +=================================================================== +--- MPlayer-1.1.1.orig/libmpdemux/demux_lavf.c ++++ MPlayer-1.1.1/libmpdemux/demux_lavf.c +@@ -423,7 +423,11 @@ static void handle_stream(demuxer_t *dem + case AVMEDIA_TYPE_SUBTITLE:{ + sh_sub_t* sh_sub; + char type; +- if(codec->codec_id == CODEC_ID_TEXT) ++ if(codec->codec_id == CODEC_ID_TEXT ++#if LIBAVUTIL_VERSION_MICRO >= 100 ++ || codec->codec_id == AV_CODEC_ID_SUBRIP ++#endif ++ ) + type = 't'; + else if(codec->codec_id == CODEC_ID_MOV_TEXT) + type = 'm'; diff --git a/media-video/mplayer/files/mplayer-1.2_pre20130729-compat.patch b/media-video/mplayer/files/mplayer-1.2_pre20130729-compat.patch new file mode 100644 index 000000000000..c26b6d20b51c --- /dev/null +++ b/media-video/mplayer/files/mplayer-1.2_pre20130729-compat.patch @@ -0,0 +1,62 @@ +Allow it to build against FFmpeg 1.2.1 and libav 9.8 + +Index: mplayer-1.2_pre20130729/fmt-conversion.c +=================================================================== +--- mplayer-1.2_pre20130729.orig/fmt-conversion.c ++++ mplayer-1.2_pre20130729/fmt-conversion.c +@@ -64,8 +64,10 @@ static const struct { + { IMGFMT_RGB64LE, AV_PIX_FMT_RGBA64LE }, + { IMGFMT_RGB64BE, AV_PIX_FMT_RGBA64BE }, + #endif /* LIBAVUTIL_VERSION_MICRO >= 100 */ ++#if ( LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52,10,0) ) && ( LIBAVUTIL_VERSION_MICRO < 100 || LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52,25,100) ) + { IMGFMT_XYZ12LE, AV_PIX_FMT_XYZ12LE }, + { IMGFMT_XYZ12BE, AV_PIX_FMT_XYZ12BE }, ++#endif + { IMGFMT_422A, AV_PIX_FMT_YUVA422P }, + { IMGFMT_444A, AV_PIX_FMT_YUVA444P }, + { IMGFMT_GBR24P, AV_PIX_FMT_GBRP }, +Index: mplayer-1.2_pre20130729/libmpdemux/demux_lavf.c +=================================================================== +--- mplayer-1.2_pre20130729.orig/libmpdemux/demux_lavf.c ++++ mplayer-1.2_pre20130729/libmpdemux/demux_lavf.c +@@ -443,7 +443,9 @@ static void handle_stream(demuxer_t *dem + type = 'm'; + else if (codec->codec_id == AV_CODEC_ID_SSA + #if LIBAVUTIL_VERSION_MICRO >= 100 ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,3,100) + || codec->codec_id == AV_CODEC_ID_ASS ++#endif + #endif /* LIBAVUTIL_VERSION_MICRO >= 100 */ + ) + type = 'a'; +Index: mplayer-1.2_pre20130729/libmpdemux/mp_taglists.c +=================================================================== +--- mplayer-1.2_pre20130729.orig/libmpdemux/mp_taglists.c ++++ mplayer-1.2_pre20130729/libmpdemux/mp_taglists.c +@@ -31,8 +31,10 @@ static const struct AVCodecTag mp_wav_ta + { AV_CODEC_ID_ADPCM_ADX, MKTAG('S', 'a', 'd', 'x') }, + #if LIBAVUTIL_VERSION_MICRO >= 100 + { AV_CODEC_ID_ADPCM_AFC, MKTAG('A', 'F', 'C', ' ') }, ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,8,100) + { AV_CODEC_ID_ADPCM_DTK, MKTAG('D', 'T', 'K', ' ') }, + #endif ++#endif + { AV_CODEC_ID_ADPCM_IMA_APC, MKTAG('A', 'P', 'C', 'A') }, + { AV_CODEC_ID_ADPCM_EA, MKTAG('A', 'D', 'E', 'A') }, + { AV_CODEC_ID_ADPCM_EA_R1, MKTAG('E', 'A', 'R', '1') }, +Index: mplayer-1.2_pre20130729/libmpcodecs/ve_lavc.c +=================================================================== +--- mplayer-1.2_pre20130729.orig/libmpcodecs/ve_lavc.c ++++ mplayer-1.2_pre20130729/libmpcodecs/ve_lavc.c +@@ -579,7 +579,11 @@ static int config(struct vf_instance *vf + lavc_venc_context->level = lavc_param_level; + + if(lavc_param_avopt){ ++#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52,7,0) + if(av_dict_parse_string(&opts, lavc_param_avopt, "=", ",", 0) < 0){ ++#else ++ if(parse_avopts(lavc_venc_context, lavc_param_avopt) < 0){ ++#endif + mp_msg(MSGT_MENCODER,MSGL_ERR, "Your options /%s/ look like gibberish to me pal\n", lavc_param_avopt); + return 0; + } diff --git a/media-video/mplayer/files/mplayer-1.2_pre20150214-pulseaudio-6.0.patch b/media-video/mplayer/files/mplayer-1.2_pre20150214-pulseaudio-6.0.patch new file mode 100644 index 000000000000..578d6fa52277 --- /dev/null +++ b/media-video/mplayer/files/mplayer-1.2_pre20150214-pulseaudio-6.0.patch @@ -0,0 +1,33 @@ +diff -Naur mplayer-1.2_pre20150214/libao2/ao_pulse.c mplayer-1.2_pre20150214_2/libao2/ao_pulse.c +--- mplayer-1.2_pre20150214/libao2/ao_pulse.c 2015-02-15 06:30:21.000000000 +1000 ++++ mplayer-1.2_pre20150214_2/libao2/ao_pulse.c 2015-05-17 14:07:07.615640169 +1000 +@@ -53,6 +53,8 @@ + + static int broken_pause; + ++static size_t bytes_per_sample; ++ + LIBAO_EXTERN(pulse) + + #define GENERIC_ERR_MSG(ctx, str) \ +@@ -201,6 +203,8 @@ + } + + pa_channel_map_init_auto(&map, ss.channels, PA_CHANNEL_MAP_ALSA); ++ bytes_per_sample = af_fmt2bits(ao_data.format) / 8; ++ bytes_per_sample *= ao_data.channels; + ao_data.bps = pa_bytes_per_second(&ss); + + if (!(mainloop = pa_threaded_mainloop_new())) { +@@ -297,6 +301,11 @@ + + /** Play the specified data to the pulseaudio server */ + static int play(void* data, int len, int flags) { ++ //Align length to frame size ++ len=len - (len % bytes_per_sample); ++ if (len==0) { ++ return 0; ++ } + pa_threaded_mainloop_lock(mainloop); + if (pa_stream_write(stream, data, len, NULL, 0, PA_SEEK_RELATIVE) < 0) { + GENERIC_ERR_MSG(context, "pa_stream_write() failed"); diff --git a/media-video/mplayer/files/prepare_mplayer.sh b/media-video/mplayer/files/prepare_mplayer.sh new file mode 100644 index 000000000000..57d47425689f --- /dev/null +++ b/media-video/mplayer/files/prepare_mplayer.sh @@ -0,0 +1,25 @@ +#!/bin/sh +VERSION=$(date +%Y%m%d) +PACKAGE="mplayer-1.2_pre${VERSION}" +DUMP_FFMPEG="$(dirname $0)/dump_ffmpeg.sh" + +svn checkout svn://svn.mplayerhq.hu/mplayer/trunk ${PACKAGE} + +pushd ${PACKAGE} > /dev/null + # ffmpeg is in git now so no svn external anymore + rm -rf ffmpeg + git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg/ + sh "$DUMP_FFMPEG" + STORE_VERSION=$(LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2) + printf "$STORE_VERSION" > snapshot_version +popd > /dev/null + +find "${PACKAGE}" -type d -name '.svn' -prune -print0 | xargs -0 rm -rf +find "${PACKAGE}" -type d -name '.git' -prune -print0 | xargs -0 rm -rf + +tar cJf ${PACKAGE}.tar.xz ${PACKAGE} +rm -rf ${PACKAGE}/ + +echo "Tarball: \"${PACKAGE}.tar.xz\"" + +echo "** all done **" |