mirror of
https://git.freebsd.org/ports.git
synced 2025-06-02 11:26:29 -04:00
Remove expired port:
2017-03-25 multimedia/mplayer2: Development ceased in favour of mpv, last release from 2013
This commit is contained in:
parent
2298668a55
commit
711a32df14
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=436891
39 changed files with 1 additions and 2223 deletions
1
MOVED
1
MOVED
|
@ -9151,3 +9151,4 @@ net/samba-libsmbclient|net/samba43|2017-03-21|Obsolete
|
|||
net/samba-nmblookup|net/samba43|2017-03-21|Obsolete
|
||||
net/samba-smbclient|net/samba43|2017-03-21|Obsolete
|
||||
net/samba36|net/samba43|2017-03-21|Obsolete
|
||||
multimedia/mplayer2|multimedia/mpv|2017-03-25|Has expired: Development ceased in favour of mpv, last release from 2013
|
||||
|
|
|
@ -260,7 +260,6 @@
|
|||
SUBDIR += mpgtx
|
||||
SUBDIR += mplayer
|
||||
SUBDIR += mplayer-skins
|
||||
SUBDIR += mplayer2
|
||||
SUBDIR += mplex
|
||||
SUBDIR += mps-youtube
|
||||
SUBDIR += mpv
|
||||
|
|
|
@ -1,232 +0,0 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= mplayer2
|
||||
PORTVERSION= ${MPLAYER2_PORT_VERSION}
|
||||
PORTREVISION= 29
|
||||
CATEGORIES= multimedia audio
|
||||
MASTER_SITES= LOCAL/gblach/
|
||||
|
||||
MAINTAINER= cpm@FreeBSD.org
|
||||
COMMENT= Advanced general-purpose video player
|
||||
|
||||
LICENSE= GPLv3
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
DEPRECATED= Development ceased in favour of mpv, last release from 2013
|
||||
EXPIRATION_DATE= 2017-03-25
|
||||
|
||||
LIB_DEPENDS= libpng.so:graphics/png \
|
||||
libfreetype.so:print/freetype2 \
|
||||
libavcodec.so:multimedia/ffmpeg
|
||||
|
||||
USES= cpe gmake iconv ncurses pkgconfig python:3,build tar:xz
|
||||
HAS_CONFIGURE= yes
|
||||
CONFIGURE_ENV= TMPDIR="${WRKSRC}"
|
||||
CONFIGURE_ARGS= --cc=${CC} \
|
||||
--extra-libs='${LIBS}' \
|
||||
--mandir=${PREFIX}/man \
|
||||
--disable-alsa \
|
||||
--disable-directfb \
|
||||
--disable-faad \
|
||||
--disable-mng \
|
||||
--disable-libdca \
|
||||
--disable-xvid \
|
||||
--disable-mpg123 \
|
||||
--disable-musepack
|
||||
MAKE_ARGS+= BINDIR=${STAGEDIR}${PREFIX}/bin \
|
||||
CONFDIR=${STAGEDIR}${PREFIX}/etc/mplayer
|
||||
|
||||
MPLAYER2_SNAPSHOT_DATE= 2013-04-28
|
||||
MPLAYER2_PORT_VERSION= 2.0.${MPLAYER2_SNAPSHOT_DATE:S/-//g}
|
||||
|
||||
OPTIONS_DEFINE= A52 ASS CACA CDIO DEBUG DV DVDREAD DVDNAV GIF IPV6 JACK LADSPA \
|
||||
LIBBLURAY LIRC MAD MANPAGES OPENGL PORTAUDIO PULSEAUDIO \
|
||||
RTC SDL SMB SPEEX THEORA V4L VDPAU X11 XINERAMA
|
||||
OPTIONS_DEFAULT=A52 ASS ENCA DVDREAD DVDNAV MANPAGES VDPAU X11
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
# XXX After r417413 poudriere requires textproc/py-docutils being built
|
||||
# with the same python version as USES=python:3 here but it's currently
|
||||
# not possible due to https://github.com/freebsd/poudriere/issues/259
|
||||
.if defined(PACKAGE_BUILDING)
|
||||
OPTIONS_EXCLUDE=MANPAGES
|
||||
.endif
|
||||
|
||||
OPTIONS_DEFINE_i386+= WIN32
|
||||
.if !defined(PACKAGE_BUILDING)
|
||||
# Depend on RESTRICTED package only when building manually
|
||||
OPTIONS_DEFAULT_i386+= WIN32
|
||||
.endif
|
||||
|
||||
.for _arch in i386 amd64 powerpc powerpc64
|
||||
OPTIONS_DEFAULT_${_arch}+= RTCPU
|
||||
OPTIONS_DEFINE_${_arch}+= RTCPU
|
||||
.endfor
|
||||
|
||||
ASS_DESC= Enable ASS/SSA subtitle rendering
|
||||
DVDREAD_DESC= DVD Playback support
|
||||
DVDNAV_DESC= DVD menu navigation
|
||||
RTC_DESC= Enable kernel realtime clock timing
|
||||
RTCPU_DESC= Allow runtime CPU detection
|
||||
WIN32_DESC= Enable win32 codec set on the IA32 arch
|
||||
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
CONFLICTS= mplayer-1.*
|
||||
|
||||
BROKEN_sparc64= Does not compile on sparc64
|
||||
|
||||
A52_LIB_DEPENDS= liba52.so:audio/liba52
|
||||
A52_CONFIGURE_OFF= --disable-liba52
|
||||
|
||||
ASS_LIB_DEPENDS= libass.so:multimedia/libass
|
||||
ASS_CONFIGURE_OFF= --disable-libass
|
||||
|
||||
CACA_LIB_DEPENDS= libcaca.so:graphics/libcaca
|
||||
CACA_CONFIGURE_OFF= --disable-caca
|
||||
|
||||
CDIO_LIB_DEPENDS= libcdio_paranoia.so:sysutils/libcdio-paranoia
|
||||
CDIO_CONFIGURE_OFF= --disable-libcdio
|
||||
|
||||
DEBUG_CONFIGURE_ON= --enable-debug=3
|
||||
DEBUG_CONFIGURE_OFF= --disable-debug
|
||||
|
||||
DV_LIB_DEPENDS= libdv.so:multimedia/libdv
|
||||
DV_CONFIGURE_OFF= --disable-libdv
|
||||
|
||||
DVDREAD_LIB_DEPENDS= libdvdread.so:multimedia/libdvdread
|
||||
DVDREAD_CONFIGURE_OFF= --disable-dvdread
|
||||
|
||||
DVDNAV_LIB_DEPENDS= libdvdnav.so:multimedia/libdvdnav
|
||||
DVDNAV_CONFIGURE_OFF= --disable-dvdnav
|
||||
|
||||
ENCA_LIB_DEPENDS= libenca.so:converters/enca
|
||||
ENCA_CONFIGURE_OFF= --disable-enca
|
||||
|
||||
GIF_LIB_DEPENDS= libgif.so:graphics/giflib
|
||||
GIF_CONFIGURE_ON= --enable-gif
|
||||
GIF_CONFIGURE_OFF= --disable-gif
|
||||
|
||||
IPV6_CATEGORIES= ipv6
|
||||
IPV6_CONFIGURE_OFF= --disable-inet6
|
||||
|
||||
JACK_LIB_DEPENDS= libjack.so:audio/jack
|
||||
JACK_CONFIGURE_OFF= --disable-jack
|
||||
|
||||
LADSPA_RUN_DEPENDS= ${LOCALBASE}/lib/ladspa/amp.so:audio/ladspa
|
||||
LADSPA_CONFIGURE_OFF= --disable-ladspa
|
||||
|
||||
LIBBLURAY_LIB_DEPENDS= libbluray.so:multimedia/libbluray
|
||||
LIBBLURAY_CONFIGURE_OFF=--disable-bluray
|
||||
|
||||
LIRC_LIB_DEPENDS= liblirc_client.so:comms/lirc
|
||||
LIRC_CONFIGURE_OFF= --disable-lirc
|
||||
|
||||
MAD_LIB_DEPENDS= libmad.so:audio/libmad
|
||||
MAD_CONFIGURE_OFF= --disable-mad
|
||||
|
||||
MANPAGES_BUILD_DEPENDS= rst2man:textproc/py-docutils
|
||||
MANPAGES_INSTALL_TARGET_OFF=install-no-man
|
||||
|
||||
OPENGL_USE= GL=gl XORG=glproto
|
||||
OPENGL_CONFIGURE_OFF= --disable-gl
|
||||
OPENGL_IMPLIES= X11
|
||||
|
||||
PORTAUDIO_LIB_DEPENDS= libportaudio.so:audio/portaudio
|
||||
PORTAUDIO_CONFIGURE_OFF=--disable-portaudio
|
||||
|
||||
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
|
||||
PULSEAUDIO_CONFIGURE_OFF=--disable-pulse
|
||||
|
||||
RTC_BUILD_DEPENDS= ${LOCALBASE}/modules/rtc.ko:emulators/rtc
|
||||
RTC_RUN_DEPENDS= ${LOCALBASE}/modules/rtc.ko:emulators/rtc
|
||||
RTC_CONFIGURE_OFF= --disable-rtc
|
||||
|
||||
RTCPU_CONFIGURE_ON= --enable-runtime-cpudetection
|
||||
RTCPU_CONFIGURE_OFF= --disable-runtime-cpudetection
|
||||
|
||||
SDL_USE= SDL=sdl
|
||||
SDL_CONFIGURE_OFF= --disable-sdl
|
||||
|
||||
SMB_USES= samba:lib
|
||||
SMB_CONFIGURE_ON= --extra-cflags="-I${SAMBAINCLUDES}" --extra-ldflags="-L${SAMBALIBS}"
|
||||
SMB_CONFIGURE_OFF= --disable-smb
|
||||
|
||||
SPEEX_LIB_DEPENDS= libspeex.so:audio/speex
|
||||
SPEEX_CONFIGURE_OFF= --disable-speex
|
||||
|
||||
THEORA_LIB_DEPENDS= libtheora.so:multimedia/libtheora
|
||||
THEORA_CONFIGURE_OFF= --disable-theora
|
||||
|
||||
V4L_BUILD_DEPENDS= ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat
|
||||
V4L_LIB_DEPENDS= libv4l2.so:multimedia/libv4l
|
||||
V4L_CONFIGURE_OFF= --disable-tv-v4l2
|
||||
V4L_LIBS= -lv4l2
|
||||
|
||||
VDPAU_LIB_DEPENDS= libvdpau.so:multimedia/libvdpau
|
||||
VDPAU_CONFIGURE_OFF= --disable-vdpau
|
||||
|
||||
WIN32_RUN_DEPENDS= win32-codecs>0:multimedia/win32-codecs
|
||||
WIN32_CONFIGURE_ON= --codecsdir=${LOCALBASE}/lib/win32
|
||||
WIN32_CONFIGURE_OFF= --disable-win32dll --disable-qtx
|
||||
|
||||
X11_USE= XORG=x11,xv,xxf86vm
|
||||
X11_CONFIGURE_OFF= --disable-x11
|
||||
|
||||
XINERAMA_USE= XORG=xinerama,xineramaproto
|
||||
XINERAMA_CONFIGURE_OFF= --disable-xinerama
|
||||
XINERAMA_IMPLIES= X11
|
||||
|
||||
WITH_CDROM_DEVICE?= /dev/cd0
|
||||
|
||||
.if defined(WITH_KERN_HZ)
|
||||
DEFAULT_KERN_HZ=${WITH_KERN_HZ}
|
||||
.else
|
||||
DEFAULT_KERN_HZ=1024
|
||||
.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:
|
||||
@${REINPLACE_CMD} -e \
|
||||
'/CFLAGS.*-D_LARGEFILE64_SOURCE/ s/-D_LARGEFILE64_SOURCE/-D_FILE_OFFSET_BITS=64/' \
|
||||
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
|
||||
@${REINPLACE_CMD} \
|
||||
-e 's|/dev/acd0|${WITH_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}|'
|
||||
post-patch-MANPAGES-on:
|
||||
@${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:]]*[[:>:]])|${WITH_CDROM_DEVICE:S/dev\//dev\/\\\:/}|g ; \
|
||||
s|/dev/\\:(cdrom[[:alnum:]]*[[:>:]])|${WITH_CDROM_DEVICE:S/dev\//dev\/\\\:/}|g'
|
||||
|
||||
post-patch-RTC-on:
|
||||
@${REINPLACE_CMD} -e \
|
||||
's|irqp = 1024|irqp = ${DEFAULT_KERN_HZ}|' \
|
||||
${WRKSRC}/mplayer.c
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/etc/example.conf \
|
||||
${STAGEDIR}${PREFIX}/etc/mplayer/mplayer.conf.sample
|
||||
.for conf in codecs input
|
||||
${INSTALL_DATA} ${WRKSRC}/etc/${conf}.conf \
|
||||
${STAGEDIR}${PREFIX}/etc/mplayer/${conf}.conf.sample
|
||||
.endfor
|
||||
|
||||
.include <bsd.port.mk>
|
|
@ -1,3 +0,0 @@
|
|||
TIMESTAMP = 1479421227
|
||||
SHA256 (mplayer2-2.0.20130428.tar.xz) = 03629270254ef8e06b7be8d25d532400a71cad07e5bdac1dd4cd64b33dbe69c9
|
||||
SIZE (mplayer2-2.0.20130428.tar.xz) = 1918584
|
|
@ -1,76 +0,0 @@
|
|||
--- configure.orig 2013-07-09 16:33:11 UTC
|
||||
+++ configure
|
||||
@@ -2676,7 +2676,7 @@ echocheck "pthread"
|
||||
if linux ; then
|
||||
THREAD_CFLAGS=-D_REENTRANT
|
||||
elif freebsd || netbsd || openbsd || bsdos ; then
|
||||
- THREAD_CFLAGS=-D_THREAD_SAFE
|
||||
+ THREAD_CFLAGS=
|
||||
fi
|
||||
if test "$_pthreads" = auto ; then
|
||||
cat > $TMPC << EOF
|
||||
@@ -2693,7 +2693,7 @@ int main(void) {
|
||||
EOF
|
||||
_pthreads=no
|
||||
if ! hpux ; then
|
||||
- for _ld_tmp in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
|
||||
+ for _ld_tmp in "-lpthread" "-pthread" ; 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
|
||||
@@ -3961,11 +3961,7 @@ if test "$_v4l2" = auto ; then
|
||||
cat > $TMPC << EOF
|
||||
#include <sys/time.h>
|
||||
#include <linux/videodev2.h>
|
||||
-#include <linux/version.h>
|
||||
int main(void) {
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
|
||||
-#error kernel headers too old, need 2.6.22
|
||||
-#endif
|
||||
struct v4l2_ext_controls ctrls;
|
||||
ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG;
|
||||
return 0;
|
||||
@@ -4940,7 +4936,7 @@ echores "$_tv_dshow"
|
||||
echocheck "Video 4 Linux 2 TV interface"
|
||||
if test "$_tv_v4l2" = auto ; then
|
||||
_tv_v4l2=no
|
||||
- if test "$_tv" = yes && linux ; then
|
||||
+ if test "$_tv" = yes ; then
|
||||
header_check_broken sys/time.h linux/videodev2.h && _tv_v4l2=yes
|
||||
elif test "$_tv" = yes && test "$sys_videoio_h" = "yes" ; then
|
||||
_tv_v4l2=yes
|
||||
@@ -4983,7 +4979,7 @@ echores "$_radio_capture"
|
||||
echocheck "Video 4 Linux 2 Radio interface"
|
||||
if test "$_radio_v4l2" = auto ; then
|
||||
_radio_v4l2=no
|
||||
- if test "$_radio" = yes && linux ; then
|
||||
+ if test "$_radio" = yes ; then
|
||||
header_check linux/videodev2.h && _radio_v4l2=yes
|
||||
fi
|
||||
fi
|
||||
@@ -5000,6 +4996,7 @@ echocheck "*BSD BrookTree 848 Radio inte
|
||||
_radio_bsdbt848=no
|
||||
cat > $TMPC <<EOF
|
||||
#include <sys/types.h>
|
||||
+#include <sys/ioctl.h>
|
||||
$def_ioctl_bt848_h_name
|
||||
#ifdef IOCTL_BT848_H_NAME
|
||||
#include IOCTL_BT848_H_NAME
|
||||
@@ -5024,7 +5021,7 @@ fi
|
||||
echocheck "Video 4 Linux 2 MPEG PVR interface"
|
||||
if test "$_pvr" = auto ; then
|
||||
_pvr=no
|
||||
- if test "$_tv_v4l2" = yes && linux ; then
|
||||
+ if test "$_tv_v4l2" = yes ; then
|
||||
cat > $TMPC <<EOF
|
||||
#include <sys/time.h>
|
||||
#include <linux/videodev2.h>
|
||||
@@ -5296,7 +5293,7 @@ RST2MAN = $_rst2man
|
||||
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)
|
|
@ -1,204 +0,0 @@
|
|||
--- fmt-conversion.c.orig 2013-07-09 16:33:12 UTC
|
||||
+++ fmt-conversion.c
|
||||
@@ -24,117 +24,117 @@
|
||||
|
||||
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},
|
||||
- {IMGFMT_GBRP, PIX_FMT_GBRP},
|
||||
- {IMGFMT_GBRP9, PIX_FMT_GBRP9},
|
||||
- {IMGFMT_GBRP10, PIX_FMT_GBRP10},
|
||||
- {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_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},
|
||||
+ {IMGFMT_GBRP, AV_PIX_FMT_GBRP},
|
||||
+ {IMGFMT_GBRP9, AV_PIX_FMT_GBRP9},
|
||||
+ {IMGFMT_GBRP10, AV_PIX_FMT_GBRP10},
|
||||
+ {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, PIX_FMT_YUVA420P},
|
||||
+ {IMGFMT_420A, AV_PIX_FMT_YUVA420P},
|
||||
|
||||
- {IMGFMT_420P16_LE, PIX_FMT_YUV420P16LE},
|
||||
- {IMGFMT_420P16_BE, PIX_FMT_YUV420P16BE},
|
||||
- {IMGFMT_420P9_LE, PIX_FMT_YUV420P9LE},
|
||||
- {IMGFMT_420P9_BE, PIX_FMT_YUV420P9BE},
|
||||
- {IMGFMT_420P10_LE, PIX_FMT_YUV420P10LE},
|
||||
- {IMGFMT_420P10_BE, PIX_FMT_YUV420P10BE},
|
||||
- {IMGFMT_422P10_LE, PIX_FMT_YUV422P10LE},
|
||||
- {IMGFMT_422P10_BE, PIX_FMT_YUV422P10BE},
|
||||
- {IMGFMT_444P9_BE , PIX_FMT_YUV444P9BE},
|
||||
- {IMGFMT_444P9_LE , PIX_FMT_YUV444P9LE},
|
||||
- {IMGFMT_444P10_BE, PIX_FMT_YUV444P10BE},
|
||||
- {IMGFMT_444P10_LE, PIX_FMT_YUV444P10LE},
|
||||
- {IMGFMT_422P16_LE, PIX_FMT_YUV422P16LE},
|
||||
- {IMGFMT_422P16_BE, PIX_FMT_YUV422P16BE},
|
||||
- {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_420P16_LE, AV_PIX_FMT_YUV420P16LE},
|
||||
+ {IMGFMT_420P16_BE, AV_PIX_FMT_YUV420P16BE},
|
||||
+ {IMGFMT_420P9_LE, AV_PIX_FMT_YUV420P9LE},
|
||||
+ {IMGFMT_420P9_BE, AV_PIX_FMT_YUV420P9BE},
|
||||
+ {IMGFMT_420P10_LE, AV_PIX_FMT_YUV420P10LE},
|
||||
+ {IMGFMT_420P10_BE, AV_PIX_FMT_YUV420P10BE},
|
||||
+ {IMGFMT_422P10_LE, AV_PIX_FMT_YUV422P10LE},
|
||||
+ {IMGFMT_422P10_BE, AV_PIX_FMT_YUV422P10BE},
|
||||
+ {IMGFMT_444P9_BE , AV_PIX_FMT_YUV444P9BE},
|
||||
+ {IMGFMT_444P9_LE , AV_PIX_FMT_YUV444P9LE},
|
||||
+ {IMGFMT_444P10_BE, AV_PIX_FMT_YUV444P10BE},
|
||||
+ {IMGFMT_444P10_LE, AV_PIX_FMT_YUV444P10LE},
|
||||
+ {IMGFMT_422P16_LE, AV_PIX_FMT_YUV422P16LE},
|
||||
+ {IMGFMT_422P16_BE, AV_PIX_FMT_YUV422P16BE},
|
||||
+ {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},
|
||||
|
||||
// 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_YV12, AV_PIX_FMT_YUVJ420P},
|
||||
+ {IMGFMT_422P, AV_PIX_FMT_YUVJ422P},
|
||||
+ {IMGFMT_444P, AV_PIX_FMT_YUVJ444P},
|
||||
+ {IMGFMT_440P, AV_PIX_FMT_YUVJ440P},
|
||||
|
||||
- {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_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;
|
||||
- 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;
|
||||
int fmt = conversion_map[i].fmt;
|
||||
if (!fmt) {
|
||||
const char *fmtname = av_get_pix_fmt_name(pix_fmt);
|
||||
- mp_msg(MSGT_GLOBAL, MSGL_ERR, "Unsupported PixelFormat %s (%d)\n",
|
||||
+ mp_msg(MSGT_GLOBAL, MSGL_ERR, "Unsupported AVPixelFormat %s (%d)\n",
|
||||
fmtname ? fmtname : "INVALID", pix_fmt);
|
||||
}
|
||||
return fmt;
|
|
@ -1,12 +0,0 @@
|
|||
--- fmt-conversion.h.orig 2016-11-29 15:06:09 UTC
|
||||
+++ fmt-conversion.h
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "libavutil/avutil.h"
|
||||
#include <libavutil/pixfmt.h>
|
||||
|
||||
-enum PixelFormat imgfmt2pixfmt(int fmt);
|
||||
-int pixfmt2imgfmt(enum PixelFormat pix_fmt);
|
||||
+enum AVPixelFormat imgfmt2pixfmt(int fmt);
|
||||
+int pixfmt2imgfmt(enum AVPixelFormat pix_fmt);
|
||||
|
||||
#endif /* MPLAYER_FMT_CONVERSION_H */
|
|
@ -1,28 +0,0 @@
|
|||
--- libaf/af_lavcac3enc.c.orig 2013-07-09 16:33:12 UTC
|
||||
+++ libaf/af_lavcac3enc.c
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include <libavcodec/avcodec.h>
|
||||
-#include <libavutil/audioconvert.h>
|
||||
#include <libavutil/error.h>
|
||||
#include <libavutil/intreadwrite.h>
|
||||
#include <libavutil/mem.h>
|
||||
@@ -219,7 +218,7 @@ static void uninit(struct af_instance_s*
|
||||
av_free(s->lavc_actx);
|
||||
}
|
||||
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 28, 0)
|
||||
- avcodec_free_frame(&s->frame);
|
||||
+ av_frame_free(&s->frame);
|
||||
#else
|
||||
av_freep(&s->frame);
|
||||
#endif
|
||||
@@ -398,7 +397,7 @@ static int af_open(af_instance_t* af){
|
||||
mp_tmsg(MSGT_AFILTER, MSGL_ERR, "Audio LAVC, couldn't allocate context!\n");
|
||||
return AF_ERROR;
|
||||
}
|
||||
- s->frame = avcodec_alloc_frame();
|
||||
+ s->frame = av_frame_alloc();
|
||||
if (!s->frame)
|
||||
return AF_ERROR;
|
||||
const enum AVSampleFormat *fmts = s->lavc_acodec->sample_fmts;
|
|
@ -1,18 +0,0 @@
|
|||
--- libao2/ao_oss.c.orig 2013-07-09 16:33:13 UTC
|
||||
+++ libao2/ao_oss.c
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,164 +0,0 @@
|
|||
--- libmpcodecs/vd_theora.c.orig 2013-07-09 16:33:13 UTC
|
||||
+++ libmpcodecs/vd_theora.c
|
||||
@@ -39,22 +39,23 @@ static const vd_info_t info = {
|
||||
|
||||
LIBVD_EXTERN(theora)
|
||||
|
||||
-#include <theora/theora.h>
|
||||
+#include <theora/theoradec.h>
|
||||
|
||||
#define THEORA_NUM_HEADER_PACKETS 3
|
||||
|
||||
typedef struct theora_struct_st {
|
||||
- theora_state st;
|
||||
- theora_comment cc;
|
||||
- theora_info inf;
|
||||
+ th_setup_info *tsi;
|
||||
+ th_dec_ctx *tctx;
|
||||
+ th_comment tc;
|
||||
+ th_info ti;
|
||||
} theora_struct_t;
|
||||
|
||||
/** Convert Theora pixelformat to the corresponding IMGFMT_ */
|
||||
-static uint32_t theora_pixelformat2imgfmt(theora_pixelformat fmt){
|
||||
+static uint32_t theora_pixelformat2imgfmt(th_pixel_fmt fmt){
|
||||
switch(fmt) {
|
||||
- case OC_PF_420: return IMGFMT_YV12;
|
||||
- case OC_PF_422: return IMGFMT_422P;
|
||||
- case OC_PF_444: return IMGFMT_444P;
|
||||
+ case TH_PF_420: return IMGFMT_YV12;
|
||||
+ case TH_PF_422: return IMGFMT_422P;
|
||||
+ case TH_PF_444: return IMGFMT_444P;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -64,7 +65,7 @@ static int control(sh_video_t *sh,int cm
|
||||
theora_struct_t *context = sh->context;
|
||||
switch(cmd) {
|
||||
case VDCTRL_QUERY_FORMAT:
|
||||
- if (*(int*)arg == theora_pixelformat2imgfmt(context->inf.pixelformat))
|
||||
+ if (*(int*)arg == theora_pixelformat2imgfmt(context->ti.pixel_fmt))
|
||||
return CONTROL_TRUE;
|
||||
return CONTROL_FALSE;
|
||||
}
|
||||
@@ -88,8 +89,10 @@ static int init(sh_video_t *sh){
|
||||
if (!context)
|
||||
goto err_out;
|
||||
|
||||
- theora_info_init(&context->inf);
|
||||
- theora_comment_init(&context->cc);
|
||||
+ th_info_init(&context->ti);
|
||||
+ th_comment_init(&context->tc);
|
||||
+ context->tsi = NULL;
|
||||
+
|
||||
|
||||
/* Read all header packets, pass them to theora_decode_header. */
|
||||
for (i = 0; i < THEORA_NUM_HEADER_PACKETS; i++)
|
||||
@@ -109,7 +112,7 @@ static int init(sh_video_t *sh){
|
||||
op.b_o_s = 1;
|
||||
}
|
||||
|
||||
- if ( (errorCode = theora_decode_header (&context->inf, &context->cc, &op)) )
|
||||
+ if ( (errorCode = th_decode_headerin (&context->ti, &context->tc, &context->tsi, &op)) < 0)
|
||||
{
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Broken Theora header; errorCode=%i!\n", errorCode);
|
||||
goto err_out;
|
||||
@@ -117,23 +120,25 @@ static int init(sh_video_t *sh){
|
||||
}
|
||||
|
||||
/* now init codec */
|
||||
- errorCode = theora_decode_init (&context->st, &context->inf);
|
||||
- if (errorCode)
|
||||
+ context->tctx = th_decode_alloc (&context->ti, &context->tsi);
|
||||
+ if (!context->tctx)
|
||||
{
|
||||
- mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Theora decode init failed: %i \n", errorCode);
|
||||
+ mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Theora decode init failed\n");
|
||||
goto err_out;
|
||||
}
|
||||
+ /* free memory used for decoder setup information */
|
||||
+ th_setup_free(context->tsi);
|
||||
|
||||
- if(sh->aspect==0.0 && context->inf.aspect_denominator!=0)
|
||||
+ if(sh->aspect==0.0 && context->ti.aspect_denominator!=0)
|
||||
{
|
||||
- sh->aspect = ((double)context->inf.aspect_numerator * context->inf.width)/
|
||||
- ((double)context->inf.aspect_denominator * context->inf.height);
|
||||
+ sh->aspect = ((double)context->ti.aspect_numerator * context->ti.frame_width)/
|
||||
+ ((double)context->ti.aspect_denominator * context->ti.frame_height);
|
||||
}
|
||||
|
||||
mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Theora video init ok!\n");
|
||||
- mp_msg(MSGT_DECVIDEO,MSGL_INFO,"Frame: %dx%d, Picture %dx%d, Offset [%d,%d]\n", context->inf.width, context->inf.height, context->inf.frame_width, context->inf.frame_height, context->inf.offset_x, context->inf.offset_y);
|
||||
+ mp_msg(MSGT_DECVIDEO,MSGL_INFO,"Frame: %dx%d, Picture %dx%d, Offset [%d,%d]\n", context->ti.frame_width, context->ti.frame_height, context->ti.pic_width, context->ti.pic_height, context->ti.pic_x, context->ti.pic_y);
|
||||
|
||||
- return mpcodecs_config_vo (sh,context->inf.width,context->inf.height,theora_pixelformat2imgfmt(context->inf.pixelformat));
|
||||
+ return mpcodecs_config_vo (sh,context->ti.frame_width,context->ti.frame_height,theora_pixelformat2imgfmt(context->ti.pixel_fmt));
|
||||
|
||||
err_out:
|
||||
free(context);
|
||||
@@ -150,9 +155,9 @@ static void uninit(sh_video_t *sh)
|
||||
|
||||
if (context)
|
||||
{
|
||||
- theora_info_clear(&context->inf);
|
||||
- theora_comment_clear(&context->cc);
|
||||
- theora_clear (&context->st);
|
||||
+ th_info_clear(&context->ti);
|
||||
+ th_comment_clear(&context->tc);
|
||||
+ th_decode_free (context->tctx);
|
||||
free (context);
|
||||
}
|
||||
}
|
||||
@@ -165,7 +170,7 @@ static mp_image_t* decode(sh_video_t *sh
|
||||
theora_struct_t *context = sh->context;
|
||||
int errorCode = 0;
|
||||
ogg_packet op;
|
||||
- yuv_buffer yuv;
|
||||
+ th_ycbcr_buffer ycbcrbuf;
|
||||
mp_image_t* mpi;
|
||||
|
||||
// no delayed frames
|
||||
@@ -177,31 +182,31 @@ static mp_image_t* decode(sh_video_t *sh
|
||||
op.packet = data;
|
||||
op.granulepos = -1;
|
||||
|
||||
- errorCode = theora_decode_packetin (&context->st, &op);
|
||||
- if (errorCode)
|
||||
+ errorCode = th_decode_packetin (context->tctx, &op, NULL);
|
||||
+ if (errorCode < 0)
|
||||
{
|
||||
mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Theora decode packetin failed: %i \n",
|
||||
errorCode);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- errorCode = theora_decode_YUVout (&context->st, &yuv);
|
||||
- if (errorCode)
|
||||
+ errorCode = th_decode_ycbcr_out (context->tctx, ycbcrbuf);
|
||||
+ if (errorCode < 0)
|
||||
{
|
||||
mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Theora decode YUVout failed: %i \n",
|
||||
errorCode);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- mpi = mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, 0, yuv.y_width, yuv.y_height);
|
||||
+ mpi = mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, 0, ycbcrbuf[0].width, ycbcrbuf[0].height);
|
||||
if(!mpi) return NULL;
|
||||
|
||||
- mpi->planes[0]=yuv.y;
|
||||
- mpi->stride[0]=yuv.y_stride;
|
||||
- mpi->planes[1]=yuv.u;
|
||||
- mpi->stride[1]=yuv.uv_stride;
|
||||
- mpi->planes[2]=yuv.v;
|
||||
- mpi->stride[2]=yuv.uv_stride;
|
||||
+ mpi->planes[0]=ycbcrbuf[0].data;
|
||||
+ mpi->stride[0]=ycbcrbuf[0].stride;
|
||||
+ mpi->planes[1]=ycbcrbuf[1].data;
|
||||
+ mpi->stride[1]=ycbcrbuf[1].stride;
|
||||
+ mpi->planes[2]=ycbcrbuf[2].data;
|
||||
+ mpi->stride[2]=ycbcrbuf[2].stride;
|
||||
|
||||
return mpi;
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
--- libmpcodecs/ad_ffmpeg.c.orig 2013-07-09 16:33:13 UTC
|
||||
+++ libmpcodecs/ad_ffmpeg.c
|
||||
@@ -23,9 +23,9 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include <libavcodec/avcodec.h>
|
||||
-#include <libavutil/audioconvert.h>
|
||||
#include <libavutil/opt.h>
|
||||
#include <libavutil/samplefmt.h>
|
||||
+#include <libavutil/channel_layout.h>
|
||||
|
||||
#include "talloc.h"
|
||||
|
||||
@@ -236,7 +236,7 @@ static int init(sh_audio_t *sh_audio)
|
||||
sh_audio->context = ctx;
|
||||
lavc_context = avcodec_alloc_context3(lavc_codec);
|
||||
ctx->avctx = lavc_context;
|
||||
- ctx->avframe = avcodec_alloc_frame();
|
||||
+ ctx->avframe = av_frame_alloc();
|
||||
|
||||
// Always try to set - option only exists for AC3 at the moment
|
||||
av_opt_set_double(lavc_context, "drc_scale", opts->drc_level,
|
||||
@@ -250,7 +250,7 @@ static int init(sh_audio_t *sh_audio)
|
||||
lavc_context->block_align = sh_audio->wf->nBlockAlign;
|
||||
lavc_context->bits_per_coded_sample = sh_audio->wf->wBitsPerSample;
|
||||
}
|
||||
- lavc_context->request_channels = opts->audio_output_channels;
|
||||
+ lavc_context->request_channel_layout = av_get_default_channel_layout(opts->audio_output_channels);
|
||||
lavc_context->codec_tag = sh_audio->format; //FOURCC
|
||||
lavc_context->codec_type = AVMEDIA_TYPE_AUDIO;
|
||||
lavc_context->codec_id = lavc_codec->id; // not sure if required, imho not --A'rpi
|
||||
@@ -333,7 +333,7 @@ static void uninit(sh_audio_t *sh)
|
||||
avresample_free(&ctx->avr);
|
||||
#endif
|
||||
#if LIBAVCODEC_VERSION_INT >= (54 << 16 | 28 << 8)
|
||||
- avcodec_free_frame(&ctx->avframe);
|
||||
+ av_frame_free(&ctx->avframe);
|
||||
#else
|
||||
av_free(ctx->avframe);
|
||||
#endif
|
|
@ -1,37 +0,0 @@
|
|||
--- libmpcodecs/dec_teletext.c.orig 2013-07-09 16:33:13 UTC
|
||||
+++ libmpcodecs/dec_teletext.c
|
||||
@@ -402,6 +402,25 @@ struct {
|
||||
{ 0x00, LATIN, "English"},
|
||||
};
|
||||
|
||||
+static const uint8_t reverse[256] = {
|
||||
+0x00,0x80,0x40,0xC0,0x20,0xA0,0x60,0xE0,0x10,0x90,0x50,0xD0,0x30,0xB0,0x70,0xF0,
|
||||
+0x08,0x88,0x48,0xC8,0x28,0xA8,0x68,0xE8,0x18,0x98,0x58,0xD8,0x38,0xB8,0x78,0xF8,
|
||||
+0x04,0x84,0x44,0xC4,0x24,0xA4,0x64,0xE4,0x14,0x94,0x54,0xD4,0x34,0xB4,0x74,0xF4,
|
||||
+0x0C,0x8C,0x4C,0xCC,0x2C,0xAC,0x6C,0xEC,0x1C,0x9C,0x5C,0xDC,0x3C,0xBC,0x7C,0xFC,
|
||||
+0x02,0x82,0x42,0xC2,0x22,0xA2,0x62,0xE2,0x12,0x92,0x52,0xD2,0x32,0xB2,0x72,0xF2,
|
||||
+0x0A,0x8A,0x4A,0xCA,0x2A,0xAA,0x6A,0xEA,0x1A,0x9A,0x5A,0xDA,0x3A,0xBA,0x7A,0xFA,
|
||||
+0x06,0x86,0x46,0xC6,0x26,0xA6,0x66,0xE6,0x16,0x96,0x56,0xD6,0x36,0xB6,0x76,0xF6,
|
||||
+0x0E,0x8E,0x4E,0xCE,0x2E,0xAE,0x6E,0xEE,0x1E,0x9E,0x5E,0xDE,0x3E,0xBE,0x7E,0xFE,
|
||||
+0x01,0x81,0x41,0xC1,0x21,0xA1,0x61,0xE1,0x11,0x91,0x51,0xD1,0x31,0xB1,0x71,0xF1,
|
||||
+0x09,0x89,0x49,0xC9,0x29,0xA9,0x69,0xE9,0x19,0x99,0x59,0xD9,0x39,0xB9,0x79,0xF9,
|
||||
+0x05,0x85,0x45,0xC5,0x25,0xA5,0x65,0xE5,0x15,0x95,0x55,0xD5,0x35,0xB5,0x75,0xF5,
|
||||
+0x0D,0x8D,0x4D,0xCD,0x2D,0xAD,0x6D,0xED,0x1D,0x9D,0x5D,0xDD,0x3D,0xBD,0x7D,0xFD,
|
||||
+0x03,0x83,0x43,0xC3,0x23,0xA3,0x63,0xE3,0x13,0x93,0x53,0xD3,0x33,0xB3,0x73,0xF3,
|
||||
+0x0B,0x8B,0x4B,0xCB,0x2B,0xAB,0x6B,0xEB,0x1B,0x9B,0x5B,0xDB,0x3B,0xBB,0x7B,0xFB,
|
||||
+0x07,0x87,0x47,0xC7,0x27,0xA7,0x67,0xE7,0x17,0x97,0x57,0xD7,0x37,0xB7,0x77,0xF7,
|
||||
+0x0F,0x8F,0x4F,0xCF,0x2F,0xAF,0x6F,0xEF,0x1F,0x9F,0x5F,0xDF,0x3F,0xBF,0x7F,0xFF,
|
||||
+};
|
||||
+
|
||||
/**
|
||||
* \brief 24/18 Hamming code decoding
|
||||
* \param data bytes with hamming code (array must be at least 3 bytes long)
|
||||
@@ -1549,7 +1568,7 @@ static void vbi_decode_dvb(priv_vbi_t *p
|
||||
/* Reverse bit order, skipping the first two bytes (field parity, line
|
||||
offset and framing code). */
|
||||
for (i = 0; i < sizeof(data); i++)
|
||||
- data[i] = av_reverse[buf[2 + i]];
|
||||
+ data[i] = reverse[buf[2 + i]];
|
||||
|
||||
vbi_decode_line(priv, data);
|
||||
if (priv->cache_reset)
|
|
@ -1,356 +0,0 @@
|
|||
--- libmpcodecs/vd_ffmpeg.c.orig 2013-07-09 16:33:13 UTC
|
||||
+++ libmpcodecs/vd_ffmpeg.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <libavutil/common.h>
|
||||
#include <libavutil/opt.h>
|
||||
#include <libavutil/intreadwrite.h>
|
||||
+#include <libavutil/pixdesc.h>
|
||||
|
||||
#include "talloc.h"
|
||||
#include "config.h"
|
||||
@@ -61,7 +62,7 @@ static const vd_info_t info = {
|
||||
typedef struct {
|
||||
AVCodecContext *avctx;
|
||||
AVFrame *pic;
|
||||
- enum PixelFormat pix_fmt;
|
||||
+ enum AVPixelFormat pix_fmt;
|
||||
int do_slices;
|
||||
int do_dr1;
|
||||
int vo_initialized;
|
||||
@@ -77,13 +78,16 @@ typedef struct {
|
||||
|
||||
#include "m_option.h"
|
||||
|
||||
-static int get_buffer(AVCodecContext *avctx, AVFrame *pic);
|
||||
+static int get_buffer(AVCodecContext *avctx, AVFrame *pic, int isreference);
|
||||
+static int mpcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame);
|
||||
+static int get_buffer2(AVCodecContext *avctx, AVFrame *frame, int flags);
|
||||
static void release_buffer(AVCodecContext *avctx, AVFrame *pic);
|
||||
+static void mpcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic);
|
||||
static void draw_slice(struct AVCodecContext *s, const AVFrame *src,
|
||||
int offset[4], int y, int type, int height);
|
||||
|
||||
-static enum PixelFormat get_format(struct AVCodecContext *avctx,
|
||||
- const enum PixelFormat *pix_fmt);
|
||||
+static enum AVPixelFormat get_format(struct AVCodecContext *avctx,
|
||||
+ const enum AVPixelFormat *pix_fmt);
|
||||
static void uninit(struct sh_video *sh);
|
||||
|
||||
const m_option_t lavc_decode_opts_conf[] = {
|
||||
@@ -169,7 +173,7 @@ static int init(sh_video_t *sh)
|
||||
ctx->do_dr1 = 1;
|
||||
ctx->ip_count = ctx->b_count = 0;
|
||||
|
||||
- ctx->pic = avcodec_alloc_frame();
|
||||
+ ctx->pic = av_frame_alloc();
|
||||
ctx->avctx = avcodec_alloc_context3(lavc_codec);
|
||||
avctx = ctx->avctx;
|
||||
avctx->opaque = sh;
|
||||
@@ -182,9 +186,7 @@ static int init(sh_video_t *sh)
|
||||
ctx->do_slices = true;
|
||||
lavc_param->threads = 1;
|
||||
avctx->get_format = get_format;
|
||||
- avctx->get_buffer = get_buffer;
|
||||
- avctx->release_buffer = release_buffer;
|
||||
- avctx->reget_buffer = get_buffer;
|
||||
+ avctx->get_buffer2 = get_buffer2;
|
||||
avctx->draw_horiz_band = draw_slice;
|
||||
if (lavc_codec->capabilities & CODEC_CAP_HWACCEL_VDPAU)
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_V, "[VD_FFMPEG] VDPAU hardware "
|
||||
@@ -212,10 +214,7 @@ static int init(sh_video_t *sh)
|
||||
}
|
||||
|
||||
if (ctx->do_dr1) {
|
||||
- avctx->flags |= CODEC_FLAG_EMU_EDGE;
|
||||
- avctx->get_buffer = get_buffer;
|
||||
- avctx->release_buffer = release_buffer;
|
||||
- avctx->reget_buffer = get_buffer;
|
||||
+ avctx->get_buffer2 = get_buffer2;
|
||||
}
|
||||
|
||||
avctx->flags |= lavc_param->bitexact;
|
||||
@@ -227,7 +226,6 @@ static int init(sh_video_t *sh)
|
||||
avctx->flags |= CODEC_FLAG_GRAY;
|
||||
avctx->flags2 |= lavc_param->fast;
|
||||
avctx->codec_tag = sh->format;
|
||||
- avctx->stream_codec_tag = sh->video.fccHandler;
|
||||
avctx->idct_algo = lavc_param->idct_algo;
|
||||
avctx->error_concealment = lavc_param->error_concealment;
|
||||
avctx->debug = lavc_param->debug;
|
||||
@@ -357,7 +355,7 @@ static void uninit(sh_video_t *sh)
|
||||
|
||||
av_freep(&avctx);
|
||||
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 28, 0)
|
||||
- avcodec_free_frame(&ctx->pic);
|
||||
+ av_frame_free(&ctx->pic);
|
||||
#else
|
||||
av_freep(&ctx->pic);
|
||||
#endif
|
||||
@@ -423,7 +421,7 @@ static enum mp_csp_levels avcol_range_to
|
||||
}
|
||||
}
|
||||
|
||||
-static int init_vo(sh_video_t *sh, enum PixelFormat pix_fmt)
|
||||
+static int init_vo(sh_video_t *sh, enum AVPixelFormat pix_fmt)
|
||||
{
|
||||
vd_ffmpeg_ctx *ctx = sh->context;
|
||||
AVCodecContext *avctx = ctx->avctx;
|
||||
@@ -488,7 +486,7 @@ static int init_vo(sh_video_t *sh, enum
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int get_buffer(AVCodecContext *avctx, AVFrame *pic)
|
||||
+static int get_buffer(AVCodecContext *avctx, AVFrame *pic, int isreference)
|
||||
{
|
||||
sh_video_t *sh = avctx->opaque;
|
||||
vd_ffmpeg_ctx *ctx = sh->context;
|
||||
@@ -499,29 +497,11 @@ static int get_buffer(AVCodecContext *av
|
||||
int width = avctx->width;
|
||||
int height = avctx->height;
|
||||
// special case to handle reget_buffer without buffer hints
|
||||
- if (pic->opaque && pic->data[0] && !pic->buffer_hints)
|
||||
+ if (pic->opaque && pic->data[0])
|
||||
return 0;
|
||||
avcodec_align_dimensions(avctx, &width, &height);
|
||||
|
||||
- if (pic->buffer_hints) {
|
||||
- mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Buffer hints: %u\n",
|
||||
- pic->buffer_hints);
|
||||
- type = MP_IMGTYPE_TEMP;
|
||||
- if (pic->buffer_hints & FF_BUFFER_HINTS_READABLE)
|
||||
- flags |= MP_IMGFLAG_READABLE;
|
||||
- if (pic->buffer_hints & FF_BUFFER_HINTS_PRESERVE) {
|
||||
- type = MP_IMGTYPE_STATIC;
|
||||
- flags |= MP_IMGFLAG_PRESERVE;
|
||||
- }
|
||||
- if (pic->buffer_hints & FF_BUFFER_HINTS_REUSABLE) {
|
||||
- type = MP_IMGTYPE_STATIC;
|
||||
- flags |= MP_IMGFLAG_PRESERVE;
|
||||
- }
|
||||
- flags |= ctx->do_slices ? MP_IMGFLAG_DRAW_CALLBACK : 0;
|
||||
- mp_msg(MSGT_DECVIDEO, MSGL_DBG2,
|
||||
- type == MP_IMGTYPE_STATIC ? "using STATIC\n" : "using TEMP\n");
|
||||
- } else {
|
||||
- if (!pic->reference) {
|
||||
+ if (!isreference) {
|
||||
ctx->b_count++;
|
||||
flags |= ctx->do_slices ? MP_IMGFLAG_DRAW_CALLBACK : 0;
|
||||
} else {
|
||||
@@ -529,29 +509,25 @@ static int get_buffer(AVCodecContext *av
|
||||
flags |= MP_IMGFLAG_PRESERVE | MP_IMGFLAG_READABLE
|
||||
| (ctx->do_slices ? MP_IMGFLAG_DRAW_CALLBACK : 0);
|
||||
}
|
||||
- }
|
||||
|
||||
if (init_vo(sh, avctx->pix_fmt) < 0) {
|
||||
- avctx->release_buffer = avcodec_default_release_buffer;
|
||||
- avctx->get_buffer = avcodec_default_get_buffer;
|
||||
- avctx->reget_buffer = avcodec_default_reget_buffer;
|
||||
+ avctx->get_buffer2 = avcodec_default_get_buffer2;
|
||||
if (pic->data[0])
|
||||
- release_buffer(avctx, pic);
|
||||
- return avctx->get_buffer(avctx, pic);
|
||||
+ mpcodec_default_release_buffer(avctx, pic);
|
||||
+ return avctx->get_buffer2(avctx, pic,0);
|
||||
}
|
||||
|
||||
if (IMGFMT_IS_HWACCEL(ctx->best_csp))
|
||||
type = MP_IMGTYPE_NUMBERED | (0xffff << 16);
|
||||
- else if (!pic->buffer_hints) {
|
||||
+ else {
|
||||
if (ctx->b_count > 1 || ctx->ip_count > 2) {
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_WARN, "[VD_FFMPEG] DRI failure.\n");
|
||||
|
||||
ctx->do_dr1 = 0; //FIXME
|
||||
- avctx->get_buffer = avcodec_default_get_buffer;
|
||||
- avctx->reget_buffer = avcodec_default_reget_buffer;
|
||||
+ avctx->get_buffer2 = avcodec_default_get_buffer2;
|
||||
if (pic->data[0])
|
||||
- release_buffer(avctx, pic);
|
||||
- return avctx->get_buffer(avctx, pic);
|
||||
+ mpcodec_default_release_buffer(avctx, pic);
|
||||
+ return avctx->get_buffer2(avctx, pic,0);
|
||||
}
|
||||
|
||||
if (avctx->has_b_frames || ctx->b_count)
|
||||
@@ -594,7 +570,6 @@ static int get_buffer(AVCodecContext *av
|
||||
|
||||
pic->opaque = mpi;
|
||||
|
||||
- pic->type = FF_BUFFER_TYPE_USER;
|
||||
|
||||
/* The libavcodec reordered_opaque functionality is implemented by
|
||||
* a similar copy in avcodec_default_get_buffer() and without a
|
||||
@@ -626,8 +601,8 @@ static void release_buffer(struct AVCode
|
||||
mpi->usage_count--;
|
||||
}
|
||||
|
||||
- if (pic->type != FF_BUFFER_TYPE_USER) {
|
||||
- avcodec_default_release_buffer(avctx, pic);
|
||||
+ if (pic->opaque == NULL) {
|
||||
+ mpcodec_default_release_buffer(avctx, pic);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -822,13 +797,13 @@ static struct mp_image *decode(struct sh
|
||||
return mpi;
|
||||
}
|
||||
|
||||
-static enum PixelFormat get_format(struct AVCodecContext *avctx,
|
||||
- const enum PixelFormat *fmt)
|
||||
+static enum AVPixelFormat get_format(struct AVCodecContext *avctx,
|
||||
+ const enum AVPixelFormat *fmt)
|
||||
{
|
||||
sh_video_t *sh = avctx->opaque;
|
||||
int i;
|
||||
|
||||
- for (i = 0; fmt[i] != PIX_FMT_NONE; i++) {
|
||||
+ for (i = 0; fmt[i] != AV_PIX_FMT_NONE; i++) {
|
||||
int imgfmt = pixfmt2imgfmt(fmt[i]);
|
||||
if (!IMGFMT_IS_HWACCEL(imgfmt))
|
||||
continue;
|
||||
@@ -886,3 +861,144 @@ const struct vd_functions mpcodecs_vd_ff
|
||||
.control = control,
|
||||
.decode2 = decode
|
||||
};
|
||||
+
|
||||
+/*
|
||||
+FFWrapper
|
||||
+*/
|
||||
+static int mpcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame)
|
||||
+{
|
||||
+ return avcodec_default_get_buffer2(avctx, frame, 0);
|
||||
+}
|
||||
+
|
||||
+static void mpcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic)
|
||||
+{
|
||||
+ av_frame_unref(pic);
|
||||
+}
|
||||
+
|
||||
+typedef struct CompatReleaseBufPriv {
|
||||
+ AVCodecContext avctx;
|
||||
+ AVFrame frame;
|
||||
+ uint8_t avframe_padding[1024]; // hack to allow linking to a avutil larger AVFrame
|
||||
+} CompatReleaseBufPriv;
|
||||
+
|
||||
+static void compat_free_buffer(void *opaque, uint8_t *data)
|
||||
+{
|
||||
+ CompatReleaseBufPriv *priv = opaque;
|
||||
+ release_buffer(&priv->avctx, &priv->frame);
|
||||
+ av_freep(&priv);
|
||||
+}
|
||||
+
|
||||
+static void compat_release_buffer(void *opaque, uint8_t *data)
|
||||
+{
|
||||
+ AVBufferRef *buf = opaque;
|
||||
+ av_buffer_unref(&buf);
|
||||
+}
|
||||
+
|
||||
+static int get_buffer2(AVCodecContext *avctx, AVFrame *frame, int flags)
|
||||
+{
|
||||
+ /*
|
||||
+ * Wrap an old get_buffer()-allocated buffer in a bunch of AVBuffers.
|
||||
+ * We wrap each plane in its own AVBuffer. Each of those has a reference to
|
||||
+ * a dummy AVBuffer as its private data, unreffing it on free,
|
||||
+ * When all the planes are freed, the dummy buffer's free callback calls
|
||||
+ * release_buffer().
|
||||
+ */
|
||||
+ CompatReleaseBufPriv *priv = NULL;
|
||||
+ AVBufferRef *dummy_buf = NULL;
|
||||
+ int planes, i, ret;
|
||||
+
|
||||
+ ret = get_buffer(avctx, frame, flags & AV_GET_BUFFER_FLAG_REF);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* return if the buffers are already set up
|
||||
+ * this would happen e.g. when a custom get_buffer() calls
|
||||
+ * avcodec_default_get_buffer
|
||||
+ */
|
||||
+ if (frame->buf[0])
|
||||
+ goto end0;
|
||||
+
|
||||
+ priv = av_mallocz(sizeof(*priv));
|
||||
+ if (!priv) {
|
||||
+ ret = AVERROR(ENOMEM);
|
||||
+ goto fail;
|
||||
+ }
|
||||
+ priv->avctx = *avctx;
|
||||
+ priv->frame = *frame;
|
||||
+
|
||||
+ dummy_buf = av_buffer_create(NULL, 0, compat_free_buffer, priv, 0);
|
||||
+ if (!dummy_buf) {
|
||||
+ ret = AVERROR(ENOMEM);
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+#define WRAP_PLANE(ref_out, data, data_size) \
|
||||
+do { \
|
||||
+ AVBufferRef *dummy_ref = av_buffer_ref(dummy_buf); \
|
||||
+ if (!dummy_ref) { \
|
||||
+ ret = AVERROR(ENOMEM); \
|
||||
+ goto fail; \
|
||||
+ } \
|
||||
+ ref_out = av_buffer_create(data, data_size, compat_release_buffer, \
|
||||
+ dummy_ref, 0); \
|
||||
+ if (!ref_out) { \
|
||||
+ av_buffer_unref(&dummy_ref); \
|
||||
+ av_frame_unref(frame); \
|
||||
+ ret = AVERROR(ENOMEM); \
|
||||
+ goto fail; \
|
||||
+ } \
|
||||
+} while (0)
|
||||
+
|
||||
+ if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||
+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
|
||||
+
|
||||
+ planes = av_pix_fmt_count_planes(frame->format);
|
||||
+ /* workaround for AVHWAccel plane count of 0, buf[0] is used as
|
||||
+ check for allocated buffers: make libavcodec happy */
|
||||
+ if (desc && desc->flags & AV_PIX_FMT_FLAG_HWACCEL)
|
||||
+ planes = 1;
|
||||
+ if (!desc || planes <= 0) {
|
||||
+ ret = AVERROR(EINVAL);
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < planes; i++) {
|
||||
+ int v_shift = (i == 1 || i == 2) ? desc->log2_chroma_h : 0;
|
||||
+ int plane_size = (frame->height >> v_shift) * frame->linesize[i];
|
||||
+
|
||||
+ WRAP_PLANE(frame->buf[i], frame->data[i], plane_size);
|
||||
+ }
|
||||
+ } else {
|
||||
+ int planar = av_sample_fmt_is_planar(frame->format);
|
||||
+ planes = planar ? avctx->channels : 1;
|
||||
+
|
||||
+ if (planes > FF_ARRAY_ELEMS(frame->buf)) {
|
||||
+ frame->nb_extended_buf = planes - FF_ARRAY_ELEMS(frame->buf);
|
||||
+ frame->extended_buf = av_malloc_array(sizeof(*frame->extended_buf),
|
||||
+ frame->nb_extended_buf);
|
||||
+ if (!frame->extended_buf) {
|
||||
+ ret = AVERROR(ENOMEM);
|
||||
+ goto fail;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < FFMIN(planes, FF_ARRAY_ELEMS(frame->buf)); i++)
|
||||
+ WRAP_PLANE(frame->extended_buf[i],
|
||||
+ frame->extended_data[i + FF_ARRAY_ELEMS(frame->buf)],
|
||||
+ frame->linesize[0]);
|
||||
+ }
|
||||
+
|
||||
+ av_buffer_unref(&dummy_buf);
|
||||
+
|
||||
+end0:
|
||||
+ frame->width = avctx->width;
|
||||
+ frame->height = avctx->height;
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+fail:
|
||||
+ release_buffer(avctx, frame);
|
||||
+ av_freep(&priv);
|
||||
+ av_buffer_unref(&dummy_buf);
|
||||
+ return ret;
|
||||
+}
|
|
@ -1,15 +0,0 @@
|
|||
--- libmpcodecs/vf_halfpack.c.orig 2013-07-09 16:33:16 UTC
|
||||
+++ libmpcodecs/vf_halfpack.c
|
||||
@@ -198,9 +198,9 @@ static int config(struct vf_instance *vf
|
||||
sws_freeContext(vf->priv->ctx);
|
||||
// get unscaled 422p -> yuy2 conversion
|
||||
vf->priv->ctx =
|
||||
- sws_getContext(width, height / 2, PIX_FMT_YUV422P,
|
||||
- width, height / 2, PIX_FMT_YUYV422,
|
||||
- SWS_POINT | SWS_PRINT_INFO | get_sws_cpuflags(),
|
||||
+ sws_getContext(width, height / 2, AV_PIX_FMT_YUV422P,
|
||||
+ width, height / 2, AV_PIX_FMT_YUYV422,
|
||||
+ SWS_POINT | SWS_PRINT_INFO,
|
||||
NULL, NULL, NULL);
|
||||
}
|
||||
/* FIXME - also support UYVY output? */
|
|
@ -1,47 +0,0 @@
|
|||
--- libmpcodecs/vf_lavc.c.orig 2013-07-09 16:33:16 UTC
|
||||
+++ libmpcodecs/vf_lavc.c
|
||||
@@ -83,6 +83,8 @@ static int put_image(struct vf_instance
|
||||
mp_image_t* dmpi;
|
||||
int out_size;
|
||||
AVFrame *pic= vf->priv->pic;
|
||||
+ int ret, got_pkt;
|
||||
+ AVPacket pkt;
|
||||
|
||||
pic->data[0]=mpi->planes[0];
|
||||
pic->data[1]=mpi->planes[1];
|
||||
@@ -91,10 +93,14 @@ static int put_image(struct vf_instance
|
||||
pic->linesize[1]=mpi->stride[1];
|
||||
pic->linesize[2]=mpi->stride[2];
|
||||
|
||||
- out_size = avcodec_encode_video(&lavc_venc_context,
|
||||
- vf->priv->outbuf, vf->priv->outbuf_size, pic);
|
||||
+ av_init_packet(&pkt);
|
||||
+ pkt.data = vf->priv->outbuf;
|
||||
+ pkt.size = vf->priv->outbuf_size;
|
||||
+ ret = avcodec_encode_video2(&lavc_venc_context, &pkt, pic, &got_pkt);
|
||||
|
||||
- if(out_size<=0) return 1;
|
||||
+ if(ret<=0) return 1;
|
||||
+ if(!got_pkt) return 1;
|
||||
+ out_size = pkt.size;
|
||||
|
||||
dmpi=vf_get_image(vf->next,IMGFMT_MPEGPES,
|
||||
MP_IMGTYPE_EXPORT, 0,
|
||||
@@ -139,7 +145,7 @@ static int vf_open(vf_instance_t *vf, ch
|
||||
}
|
||||
|
||||
vf->priv->context=avcodec_alloc_context3(vf->priv->codec);
|
||||
- vf->priv->pic = avcodec_alloc_frame();
|
||||
+ vf->priv->pic = av_frame_alloc();
|
||||
|
||||
// TODO: parse args ->
|
||||
if(args) sscanf(args, "%d:%f", &p_quality, &p_fps);
|
||||
@@ -156,7 +162,7 @@ static int vf_open(vf_instance_t *vf, ch
|
||||
lavc_venc_context.time_base.num = 1000*1001;
|
||||
lavc_venc_context.time_base.den = (p_fps<1.0) ? 1000*1001*25 : (p_fps * lavc_venc_context.time_base.num);
|
||||
lavc_venc_context.gop_size = 0; // I-only
|
||||
- lavc_venc_context.pix_fmt= PIX_FMT_YUV420P;
|
||||
+ lavc_venc_context.pix_fmt= AV_PIX_FMT_YUV420P;
|
||||
|
||||
return 1;
|
||||
}
|
|
@ -1,155 +0,0 @@
|
|||
--- libmpcodecs/vf_lavcdeint.c.orig 2013-07-09 16:33:16 UTC
|
||||
+++ libmpcodecs/vf_lavcdeint.c
|
||||
@@ -27,135 +27,6 @@
|
||||
#include "img_format.h"
|
||||
#include "mp_image.h"
|
||||
#include "vf.h"
|
||||
-#include "libavcodec/avcodec.h"
|
||||
-
|
||||
-
|
||||
-struct vf_priv_s
|
||||
-{
|
||||
- int width, height;
|
||||
- int pix_fmt;
|
||||
-};
|
||||
-
|
||||
-/* Support for avcodec's built-in deinterlacer.
|
||||
- * Based on vf_lavc.c
|
||||
- */
|
||||
-
|
||||
-//===========================================================================//
|
||||
-
|
||||
-
|
||||
-/* Convert mplayer's IMGFMT_* to avcodec's PIX_FMT_* for the supported
|
||||
- * IMGFMT's, and return -1 if the deinterlacer doesn't support
|
||||
- * that format (-1 because 0 is a valid PIX_FMT).
|
||||
- */
|
||||
-/* The deinterlacer supports planer 4:2:0, 4:2:2, and 4:4:4 YUV */
|
||||
-static int
|
||||
-imgfmt_to_pixfmt (int imgfmt)
|
||||
-{
|
||||
- switch(imgfmt)
|
||||
- {
|
||||
- /* I hope I got all the supported formats */
|
||||
-
|
||||
- /* 4:2:0 */
|
||||
- case IMGFMT_YV12:
|
||||
- case IMGFMT_I420:
|
||||
- case IMGFMT_IYUV:
|
||||
- return PIX_FMT_YUV420P;
|
||||
- break;
|
||||
-
|
||||
-#if 0
|
||||
- /* 4:2:2 */
|
||||
- case IMGFMT_UYVY:
|
||||
- case IMGFMT_UYNV:
|
||||
- case IMGFMT_Y422:
|
||||
- case IMGFMT_YUY2:
|
||||
- case IMGFMT_YUNV:
|
||||
- case IMGFMT_YVYU:
|
||||
- case IMGFMT_Y42T:
|
||||
- case IMGFMT_V422:
|
||||
- case IMGFMT_V655:
|
||||
- return PIX_FMT_YUV422P;
|
||||
- break;
|
||||
-#endif
|
||||
-
|
||||
- /* Are there any _planar_ YUV 4:4:4 formats? */
|
||||
-
|
||||
- default:
|
||||
- return -1;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static int
|
||||
-config (struct vf_instance *vf,
|
||||
- int width, int height, int d_width, int d_height,
|
||||
- unsigned int flags, unsigned int outfmt)
|
||||
-{
|
||||
- struct vf_priv_s *priv = vf->priv;
|
||||
-
|
||||
- priv->pix_fmt = imgfmt_to_pixfmt(outfmt);
|
||||
- if(priv->pix_fmt == -1)
|
||||
- return 0;
|
||||
-
|
||||
- /* The deinterlacer will fail if this is false */
|
||||
- if ((width & 3) != 0 || (height & 3) != 0)
|
||||
- return 0;
|
||||
-
|
||||
- /* If we get here, the deinterlacer is guaranteed not to fail */
|
||||
-
|
||||
- priv->width = width;
|
||||
- priv->height = height;
|
||||
-
|
||||
- return vf_next_config(vf,
|
||||
- width, height,
|
||||
- d_width, d_height,
|
||||
- flags, outfmt);
|
||||
-}
|
||||
-
|
||||
-static int
|
||||
-put_image (struct vf_instance *vf, mp_image_t *mpi, double pts)
|
||||
-{
|
||||
- struct vf_priv_s *priv = vf->priv;
|
||||
- mp_image_t* dmpi;
|
||||
- AVPicture pic;
|
||||
- AVPicture lavc_picture;
|
||||
-
|
||||
- lavc_picture.data[0] = mpi->planes[0];
|
||||
- lavc_picture.data[1] = mpi->planes[1];
|
||||
- lavc_picture.data[2] = mpi->planes[2];
|
||||
- lavc_picture.linesize[0] = mpi->stride[0];
|
||||
- lavc_picture.linesize[1] = mpi->stride[1];
|
||||
- lavc_picture.linesize[2] = mpi->stride[2];
|
||||
-
|
||||
- dmpi = vf_get_image(vf->next, mpi->imgfmt,
|
||||
- MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,
|
||||
- priv->width, priv->height);
|
||||
-
|
||||
- pic.data[0] = dmpi->planes[0];
|
||||
- pic.data[1] = dmpi->planes[1];
|
||||
- pic.data[2] = dmpi->planes[2];
|
||||
- pic.linesize[0] = dmpi->stride[0];
|
||||
- pic.linesize[1] = dmpi->stride[1];
|
||||
- pic.linesize[2] = dmpi->stride[2];
|
||||
-
|
||||
- if (avpicture_deinterlace(&pic, &lavc_picture,
|
||||
- priv->pix_fmt, priv->width, priv->height) < 0)
|
||||
- {
|
||||
- /* This should not happen -- see config() */
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- return vf_next_put_image(vf, dmpi, pts);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-static int
|
||||
-query_format (struct vf_instance *vf, unsigned int fmt)
|
||||
-{
|
||||
- if(imgfmt_to_pixfmt(fmt) == -1)
|
||||
- return 0;
|
||||
-
|
||||
- return vf_next_query_format(vf,fmt);
|
||||
-}
|
||||
|
||||
|
||||
static int
|
||||
@@ -164,13 +35,10 @@ vf_open(vf_instance_t *vf, char *args)
|
||||
/* We don't have any args */
|
||||
(void) args;
|
||||
|
||||
- vf->config = config;
|
||||
- vf->put_image = put_image;
|
||||
- vf->query_format = query_format;
|
||||
- vf->priv = malloc(sizeof(struct vf_priv_s));
|
||||
- memset(vf->priv,0,sizeof(struct vf_priv_s));
|
||||
+ mp_msg(MSGT_VFILTER,MSGL_FATAL, "lavcdeint has been removed, please use '-vf pp=fd' (same filter) or '-vf yadif'\n");
|
||||
|
||||
- return 1;
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- libmpcodecs/vf_sab.c.orig 2016-11-29 23:52:42 UTC
|
||||
+++ libmpcodecs/vf_sab.c
|
||||
@@ -72,7 +72,7 @@ static int allocStuff(FilterParam *f, in
|
||||
swsF.lumH= swsF.lumV= vec;
|
||||
swsF.chrH= swsF.chrV= NULL;
|
||||
f->preFilterContext= sws_getContext(
|
||||
- width, height, PIX_FMT_GRAY8, width, height, PIX_FMT_GRAY8, get_sws_cpuflags()|SWS_POINT, &swsF, NULL, NULL);
|
||||
+ width, height, AV_PIX_FMT_GRAY8, width, height, AV_PIX_FMT_GRAY8, SWS_POINT, &swsF, NULL, NULL);
|
||||
|
||||
sws_freeVec(vec);
|
||||
vec = sws_getGaussianVec(f->strength, 5.0);
|
|
@ -1,78 +0,0 @@
|
|||
--- libmpcodecs/vf_scale.c.orig 2013-07-09 16:33:16 UTC
|
||||
+++ libmpcodecs/vf_scale.c
|
||||
@@ -201,7 +201,7 @@ static int config(struct vf_instance *vf
|
||||
int round_w=0, round_h=0;
|
||||
int i;
|
||||
SwsFilter *srcFilter, *dstFilter;
|
||||
- enum PixelFormat dfmt, sfmt;
|
||||
+ enum AVPixelFormat dfmt, sfmt;
|
||||
|
||||
vf->priv->colorspace = (struct mp_csp_details) {0};
|
||||
|
||||
@@ -210,7 +210,7 @@ static int config(struct vf_instance *vf
|
||||
return 0;
|
||||
}
|
||||
sfmt = imgfmt2pixfmt(outfmt);
|
||||
- if (outfmt == IMGFMT_RGB8 || outfmt == IMGFMT_BGR8) sfmt = PIX_FMT_PAL8;
|
||||
+ if (outfmt == IMGFMT_RGB8 || outfmt == IMGFMT_BGR8) sfmt = AV_PIX_FMT_PAL8;
|
||||
dfmt = imgfmt2pixfmt(best);
|
||||
|
||||
vo_flags=vf->next->query_format(vf->next,best);
|
||||
@@ -319,13 +319,13 @@ static int config(struct vf_instance *vf
|
||||
sfmt,
|
||||
vf->priv->w, vf->priv->h >> vf->priv->interlaced,
|
||||
dfmt,
|
||||
- int_sws_flags | get_sws_cpuflags(), srcFilter, dstFilter, vf->priv->param);
|
||||
+ int_sws_flags, srcFilter, dstFilter, vf->priv->param);
|
||||
if(vf->priv->interlaced){
|
||||
vf->priv->ctx2=sws_getContext(width, height >> 1,
|
||||
sfmt,
|
||||
vf->priv->w, vf->priv->h >> 1,
|
||||
dfmt,
|
||||
- int_sws_flags | get_sws_cpuflags(), srcFilter, dstFilter, vf->priv->param);
|
||||
+ int_sws_flags, srcFilter, dstFilter, vf->priv->param);
|
||||
}
|
||||
if(!vf->priv->ctx){
|
||||
// error...
|
||||
@@ -612,7 +612,7 @@ error_out:
|
||||
// supported Input formats: YV12, I420, IYUV, YUY2, UYVY, BGR32, BGR24, BGR16, BGR15, RGB32, RGB24, Y8, Y800
|
||||
|
||||
static int query_format(struct vf_instance *vf, unsigned int fmt){
|
||||
- if (!IMGFMT_IS_HWACCEL(fmt) && imgfmt2pixfmt(fmt) != PIX_FMT_NONE) {
|
||||
+ if (!IMGFMT_IS_HWACCEL(fmt) && imgfmt2pixfmt(fmt) != AV_PIX_FMT_NONE) {
|
||||
unsigned int best=find_best_out(vf, fmt);
|
||||
int flags;
|
||||
if(!best) return 0; // no matching out-fmt
|
||||
@@ -661,14 +661,6 @@ int sws_chr_hshift= 0;
|
||||
float sws_chr_sharpen= 0.0;
|
||||
float sws_lum_sharpen= 0.0;
|
||||
|
||||
-int get_sws_cpuflags(void){
|
||||
- return
|
||||
- (gCpuCaps.hasMMX ? SWS_CPU_CAPS_MMX : 0)
|
||||
- | (gCpuCaps.hasMMX2 ? SWS_CPU_CAPS_MMX2 : 0)
|
||||
- | (gCpuCaps.has3DNow ? SWS_CPU_CAPS_3DNOW : 0)
|
||||
- | (gCpuCaps.hasAltiVec ? SWS_CPU_CAPS_ALTIVEC : 0);
|
||||
-}
|
||||
-
|
||||
void sws_getFlagsAndFilterFromCmdLine(int *flags, SwsFilter **srcFilterParam, SwsFilter **dstFilterParam)
|
||||
{
|
||||
static int firstTime=1;
|
||||
@@ -717,14 +709,14 @@ static struct SwsContext *sws_getContext
|
||||
{
|
||||
int flags;
|
||||
SwsFilter *dstFilterParam, *srcFilterParam;
|
||||
- enum PixelFormat dfmt, sfmt;
|
||||
+ enum AVPixelFormat dfmt, sfmt;
|
||||
|
||||
dfmt = imgfmt2pixfmt(dstFormat);
|
||||
sfmt = imgfmt2pixfmt(srcFormat);
|
||||
- if (srcFormat == IMGFMT_RGB8 || srcFormat == IMGFMT_BGR8) sfmt = PIX_FMT_PAL8;
|
||||
+ if (srcFormat == IMGFMT_RGB8 || srcFormat == IMGFMT_BGR8) sfmt = AV_PIX_FMT_PAL8;
|
||||
sws_getFlagsAndFilterFromCmdLine(&flags, &srcFilterParam, &dstFilterParam);
|
||||
|
||||
- return sws_getContext(srcW, srcH, sfmt, dstW, dstH, dfmt, flags | extraflags | get_sws_cpuflags(), srcFilterParam, dstFilterParam, NULL);
|
||||
+ return sws_getContext(srcW, srcH, sfmt, dstW, dstH, dfmt, flags, srcFilterParam, dstFilterParam, NULL);
|
||||
}
|
||||
|
||||
struct SwsContext *sws_getContextFromCmdLine(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat)
|
|
@ -1,10 +0,0 @@
|
|||
--- libmpcodecs/vf_scale.h.orig 2016-11-30 00:01:44 UTC
|
||||
+++ libmpcodecs/vf_scale.h
|
||||
@@ -19,7 +19,6 @@
|
||||
#ifndef MPLAYER_VF_SCALE_H
|
||||
#define MPLAYER_VF_SCALE_H
|
||||
|
||||
-int get_sws_cpuflags(void);
|
||||
struct SwsContext *sws_getContextFromCmdLine(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat);
|
||||
struct SwsContext *sws_getContextFromCmdLine_hq(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat);
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
--- libmpcodecs/vf_screenshot.c.orig 2016-11-30 00:06:27 UTC
|
||||
+++ libmpcodecs/vf_screenshot.c
|
||||
@@ -167,9 +167,9 @@ static int control (vf_instance_t *vf, i
|
||||
|
||||
static int query_format(struct vf_instance *vf, unsigned int fmt)
|
||||
{
|
||||
- enum PixelFormat av_format = imgfmt2pixfmt(fmt);
|
||||
+ enum AVPixelFormat av_format = imgfmt2pixfmt(fmt);
|
||||
|
||||
- if (av_format != PIX_FMT_NONE && sws_isSupportedInput(av_format))
|
||||
+ if (av_format != AV_PIX_FMT_NONE && sws_isSupportedInput(av_format))
|
||||
return vf_next_query_format(vf, fmt);
|
||||
return 0;
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
--- libmpcodecs/vf_smartblur.c.orig 2016-11-30 00:10:36 UTC
|
||||
+++ libmpcodecs/vf_smartblur.c
|
||||
@@ -61,7 +61,7 @@ static int allocStuff(FilterParam *f, in
|
||||
swsF.lumH= swsF.lumV= vec;
|
||||
swsF.chrH= swsF.chrV= NULL;
|
||||
f->filterContext= sws_getContext(
|
||||
- width, height, PIX_FMT_GRAY8, width, height, PIX_FMT_GRAY8, SWS_BICUBIC | get_sws_cpuflags(), &swsF, NULL, NULL);
|
||||
+ width, height, AV_PIX_FMT_GRAY8, width, height, AV_PIX_FMT_GRAY8, SWS_BICUBIC, &swsF, NULL, NULL);
|
||||
|
||||
sws_freeVec(vec);
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
--- libmpdemux/demux_gif.c.orig 2013-07-09 16:33:16 UTC
|
||||
+++ libmpdemux/demux_gif.c
|
||||
@@ -93,14 +93,14 @@ static int demux_gif_fill_buffer(demuxer
|
||||
|
||||
while (type != IMAGE_DESC_RECORD_TYPE) {
|
||||
if (DGifGetRecordType(gif, &type) == GIF_ERROR) {
|
||||
- PrintGifError();
|
||||
+ printf("%s\n", GifErrorString(GIF_ERROR));
|
||||
return 0; // oops
|
||||
}
|
||||
if (type == TERMINATE_RECORD_TYPE)
|
||||
return 0; // eof
|
||||
if (type == SCREEN_DESC_RECORD_TYPE) {
|
||||
if (DGifGetScreenDesc(gif) == GIF_ERROR) {
|
||||
- PrintGifError();
|
||||
+ printf("%s\n", GifErrorString(GIF_ERROR));
|
||||
return 0; // oops
|
||||
}
|
||||
}
|
||||
@@ -108,7 +108,7 @@ static int demux_gif_fill_buffer(demuxer
|
||||
int code;
|
||||
unsigned char *p = NULL;
|
||||
if (DGifGetExtension(gif, &code, &p) == GIF_ERROR) {
|
||||
- PrintGifError();
|
||||
+ printf("%s\n", GifErrorString(GIF_ERROR));
|
||||
return 0; // oops
|
||||
}
|
||||
if (code == 0xF9) {
|
||||
@@ -137,7 +137,7 @@ static int demux_gif_fill_buffer(demuxer
|
||||
comments[length] = 0;
|
||||
printf("%s", comments);
|
||||
if (DGifGetExtensionNext(gif, &p) == GIF_ERROR) {
|
||||
- PrintGifError();
|
||||
+ printf("%s\n", GifErrorString(GIF_ERROR));
|
||||
return 0; // oops
|
||||
}
|
||||
}
|
||||
@@ -145,7 +145,7 @@ static int demux_gif_fill_buffer(demuxer
|
||||
}
|
||||
while (p != NULL) {
|
||||
if (DGifGetExtensionNext(gif, &p) == GIF_ERROR) {
|
||||
- PrintGifError();
|
||||
+ printf("%s\n", GifErrorString(GIF_ERROR));
|
||||
return 0; // oops
|
||||
}
|
||||
}
|
||||
@@ -153,7 +153,7 @@ static int demux_gif_fill_buffer(demuxer
|
||||
}
|
||||
|
||||
if (DGifGetImageDesc(gif) == GIF_ERROR) {
|
||||
- PrintGifError();
|
||||
+ printf("%s\n", GifErrorString(GIF_ERROR));
|
||||
return 0; // oops
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ static int demux_gif_fill_buffer(demuxer
|
||||
memset(dp->buffer, gif->SBackGroundColor, priv->w * priv->h);
|
||||
|
||||
if (DGifGetLine(gif, buf, len) == GIF_ERROR) {
|
||||
- PrintGifError();
|
||||
+ printf("%s\n", GifErrorString(GIF_ERROR));
|
||||
free(buf);
|
||||
return 0; // oops
|
||||
}
|
||||
@@ -256,10 +256,10 @@ static demuxer_t* demux_open_gif(demuxer
|
||||
lseek(demuxer->stream->fd, 0, SEEK_SET);
|
||||
gif = DGifOpenFileHandle(demuxer->stream->fd);
|
||||
#else
|
||||
- gif = DGifOpen(demuxer->stream, my_read_gif);
|
||||
+ gif = DGifOpen(demuxer->stream, my_read_gif, NULL);
|
||||
#endif
|
||||
if (!gif) {
|
||||
- PrintGifError();
|
||||
+ printf("%s\n", GifErrorString(GIF_ERROR));
|
||||
free(priv);
|
||||
return NULL;
|
||||
}
|
||||
@@ -300,8 +300,12 @@ static void demux_close_gif(demuxer_t* d
|
||||
{
|
||||
gif_priv_t *priv = demuxer->priv;
|
||||
if (!priv) return;
|
||||
+#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
|
||||
+ if (priv->gif && DGifCloseFile(priv->gif, NULL) == GIF_ERROR)
|
||||
+#else
|
||||
if (priv->gif && DGifCloseFile(priv->gif) == GIF_ERROR)
|
||||
- PrintGifError();
|
||||
+#endif
|
||||
+ printf("%s\n", GifErrorString(GIF_ERROR));
|
||||
free(priv->refimg);
|
||||
free(priv);
|
||||
}
|
|
@ -1,118 +0,0 @@
|
|||
--- libmpdemux/demux_ogg.c.orig 2013-07-09 16:33:16 UTC
|
||||
+++ libmpdemux/demux_ogg.c
|
||||
@@ -50,21 +50,21 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_OGGTHEORA
|
||||
-#include <theora/theora.h>
|
||||
-int _ilog (unsigned int); /* defined in many places in theora/lib/ */
|
||||
+#include <theora/theoradec.h>
|
||||
#endif
|
||||
|
||||
#define BLOCK_SIZE 4096
|
||||
|
||||
/* Theora decoder context : we won't be able to interpret granule positions
|
||||
- * without using theora_granule_time with the theora_state of the stream.
|
||||
+ * without using th_granule_time with the th_dec_ctx of the stream.
|
||||
* This is duplicated in `vd_theora.c'; put this in a common header?
|
||||
*/
|
||||
#ifdef CONFIG_OGGTHEORA
|
||||
typedef struct theora_struct_st {
|
||||
- theora_state st;
|
||||
- theora_comment cc;
|
||||
- theora_info inf;
|
||||
+ th_setup_info *tsi;
|
||||
+ th_dec_ctx *tctx;
|
||||
+ th_comment tc;
|
||||
+ th_info ti;
|
||||
} theora_struct_t;
|
||||
#endif
|
||||
|
||||
@@ -117,7 +117,7 @@ typedef struct ogg_stream {
|
||||
float samplerate; /// granulpos 2 time
|
||||
int64_t lastpos;
|
||||
int32_t lastsize;
|
||||
- int keyframe_frequency_force;
|
||||
+ int keyframe_granule_shift;
|
||||
|
||||
// Logical stream state
|
||||
ogg_stream_state stream;
|
||||
@@ -300,11 +300,10 @@ static unsigned char *demux_ogg_read_pac
|
||||
have theora_state st, until all header packets were passed to the
|
||||
decoder. */
|
||||
if (!pack->bytes || !(*data&0x80)) {
|
||||
- int keyframe_granule_shift = _ilog(os->keyframe_frequency_force - 1);
|
||||
- int64_t iframemask = (1 << keyframe_granule_shift) - 1;
|
||||
+ int64_t iframemask = (1 << os->keyframe_granule_shift) - 1;
|
||||
|
||||
if (pack->granulepos >= 0) {
|
||||
- os->lastpos = pack->granulepos >> keyframe_granule_shift;
|
||||
+ os->lastpos = pack->granulepos >> os->keyframe_granule_shift;
|
||||
os->lastpos += pack->granulepos & iframemask;
|
||||
*keyframe = (pack->granulepos & iframemask) == 0;
|
||||
} else {
|
||||
@@ -888,14 +887,15 @@ int demux_ogg_open(demuxer_t *demuxer)
|
||||
#ifdef CONFIG_OGGTHEORA
|
||||
} else if (pack.bytes >= 7 && !strncmp (&pack.packet[1], "theora", 6)) {
|
||||
int errorCode = 0;
|
||||
- theora_info inf;
|
||||
- theora_comment cc;
|
||||
+ th_info ti;
|
||||
+ th_comment tc;
|
||||
+ th_setup_info *tsi = NULL;
|
||||
|
||||
- theora_info_init (&inf);
|
||||
- theora_comment_init (&cc);
|
||||
+ th_info_init (&ti);
|
||||
+ th_comment_init (&tc);
|
||||
|
||||
- errorCode = theora_decode_header (&inf, &cc, &pack);
|
||||
- if (errorCode) {
|
||||
+ errorCode = th_decode_headerin (&ti, &tc, &tsi, &pack);
|
||||
+ if (errorCode < 0) {
|
||||
mp_msg(MSGT_DEMUX, MSGL_ERR,
|
||||
"Theora header parsing failed: %i \n", errorCode);
|
||||
} else {
|
||||
@@ -904,30 +904,32 @@ int demux_ogg_open(demuxer_t *demuxer)
|
||||
sh_v->bih = calloc(1, sizeof(*sh_v->bih));
|
||||
sh_v->bih->biSize = sizeof(*sh_v->bih);
|
||||
sh_v->bih->biCompression = sh_v->format = FOURCC_THEORA;
|
||||
- sh_v->fps = ((double)inf.fps_numerator) / (double)inf.fps_denominator;
|
||||
- sh_v->frametime = ((double)inf.fps_denominator) / (double)inf.fps_numerator;
|
||||
- sh_v->disp_w = sh_v->bih->biWidth = inf.frame_width;
|
||||
- sh_v->disp_h = sh_v->bih->biHeight = inf.frame_height;
|
||||
+ sh_v->fps = ((double)ti.fps_numerator) / (double)ti.fps_denominator;
|
||||
+ sh_v->frametime = ((double)ti.fps_denominator) / (double)ti.fps_numerator;
|
||||
+ sh_v->i_bps = ti.target_bitrate / 8;
|
||||
+ sh_v->disp_w = sh_v->bih->biWidth = ti.frame_width;
|
||||
+ sh_v->disp_h = sh_v->bih->biHeight = ti.frame_height;
|
||||
sh_v->bih->biBitCount = 24;
|
||||
sh_v->bih->biPlanes = 3;
|
||||
sh_v->bih->biSizeImage = ((sh_v->bih->biBitCount / 8) * sh_v->bih->biWidth * sh_v->bih->biHeight);
|
||||
ogg_d->subs[ogg_d->num_sub].samplerate = sh_v->fps;
|
||||
ogg_d->subs[ogg_d->num_sub].theora = 1;
|
||||
- ogg_d->subs[ogg_d->num_sub].keyframe_frequency_force = inf.keyframe_frequency_force;
|
||||
+ ogg_d->subs[ogg_d->num_sub].keyframe_granule_shift = ti.keyframe_granule_shift;
|
||||
ogg_d->subs[ogg_d->num_sub].id = n_video;
|
||||
n_video++;
|
||||
mp_msg(MSGT_DEMUX, MSGL_INFO,
|
||||
"[Ogg] stream %d: video (Theora v%d.%d.%d), -vid %d\n",
|
||||
ogg_d->num_sub,
|
||||
- (int)inf.version_major,
|
||||
- (int)inf.version_minor,
|
||||
- (int)inf.version_subminor,
|
||||
+ (int)ti.version_major,
|
||||
+ (int)ti.version_minor,
|
||||
+ (int)ti.version_subminor,
|
||||
n_video - 1);
|
||||
if (mp_msg_test(MSGT_HEADER, MSGL_V))
|
||||
print_video_header(sh_v->bih, MSGL_V);
|
||||
}
|
||||
- theora_comment_clear(&cc);
|
||||
- theora_info_clear(&inf);
|
||||
+ th_comment_clear(&tc);
|
||||
+ th_info_clear(&ti);
|
||||
+ th_setup_free(tsi);
|
||||
#endif /* CONFIG_OGGTHEORA */
|
||||
} else if (pack.bytes >= 4 && !strncmp (&pack.packet[0], "fLaC", 4)) {
|
||||
sh_a = new_sh_audio_aid(demuxer, ogg_d->num_sub, n_audio);
|
|
@ -1,11 +0,0 @@
|
|||
--- libmpdemux/demuxer.h.orig 2013-07-09 16:33:16 UTC
|
||||
+++ libmpdemux/demuxer.h
|
||||
@@ -121,7 +121,7 @@ enum timestamp_type {
|
||||
#define SEEK_BACKWARD (1 << 3)
|
||||
|
||||
// demux_lavf can pass lavf buffers using FF_INPUT_BUFFER_PADDING_SIZE instead
|
||||
-#define MP_INPUT_BUFFER_PADDING_SIZE 16
|
||||
+#define MP_INPUT_BUFFER_PADDING_SIZE 32
|
||||
|
||||
typedef struct demux_stream {
|
||||
int buffer_pos; // current buffer position
|
|
@ -1,30 +0,0 @@
|
|||
--- libmpdemux/demux_lavf.c.orig 2013-07-09 16:33:16 UTC
|
||||
+++ libmpdemux/demux_lavf.c
|
||||
@@ -159,6 +159,7 @@ static int lavf_check_file(demuxer_t *de
|
||||
int probe_data_size = 0;
|
||||
int read_size = INITIAL_PROBE_SIZE;
|
||||
int score;
|
||||
+ char mime[] = "";
|
||||
|
||||
if (!demuxer->priv)
|
||||
demuxer->priv = calloc(sizeof(lavf_priv_t), 1);
|
||||
@@ -203,6 +204,7 @@ static int lavf_check_file(demuxer_t *de
|
||||
avpd.buf_size = probe_data_size;
|
||||
|
||||
score = 0;
|
||||
+ avpd.mime_type = mime;
|
||||
priv->avif = av_probe_input_format2(&avpd, probe_data_size > 0, &score);
|
||||
read_size = FFMIN(2 * read_size, PROBE_BUF_SIZE - probe_data_size);
|
||||
} while ((demuxer->desc->type != DEMUXER_TYPE_LAVF_PREFERRED ||
|
||||
@@ -383,9 +385,9 @@ static void handle_stream(demuxer_t *dem
|
||||
|
||||
if (codec->codec_id == AV_CODEC_ID_RAWVIDEO) {
|
||||
switch (codec->pix_fmt) {
|
||||
- case PIX_FMT_RGB24:
|
||||
+ case AV_PIX_FMT_RGB24:
|
||||
codec->codec_tag = MKTAG(24, 'B', 'G', 'R');
|
||||
- case PIX_FMT_BGR24:
|
||||
+ case AV_PIX_FMT_BGR24:
|
||||
codec->codec_tag = MKTAG(24, 'R', 'G', 'B');
|
||||
}
|
||||
if (!codec->codec_tag)
|
|
@ -1,55 +0,0 @@
|
|||
--- libvo/vo_png.c.orig 2013-07-09 16:33:16 UTC
|
||||
+++ libvo/vo_png.c
|
||||
@@ -87,11 +87,12 @@ config(uint32_t width, uint32_t height,
|
||||
|
||||
|
||||
static uint32_t draw_image(mp_image_t* mpi){
|
||||
- AVFrame pic;
|
||||
+ AVFrame *pic;
|
||||
int buffersize;
|
||||
- int res;
|
||||
+ int res, got_pkt;
|
||||
char buf[100];
|
||||
FILE *outfile;
|
||||
+ AVPacket pkt;
|
||||
|
||||
// if -dr or -slices then do nothing:
|
||||
if(mpi->flags&(MP_IMGFLAG_DIRECT|MP_IMGFLAG_DRAW_CALLBACK)) return VO_TRUE;
|
||||
@@ -103,24 +104,29 @@ static uint32_t draw_image(mp_image_t* m
|
||||
return 1;
|
||||
}
|
||||
|
||||
- pic.data[0] = mpi->planes[0];
|
||||
- pic.linesize[0] = mpi->stride[0];
|
||||
+ pic = av_frame_alloc();
|
||||
+ pic->data[0] = mpi->planes[0];
|
||||
+ pic->linesize[0] = mpi->stride[0];
|
||||
buffersize = mpi->w * mpi->h * 8;
|
||||
if (outbuffer_size < buffersize) {
|
||||
av_freep(&outbuffer);
|
||||
outbuffer = av_malloc(buffersize);
|
||||
outbuffer_size = buffersize;
|
||||
}
|
||||
- res = avcodec_encode_video(avctx, outbuffer, outbuffer_size, &pic);
|
||||
+ av_init_packet(&pkt);
|
||||
+ pkt.data = outbuffer;
|
||||
+ pkt.size = outbuffer_size;
|
||||
+ res = avcodec_encode_video2(avctx, &pkt, pic, &got_pkt);
|
||||
+ av_frame_free(&pic);
|
||||
|
||||
- if(res < 0){
|
||||
- mp_msg(MSGT_VO,MSGL_WARN, "[VO_PNG] Error in create_png.\n");
|
||||
- fclose(outfile);
|
||||
- return 1;
|
||||
+ if (res < 0 || !got_pkt) {
|
||||
+ mp_msg(MSGT_VO,MSGL_WARN, "[VO_PNG] Error in create_png.\n");
|
||||
+ } else {
|
||||
+ fwrite(outbuffer, pkt.size, 1, outfile);
|
||||
}
|
||||
|
||||
- fwrite(outbuffer, res, 1, outfile);
|
||||
fclose(outfile);
|
||||
+ av_free_packet(&pkt);
|
||||
|
||||
return VO_TRUE;
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
--- libvo/vo_v4l2.c.orig 2015-08-26 13:36:16 UTC
|
||||
+++ libvo/vo_v4l2.c
|
||||
@@ -33,9 +33,7 @@
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
-#include <linux/types.h>
|
||||
#include <linux/videodev2.h>
|
||||
-#include <linux/ioctl.h>
|
||||
|
||||
#include "mp_msg.h"
|
||||
#include "subopt-helper.h"
|
|
@ -1,117 +0,0 @@
|
|||
--- libvo/vo_gif89a.c.orig 2013-07-09 16:33:16 UTC
|
||||
+++ libvo/vo_gif89a.c
|
||||
@@ -44,13 +44,13 @@
|
||||
* entire argument being interpretted as the filename.
|
||||
*/
|
||||
|
||||
-#include <gif_lib.h>
|
||||
-
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
+#include <gif_lib.h>
|
||||
+
|
||||
#include "config.h"
|
||||
#include "subopt-helper.h"
|
||||
#include "video_out.h"
|
||||
@@ -69,6 +69,15 @@ static const vo_info_t info = {
|
||||
|
||||
const LIBVO_EXTERN(gif89a)
|
||||
|
||||
+#if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5
|
||||
+#define EGifOpenFileName(a, b) EGifOpenFileName(a, b, NULL)
|
||||
+#define MakeMapObject GifMakeMapObject
|
||||
+#define FreeMapObject GifFreeMapObject
|
||||
+#define QuantizeBuffer GifQuantizeBuffer
|
||||
+#if defined GIFLIB_MINOR && GIFLIB_MINOR >= 1
|
||||
+#define EGifCloseFile(a) EGifCloseFile(a, NULL)
|
||||
+#endif
|
||||
+#endif
|
||||
|
||||
// how many frames per second we are aiming for during output.
|
||||
static float target_fps;
|
||||
@@ -92,6 +101,8 @@ static uint32_t img_width;
|
||||
static uint32_t img_height;
|
||||
// image data for slice rendering
|
||||
static uint8_t *slice_data = NULL;
|
||||
+// pointer for whole frame rendering
|
||||
+static uint8_t *frame_data = NULL;
|
||||
// reduced image data for flip_page
|
||||
static uint8_t *reduce_data = NULL;
|
||||
// reduced color map for flip_page
|
||||
@@ -156,7 +167,7 @@ static int config(uint32_t s_width, uint
|
||||
uint32_t d_height, uint32_t flags, char *title,
|
||||
uint32_t format)
|
||||
{
|
||||
-#ifdef CONFIG_GIF_4
|
||||
+#if defined CONFIG_GIF_4 || GIFLIB_MAJOR >= 5
|
||||
// these are control blocks for the gif looping extension.
|
||||
char LB1[] = "NETSCAPE2.0";
|
||||
char LB2[] = { 1, 0, 0 };
|
||||
@@ -185,23 +196,25 @@ static int config(uint32_t s_width, uint
|
||||
return 1;
|
||||
}
|
||||
|
||||
+ new_gif = EGifOpenFileName(gif_filename, 0);
|
||||
+ if (new_gif == NULL) {
|
||||
+ mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: error opening file \"%s\" for output.\n", gif_filename);
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+#if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5
|
||||
+ EGifSetGifVersion(new_gif, 1);
|
||||
+#elif defined CONFIG_GIF_4
|
||||
// the EGifSetGifVersion line causes segfaults in certain
|
||||
// earlier versions of libungif. i don't know exactly which,
|
||||
// but certainly in all those before v4. if you have problems,
|
||||
// you need to upgrade your gif library.
|
||||
-#ifdef CONFIG_GIF_4
|
||||
EGifSetGifVersion("89a");
|
||||
#else
|
||||
mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: Your version of libungif needs to be upgraded.\n");
|
||||
mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: Some functionality has been disabled.\n");
|
||||
#endif
|
||||
|
||||
- new_gif = EGifOpenFileName(gif_filename, 0);
|
||||
- if (new_gif == NULL) {
|
||||
- mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: error opening file \"%s\" for output.\n", gif_filename);
|
||||
- return 1;
|
||||
- }
|
||||
-
|
||||
slice_data = malloc(img_width * img_height * 3);
|
||||
if (slice_data == NULL) {
|
||||
mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: malloc failed.\n");
|
||||
@@ -231,7 +244,12 @@ static int config(uint32_t s_width, uint
|
||||
|
||||
// set the initial width and height info.
|
||||
EGifPutScreenDesc(new_gif, s_width, s_height, 256, 0, reduce_cmap);
|
||||
-#ifdef CONFIG_GIF_4
|
||||
+#if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5
|
||||
+ EGifPutExtensionLeader(new_gif, 0xFF);
|
||||
+ EGifPutExtensionBlock(new_gif, 11, LB1);
|
||||
+ EGifPutExtensionBlock(new_gif, 3, LB2);
|
||||
+ EGifPutExtensionTrailer(new_gif);
|
||||
+#elif defined CONFIG_GIF_4
|
||||
// version 3 of libungif does not support multiple control blocks.
|
||||
// looping requires multiple control blocks.
|
||||
// therefore, looping is only enabled for v4 and up.
|
||||
@@ -311,7 +329,8 @@ static void flip_page(void)
|
||||
|
||||
static int draw_frame(uint8_t *src[])
|
||||
{
|
||||
- return 1;
|
||||
+ frame_data = src[0];
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y)
|
||||
@@ -370,6 +389,7 @@ static void uninit(void)
|
||||
// set the pointers back to null.
|
||||
new_gif = NULL;
|
||||
gif_filename = NULL;
|
||||
+ frame_data = NULL;
|
||||
slice_data = NULL;
|
||||
reduce_data = NULL;
|
||||
reduce_cmap = NULL;
|
|
@ -1,90 +0,0 @@
|
|||
--- screenshot.c.orig 2013-07-09 16:33:27 UTC
|
||||
+++ screenshot.c
|
||||
@@ -57,7 +57,7 @@ static int destroy_ctx(void *ptr)
|
||||
{
|
||||
struct screenshot_ctx *ctx = ptr;
|
||||
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 28, 0)
|
||||
- avcodec_free_frame(&ctx->pic);
|
||||
+ av_frame_free(&ctx->pic);
|
||||
#else
|
||||
av_free(ctx->pic);
|
||||
#endif
|
||||
@@ -69,7 +69,7 @@ static screenshot_ctx *screenshot_get_ct
|
||||
if (!mpctx->screenshot_ctx) {
|
||||
struct screenshot_ctx *ctx = talloc_zero(mpctx, screenshot_ctx);
|
||||
talloc_set_destructor(ctx, destroy_ctx);
|
||||
- ctx->pic = avcodec_alloc_frame();
|
||||
+ ctx->pic = av_frame_alloc();
|
||||
assert(ctx->pic);
|
||||
mpctx->screenshot_ctx = ctx;
|
||||
}
|
||||
@@ -80,8 +80,12 @@ static int write_png(screenshot_ctx *ctx
|
||||
{
|
||||
char *fname = ctx->fname;
|
||||
FILE *fp = NULL;
|
||||
- void *outbuffer = NULL;
|
||||
int success = 0;
|
||||
+ int got_pkt;
|
||||
+ AVPacket pkt = {0};
|
||||
+ int got_output = 0;
|
||||
+
|
||||
+ av_init_packet(&pkt);
|
||||
|
||||
struct AVCodec *png_codec = avcodec_find_encoder(AV_CODEC_ID_PNG);
|
||||
AVCodecContext *avctx = NULL;
|
||||
@@ -94,7 +98,7 @@ static int write_png(screenshot_ctx *ctx
|
||||
avctx->time_base = AV_TIME_BASE_Q;
|
||||
avctx->width = image->width;
|
||||
avctx->height = image->height;
|
||||
- avctx->pix_fmt = PIX_FMT_RGB24;
|
||||
+ avctx->pix_fmt = AV_PIX_FMT_RGB24;
|
||||
avctx->compression_level = 0;
|
||||
|
||||
if (avcodec_open2(avctx, png_codec, NULL) < 0) {
|
||||
@@ -104,19 +108,14 @@ static int write_png(screenshot_ctx *ctx
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
- size_t outbuffer_size = image->width * image->height * 3 * 2;
|
||||
- outbuffer = malloc(outbuffer_size);
|
||||
- if (!outbuffer)
|
||||
- goto error_exit;
|
||||
-
|
||||
AVFrame *pic = ctx->pic;
|
||||
- avcodec_get_frame_defaults(pic);
|
||||
+ av_frame_unref(pic);
|
||||
for (int n = 0; n < 4; n++) {
|
||||
pic->data[n] = image->planes[n];
|
||||
pic->linesize[n] = image->stride[n];
|
||||
}
|
||||
- int size = avcodec_encode_video(avctx, outbuffer, outbuffer_size, pic);
|
||||
- if (size < 1)
|
||||
+ int ret = avcodec_encode_video2(avctx, &pkt, pic, &got_output);
|
||||
+ if (ret < 0)
|
||||
goto error_exit;
|
||||
|
||||
fp = fopen(fname, "wb");
|
||||
@@ -126,20 +125,20 @@ static int write_png(screenshot_ctx *ctx
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
- fwrite(outbuffer, size, 1, fp);
|
||||
+ fwrite(pkt.data, pkt.size, 1, fp);
|
||||
fflush(fp);
|
||||
|
||||
if (ferror(fp))
|
||||
goto error_exit;
|
||||
|
||||
- success = 1;
|
||||
+ success = !!got_output;
|
||||
error_exit:
|
||||
if (avctx)
|
||||
avcodec_close(avctx);
|
||||
av_free(avctx);
|
||||
if (fp)
|
||||
fclose(fp);
|
||||
- free(outbuffer);
|
||||
+ av_free_packet(&pkt);
|
||||
return success;
|
||||
}
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
--- stream/tvi_bsdbt848.c.orig 2013-07-09 16:33:36 UTC
|
||||
+++ stream/tvi_bsdbt848.c
|
||||
@@ -368,11 +368,11 @@ static int control(priv_t *priv, int cmd
|
||||
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;
|
||||
@@ -393,7 +393,7 @@ static int control(priv_t *priv, int cmd
|
||||
|
||||
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;
|
||||
@@ -417,9 +417,28 @@ static int control(priv_t *priv, int cmd
|
||||
}
|
||||
}
|
||||
|
||||
- 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(ioctl(priv->btfd, METEORSFMT, &priv->iformat) < 0)
|
||||
+ 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, BT848SFMT, &priv->iformat) < 0)
|
||||
{
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSFMT", strerror(errno));
|
||||
return TVI_CONTROL_FALSE;
|
||||
@@ -548,8 +567,9 @@ G_private = priv; /* Oooh, sick */
|
||||
/* 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;
|
||||
@@ -574,7 +594,7 @@ if(priv->btfd < 0)
|
||||
}
|
||||
|
||||
if(priv->videoready == TRUE &&
|
||||
- ioctl(priv->btfd, METEORSFMT, &priv->iformat) < 0)
|
||||
+ ioctl(priv->btfd, BT848SFMT, &priv->iformat) < 0)
|
||||
{
|
||||
mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "SETEORSFMT", strerror(errno));
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
--- stream/tvi_v4l2.c.orig 2013-07-09 16:33:36 UTC
|
||||
+++ stream/tvi_v4l2.c
|
||||
@@ -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 */
|
|
@ -1,10 +0,0 @@
|
|||
--- stream/stream_pvr.c.orig 2015-08-26 13:37:03 UTC
|
||||
+++ stream/stream_pvr.c
|
||||
@@ -37,7 +37,6 @@
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <poll.h>
|
||||
-#include <linux/types.h>
|
||||
#include <linux/videodev2.h>
|
||||
|
||||
#include "mp_msg.h"
|
|
@ -1,21 +0,0 @@
|
|||
--- stream/stream_radio.c.orig 2015-08-26 13:37:17 UTC
|
||||
+++ stream/stream_radio.c
|
||||
@@ -40,17 +40,12 @@
|
||||
#ifdef IOCTL_BT848_H_NAME
|
||||
#include IOCTL_BT848_H_NAME
|
||||
#endif
|
||||
-
|
||||
-#else /* CONFIG_RADIO_BSDBT848 */
|
||||
-
|
||||
-#include <linux/types.h>
|
||||
+#endif
|
||||
|
||||
#ifdef CONFIG_RADIO_V4L2
|
||||
#include <linux/videodev2.h>
|
||||
#endif
|
||||
|
||||
-#endif // !IOCTL_BT848_H_NAME
|
||||
-
|
||||
|
||||
#include "stream.h"
|
||||
#include "libmpdemux/demuxer.h"
|
|
@ -1,10 +0,0 @@
|
|||
--- sub/subassconvert.c.orig 2013-07-09 16:33:36 UTC
|
||||
+++ sub/subassconvert.c
|
||||
@@ -18,6 +18,7 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
+#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
|
@ -1,10 +0,0 @@
|
|||
--- sub/subreader.c.orig 2013-07-09 16:33:36 UTC
|
||||
+++ sub/subreader.c
|
||||
@@ -21,6 +21,7 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
+#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
|
@ -1,11 +0,0 @@
|
|||
--- sub/spudec.c.orig 2016-11-30 00:23:04 UTC
|
||||
+++ sub/spudec.c
|
||||
@@ -861,7 +861,7 @@ static void sws_spu_image(unsigned char
|
||||
oldvar = spu_gaussvar;
|
||||
}
|
||||
|
||||
- ctx=sws_getContext(sw, sh, PIX_FMT_GRAY8, dw, dh, PIX_FMT_GRAY8, SWS_GAUSS, &filter, NULL, NULL);
|
||||
+ ctx=sws_getContext(sw, sh, AV_PIX_FMT_GRAY8, dw, dh, AV_PIX_FMT_GRAY8, SWS_GAUSS, &filter, NULL, NULL);
|
||||
sws_scale(ctx,&s1,&ss,0,sh,&d1,&ds);
|
||||
for (i=ss*sh-1; i>=0; i--) if (!s2[i]) s2[i] = 255; //else s2[i] = 1;
|
||||
sws_scale(ctx,(const uint8_t **)&s2,&ss,0,sh,&d2,&ds);
|
|
@ -1,13 +0,0 @@
|
|||
|
||||
==================================================================
|
||||
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
|
||||
===================================================================
|
|
@ -1,6 +0,0 @@
|
|||
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: https://github.com/mplayer2
|
|
@ -1,5 +0,0 @@
|
|||
bin/mplayer
|
||||
etc/mplayer/codecs.conf.sample
|
||||
etc/mplayer/input.conf.sample
|
||||
etc/mplayer/mplayer.conf.sample
|
||||
%%MANPAGES%%man/man1/mplayer.1.gz
|
Loading…
Add table
Reference in a new issue