summaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/xbmc/README10
-rw-r--r--multimedia/xbmc/patches/0001-Revert-drop-support-for-external-ffmpeg.patch53
-rw-r--r--multimedia/xbmc/patches/0002-Revert-linux-link-ffmpeg-statically.patch293
-rw-r--r--multimedia/xbmc/patches/0003-makefile-include.patch14
-rw-r--r--multimedia/xbmc/patches/samba-4.0.patch24
-rw-r--r--multimedia/xbmc/patches/xbmc-12.2-ffmpeg-2.0.patch2102
-rw-r--r--multimedia/xbmc/patches/xbmc-Gotham-rtmpdump-build.patch13
-rw-r--r--multimedia/xbmc/patches/xbmc-Gotham-samba-4.0.patch24
-rw-r--r--multimedia/xbmc/patches/xbmc-pvr-addons-ffmpeg-2.0.patch14
-rw-r--r--multimedia/xbmc/patches/xbmc-rtmpdump-build.patch13
-rw-r--r--multimedia/xbmc/xbmc.SlackBuild36
-rw-r--r--multimedia/xbmc/xbmc.info12
12 files changed, 428 insertions, 2180 deletions
diff --git a/multimedia/xbmc/README b/multimedia/xbmc/README
index 123ba2fa88..0f810d3619 100644
--- a/multimedia/xbmc/README
+++ b/multimedia/xbmc/README
@@ -5,11 +5,11 @@ viewing and playing a vast library of audio, video and image formats.
XBMC has a sophisticated library management system that allows you to
organize all your media to give you quick and immediate access.
-Optional dependencies are: libcec, pulseaudio, libbluray, libnfs,
+Optional dependencies: libcec, pulseaudio, libbluray, libnfs, libva,
libdvdcss, lirc, cwiid, pybluez, id3lib, libvdpau, rtmpdump, afpfs-ng,
-libmicrohttpd, libva, avahi, lame, ffmpeg, libshairport
+libmicrohttpd, avahi, lame, ffmpeg
-Optional: libcrystalhd (not available at slackbuilds.org)
+Optional: libcrystalhd and libshairport (not available at slackbuilds.org)
Below are some paramaters that can be passed to the slackbuild to turn
on some optional components.
@@ -22,3 +22,7 @@ PULSE=yes|no (Default is no), requires pulseaudio
Note: The use of external ffmpeg is discouraged by the XBMC developers.
PVR information: http://wiki.xbmc.org/index.php?title=PVR
+
+NOTE:
+Please remove or rename /etc/oss.conf if it exists on your system
+prior building this package or it will fail to build.
diff --git a/multimedia/xbmc/patches/0001-Revert-drop-support-for-external-ffmpeg.patch b/multimedia/xbmc/patches/0001-Revert-drop-support-for-external-ffmpeg.patch
new file mode 100644
index 0000000000..d0920b3bd6
--- /dev/null
+++ b/multimedia/xbmc/patches/0001-Revert-drop-support-for-external-ffmpeg.patch
@@ -0,0 +1,53 @@
+From e55766aa8da7265bea129c70cfd445ad66191fd0 Mon Sep 17 00:00:00 2001
+From: Michael Cronenworth <mike@cchtml.com>
+Date: Sun, 16 Mar 2014 17:14:03 -0500
+Subject: [PATCH 1/2] Revert "drop support for external ffmpeg"
+
+This reverts commit e211654714b2266b80ba65361bda8f715d47933a.
+
+Conflicts:
+ configure.in
+---
+ configure.in | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index f9f5693..c389b76 100644
+--- a/configure.in
++++ b/configure.in
+@@ -191,6 +191,9 @@ libcec_disabled="== libcec disabled. CEC adapter support will not be available.
+ # External library message strings
+ external_libraries_enabled="== Use of all supported external libraries enabled. =="
+ external_libraries_disabled="== Use of all supported external libraries disabled. =="
++external_ffmpeg_enabled="== Use of external ffmpeg enabled. =="
++external_ffmpeg_disabled="== Use of external ffmpeg disabled. =="
++ffmpeg_vdpau_not_supported="== External ffmpeg doesn't support VDPAU. VDPAU support disabled. =="
+ dashes="------------------------"
+ final_message="\n XBMC Configuration:"
+ final_message="\n$dashes$final_message\n$dashes"
+@@ -569,6 +572,12 @@ AC_ARG_ENABLE([external-libraries],
+ [use_external_libraries=$enableval],
+ [use_external_libraries=no])
+
++AC_ARG_ENABLE([external-ffmpeg],
++ [AS_HELP_STRING([--enable-external-ffmpeg],
++ [enable use of external ffmpeg libraries (default is no) 'Linux only'])],
++ [use_external_ffmpeg=$enableval],
++ [use_external_ffmpeg=$use_external_libraries])
++
+ AC_ARG_ENABLE([libav-compat],
+ [AS_HELP_STRING([--enable-libav-compat],
+ [build a wrapper around libav to provide the functions needed by XBMC. This is
+@@ -600,9 +609,6 @@ PKG_PROG_PKG_CONFIG
+ MAKE="${MAKE:-make}"
+ OBJDUMP="${OBJDUMP:-objdump}"
+
+-use_external_ffmpeg=no
+-use_static_ffmpeg=no
+-
+ # ffmpeg needs the output of uname -s (e.x. linux, darwin) for the target_os
+ # there is no autoconf variable which will give
+ # the correct output format when doing cross compilation
+--
+1.8.5.3
+
diff --git a/multimedia/xbmc/patches/0002-Revert-linux-link-ffmpeg-statically.patch b/multimedia/xbmc/patches/0002-Revert-linux-link-ffmpeg-statically.patch
new file mode 100644
index 0000000000..a610aa9f4c
--- /dev/null
+++ b/multimedia/xbmc/patches/0002-Revert-linux-link-ffmpeg-statically.patch
@@ -0,0 +1,293 @@
+From 6df5c168c9de11fa6fdec250ba2b1c732ff3e9a2 Mon Sep 17 00:00:00 2001
+From: Michael Cronenworth <mike@cchtml.com>
+Date: Sun, 16 Mar 2014 17:23:51 -0500
+Subject: [PATCH 2/2] Revert "linux: link ffmpeg statically"
+
+This reverts commit 974a3c0e97b817ca358a959a026db95330673642.
+
+Conflicts:
+ Makefile.in
+ configure.in
+---
+ Makefile.in | 14 ---------------
+ configure.in | 13 +------------
+ lib/DllAvCodec.h | 4 ++--
+ lib/DllAvFilter.h | 2 +-
+ lib/DllAvFormat.h | 8 ++++----
+ lib/DllAvUtil.h | 4 ++--
+ lib/DllPostProc.h | 2 +-
+ lib/DllSwResample.h | 4 ++--
+ lib/DllSwScale.h | 4 ++--
+ lib/Makefile.in | 14 --------------
+ 10 files changed, 15 insertions(+), 54 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 6f689cf..bfadbe6 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -472,20 +472,6 @@ ifeq ($(findstring freebsd,@ARCH@),freebsd)
+ DYNOBJSXBMC+= xbmc/freebsd/freebsd.a
+ endif
+
+-ifeq (@USE_STATIC_FFMPEG@,1)
+-FFMPEGOBJS = lib/ffmpeg/libavcodec/libavcodec.a \
+- lib/ffmpeg/libavfilter/libavfilter.a \
+- lib/ffmpeg/libswresample/libswresample.a \
+- lib/ffmpeg/libavformat/libavformat.a \
+- lib/ffmpeg/libavutil/libavutil.a \
+- lib/ffmpeg/libpostproc/libpostproc.a \
+- lib/ffmpeg/libswscale/libswscale.a
+-DYNOBJSXBMC+= $(FFMPEGOBJS)
+-LIBS+= @GNUTLS_ALL_LIBS@ @VORBISENC_ALL_LIBS@
+-
+-$(FFMPEGOBJS): dvdpcodecs
+-endif
+-
+ ifneq (@USE_LIBXBMC@,1)
+ MAINOBJS+=xbmc/main/main.a
+ else
+diff --git a/configure.in b/configure.in
+index c389b76..0c6fc47 100644
+--- a/configure.in
++++ b/configure.in
+@@ -874,14 +874,6 @@ elif test "$use_arch" = "arm"; then
+ fi
+ fi
+ fi
+-if test "$use_static_ffmpeg" = "yes"; then
+- USE_STATIC_FFMPEG=1
+- AC_DEFINE([USE_STATIC_FFMPEG], [1], [link ffmpeg statically])
+- # ffmpeg may depend on gnutls and vorbisenc, we add those libs at the end of linker
+- # command in order to resolve any missing symbols
+- GNUTLS_ALL_LIBS=`${PKG_CONFIG} --static --libs-only-l --silence-errors gnutls`
+- VORBISENC_ALL_LIBS=`${PKG_CONFIG} --static --libs-only-l --silence-errors vorbisenc`
+-fi
+
+ # Checks for library functions.
+ AC_FUNC_ALLOCA
+@@ -2619,7 +2618,6 @@ AC_SUBST(DISABLE_FISHBMC)
+ AC_SUBST(DISABLE_PROJECTM)
+ AC_SUBST(USE_SKIN_TOUCHED)
+ AC_SUBST(USE_EXTERNAL_FFMPEG)
+-AC_SUBST(USE_STATIC_FFMPEG)
+ AC_SUBST(USE_LIBAV_HACKS)
+ AC_SUBST(PYTHON_VERSION)
+ AC_SUBST(OUTPUT_FILES)
+@@ -2666,8 +2663,6 @@ AC_SUBST(USE_ANDROID)
+ AC_SUBST(GTEST_CONFIGURED)
+ AC_SUBST(USE_DOXYGEN)
+ AC_SUBST(USE_PVR_ADDONS)
+-AC_SUBST(GNUTLS_ALL_LIBS)
+-AC_SUBST(VORBISENC_ALL_LIBS)
+
+ # pushd and popd are not available in other shells besides bash, so implement
+ # our own pushd/popd functions
+@@ -2832,7 +2819,7 @@ XB_CONFIG_MODULE([lib/ffmpeg], [
+ --disable-ffserver \
+ --disable-ffmpeg \
+ --disable-crystalhd \
+- `if test "$use_static_ffmpeg" = "yes"; then echo --enable-static --disable-shared; else echo --disable-static --enable-shared; fi` \
++ --enable-shared \
+ --disable-doc \
+ --enable-postproc \
+ --enable-gpl \
+diff --git a/lib/DllAvCodec.h b/lib/DllAvCodec.h
+index af13a15..5cef736 100644
+--- a/lib/DllAvCodec.h
++++ b/lib/DllAvCodec.h
+@@ -94,7 +94,7 @@ public:
+ virtual AVDictionary* av_frame_get_metadata(const AVFrame* frame)=0;
+ };
+
+-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
++#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
+
+ // Use direct layer
+ class DllAvCodec : public DllDynamic, DllAvCodecInterface
+@@ -166,7 +166,7 @@ public:
+ // DLL faking.
+ virtual bool ResolveExports() { return true; }
+ virtual bool Load() {
+-#if !defined(TARGET_DARWIN) && !defined(USE_STATIC_FFMPEG)
++#if !defined(TARGET_DARWIN)
+ CLog::Log(LOGDEBUG, "DllAvCodec: Using libavcodec system library");
+ #endif
+ return true;
+diff --git a/lib/DllAvFilter.h b/lib/DllAvFilter.h
+index 05e5c6f..2200bfa 100644
+--- a/lib/DllAvFilter.h
++++ b/lib/DllAvFilter.h
+@@ -104,7 +104,7 @@ public:
+ #endif
+ };
+
+-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
++#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
+ // Use direct mapping
+ class DllAvFilter : public DllDynamic, DllAvFilterInterface
+ {
+diff --git a/lib/DllAvFormat.h b/lib/DllAvFormat.h
+index fc7e166..0016c0b 100644
+--- a/lib/DllAvFormat.h
++++ b/lib/DllAvFormat.h
+@@ -41,7 +41,7 @@ extern "C" {
+ void xbmc_read_frame_flush(AVFormatContext *s);
+ #else
+ #include "libavformat/avformat.h"
+- #if defined(TARGET_DARWIN) || defined(USE_STATIC_FFMPEG)
++ #if defined(TARGET_DARWIN)
+ void ff_read_frame_flush(AVFormatContext *s); // internal replacement
+ #define xbmc_read_frame_flush ff_read_frame_flush
+ #endif
+@@ -73,7 +73,7 @@ public:
+ virtual int av_read_play(AVFormatContext *s)=0;
+ virtual int av_read_pause(AVFormatContext *s)=0;
+ virtual int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)=0;
+-#if (!defined USE_EXTERNAL_FFMPEG) && (!defined TARGET_DARWIN) && (!defined USE_STATIC_FFMPEG)
++#if (!defined USE_EXTERNAL_FFMPEG) && (!defined TARGET_DARWIN)
+ virtual int avformat_find_stream_info_dont_call(AVFormatContext *ic, AVDictionary **options)=0;
+ #endif
+ virtual int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options)=0;
+@@ -108,7 +108,7 @@ public:
+ #endif
+ };
+
+-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
++#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
+
+ // Use direct mapping
+ class DllAvFormat : public DllDynamic, DllAvFormatInterface
+@@ -170,7 +170,7 @@ public:
+ // DLL faking.
+ virtual bool ResolveExports() { return true; }
+ virtual bool Load() {
+-#if !defined(TARGET_DARWIN) && !defined(USE_STATIC_FFMPEG)
++#if !defined(TARGET_DARWIN)
+ CLog::Log(LOGDEBUG, "DllAvFormat: Using libavformat system library");
+ #endif
+ CSingleLock lock(DllAvCodec::m_critSection);
+diff --git a/lib/DllAvUtil.h b/lib/DllAvUtil.h
+index 0fcdf10..ce5889b 100644
+--- a/lib/DllAvUtil.h
++++ b/lib/DllAvUtil.h
+@@ -116,7 +116,7 @@ public:
+ #endif
+ };
+
+-#if defined (USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
++#if defined (USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
+ // Use direct layer
+ class DllAvUtilBase : public DllDynamic, DllAvUtilInterface
+ {
+@@ -174,7 +174,7 @@ public:
+ // DLL faking.
+ virtual bool ResolveExports() { return true; }
+ virtual bool Load() {
+-#if !defined(TARGET_DARWIN) && !defined(USE_STATIC_FFMPEG)
++#if !defined(TARGET_DARWIN)
+ CLog::Log(LOGDEBUG, "DllAvUtilBase: Using libavutil system library");
+ #endif
+ return true;
+diff --git a/lib/DllPostProc.h b/lib/DllPostProc.h
+index e9542eb..0265651 100644
+--- a/lib/DllPostProc.h
++++ b/lib/DllPostProc.h
+@@ -78,7 +78,7 @@ public:
+ virtual void pp_free_context(pp_context *ppContext)=0;
+ };
+
+-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
++#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
+
+ // We call directly.
+ class DllPostProc : public DllDynamic, DllPostProcInterface
+diff --git a/lib/DllSwResample.h b/lib/DllSwResample.h
+index cd1452b..854d250 100644
+--- a/lib/DllSwResample.h
++++ b/lib/DllSwResample.h
+@@ -60,7 +60,7 @@ public:
+ virtual int swr_set_compensation(struct SwrContext *s, int sample_delta, int compensation_distance) = 0;
+ };
+
+-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
++#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
+
+ // Use direct mapping
+ class DllSwResample : public DllDynamic, DllSwResampleInterface
+@@ -71,7 +71,7 @@ public:
+ // DLL faking.
+ virtual bool ResolveExports() { return true; }
+ virtual bool Load() {
+-#if !defined(TARGET_DARWIN) && !defined(USE_STATIC_FFMPEG)
++#if !defined(TARGET_DARWIN)
+ CLog::Log(LOGDEBUG, "DllAvFormat: Using libswresample system library");
+ #endif
+ return true;
+diff --git a/lib/DllSwScale.h b/lib/DllSwScale.h
+index 97e3b40..36bb616 100644
+--- a/lib/DllSwScale.h
++++ b/lib/DllSwScale.h
+@@ -87,7 +87,7 @@ public:
+ virtual void sws_freeContext(struct SwsContext *context)=0;
+ };
+
+-#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) || (defined USE_STATIC_FFMPEG)
++#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
+
+ // We call into this library directly.
+ class DllSwScale : public DllDynamic, public DllSwScaleInterface
+@@ -111,7 +111,7 @@ public:
+ // DLL faking.
+ virtual bool ResolveExports() { return true; }
+ virtual bool Load() {
+-#if !defined(TARGET_DARWIN) && !defined(USE_STATIC_FFMPEG)
++#if !defined(TARGET_DARWIN)
+ CLog::Log(LOGDEBUG, "DllSwScale: Using libswscale system library");
+ #endif
+ return true;
+diff --git a/lib/Makefile.in b/lib/Makefile.in
+index ca18a4a..906219c 100644
+--- a/lib/Makefile.in
++++ b/lib/Makefile.in
+@@ -27,7 +27,6 @@ endif
+
+ LIBS=
+ ifneq (@USE_EXTERNAL_FFMPEG@,1)
+-ifneq (@USE_STATIC_FFMPEG@,1)
+ LIBS+=$(AVUTIL_SO) \
+ $(AVCODEC_SO) \
+ $(AVFORMAT_SO) \
+@@ -36,12 +35,10 @@ ifneq (@USE_STATIC_FFMPEG@,1)
+ $(SWSCALE_SO) \
+ $(SWRESAMPLE_SO)
+ endif
+-endif
+
+ .PHONY: $(DIRS) codecs
+
+ ifneq ($(findstring osx,$(ARCH)), osx)
+-ifneq (@USE_STATIC_FFMPEG@,1)
+
+ codecs: $(addprefix $(SYSDIR)/, $(LIBS));
+
+@@ -74,17 +71,6 @@ ffmpeg/libswscale/libswscale.so : ffmpeg;
+ ffmpeg/libpostproc/libpostproc.so : ffmpeg;
+ ffmpeg/libswresample/libswresample.so : ffmpeg;
+ endif
+-endif
+-
+-ifeq (@USE_STATIC_FFMPEG@,1)
+-ffmpeg/libavutil/libavutil.a : ffmpeg;
+-ffmpeg/libavcodec/libavcodec.a : ffmpeg;
+-ffmpeg/libavformat/libavformat.a : ffmpeg;
+-ffmpeg/libavfilter/libavfilter.a : ffmpeg;
+-ffmpeg/libswscale/libswscale.a : ffmpeg;
+-ffmpeg/libpostproc/libpostproc.a : ffmpeg;
+-ffmpeg/libswresample/libswresample.a : ffmpeg;
+-endif
+
+ ffmpeg:
+ $(MAKE) -C $@
+--
+1.8.5.3
+
diff --git a/multimedia/xbmc/patches/0003-makefile-include.patch b/multimedia/xbmc/patches/0003-makefile-include.patch
new file mode 100644
index 0000000000..d3687e640a
--- /dev/null
+++ b/multimedia/xbmc/patches/0003-makefile-include.patch
@@ -0,0 +1,14 @@
+--- a/Makefile.include.in 2014-03-16 15:34:08.479015885 -0500
++++ b/Makefile.include.in 2014-03-16 18:58:00.770693019 -0500
+@@ -58,6 +58,11 @@
+ @SDL_DEFINES@ \
+ @DEFS@ \
+
++ifeq (@USE_EXTERNAL_FFMPEG@,1)
++ DEFINES+=-DUSE_EXTERNAL_FFMPEG \
++
++endif
++
+ ifeq ($(findstring osx,$(ARCH)), osx)
+ INCLUDES+=-I@abs_top_srcdir@/xbmc/osx
+ endif
diff --git a/multimedia/xbmc/patches/samba-4.0.patch b/multimedia/xbmc/patches/samba-4.0.patch
deleted file mode 100644
index ea1dc7010e..0000000000
--- a/multimedia/xbmc/patches/samba-4.0.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -Naur xbmc-12.2.orig/xbmc/filesystem/SMBDirectory.cpp xbmc-12.2/xbmc/filesystem/SMBDirectory.cpp
---- xbmc-12.2.orig/xbmc/filesystem/SMBDirectory.cpp 2013-05-03 05:57:41.000000000 +0000
-+++ xbmc-12.2/xbmc/filesystem/SMBDirectory.cpp 2013-11-12 00:30:28.143499083 +0000
-@@ -44,7 +44,7 @@
- #include "threads/SingleLock.h"
- #include "PasswordManager.h"
-
--#include <libsmbclient.h>
-+#include <samba-4.0/libsmbclient.h>
-
- #if defined(TARGET_DARWIN)
- #define XBMC_SMB_MOUNT_PATH "Library/Application Support/XBMC/Mounts/"
-diff -Naur xbmc-12.2.orig/xbmc/filesystem/SmbFile.cpp xbmc-12.2/xbmc/filesystem/SmbFile.cpp
---- xbmc-12.2.orig/xbmc/filesystem/SmbFile.cpp 2013-05-03 05:57:41.000000000 +0000
-+++ xbmc-12.2/xbmc/filesystem/SmbFile.cpp 2013-11-12 00:30:59.577499442 +0000
-@@ -27,7 +27,7 @@
- #include "PasswordManager.h"
- #include "SMBDirectory.h"
- #include "Util.h"
--#include <libsmbclient.h>
-+#include <samba-4.0/libsmbclient.h>
- #include "settings/AdvancedSettings.h"
- #include "settings/GUISettings.h"
- #include "threads/SingleLock.h"
diff --git a/multimedia/xbmc/patches/xbmc-12.2-ffmpeg-2.0.patch b/multimedia/xbmc/patches/xbmc-12.2-ffmpeg-2.0.patch
deleted file mode 100644
index d5e70cd446..0000000000
--- a/multimedia/xbmc/patches/xbmc-12.2-ffmpeg-2.0.patch
+++ /dev/null
@@ -1,2102 +0,0 @@
-diff -urN xbmc-12.2-orig/lib/DllAvCodec.h xbmc-12.2-avcodec/lib/DllAvCodec.h
---- xbmc-12.2-orig/lib/DllAvCodec.h 2013-05-03 16:57:40.000000000 +1100
-+++ xbmc-12.2-avcodec/lib/DllAvCodec.h 2013-08-03 15:17:18.828959790 +1100
-@@ -72,8 +72,8 @@
- virtual void avcodec_register_all(void)=0;
- virtual void avcodec_flush_buffers(AVCodecContext *avctx)=0;
- virtual int avcodec_open2_dont_call(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options)=0;
-- virtual AVCodec *avcodec_find_decoder(enum CodecID id)=0;
-- virtual AVCodec *avcodec_find_encoder(enum CodecID id)=0;
-+ virtual AVCodec *avcodec_find_decoder(enum AVCodecID id)=0;
-+ virtual AVCodec *avcodec_find_encoder(enum AVCodecID id)=0;
- virtual int avcodec_close_dont_call(AVCodecContext *avctx)=0;
- virtual AVFrame *avcodec_alloc_frame(void)=0;
- virtual int avpicture_fill(AVPicture *picture, uint8_t *ptr, PixelFormat pix_fmt, int width, int height)=0;
-@@ -129,8 +129,8 @@
- }
- virtual int avcodec_open2_dont_call(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options) { *(volatile int *)0x0 = 0; return 0; }
- virtual int avcodec_close_dont_call(AVCodecContext *avctx) { *(volatile int *)0x0 = 0; return 0; }
-- virtual AVCodec *avcodec_find_decoder(enum CodecID id) { return ::avcodec_find_decoder(id); }
-- virtual AVCodec *avcodec_find_encoder(enum CodecID id) { return ::avcodec_find_encoder(id); }
-+ virtual AVCodec *avcodec_find_decoder(enum AVCodecID id) { return ::avcodec_find_decoder(id); }
-+ virtual AVCodec *avcodec_find_encoder(enum AVCodecID id) { return ::avcodec_find_encoder(id); }
- virtual int avcodec_close(AVCodecContext *avctx)
- {
- CSingleLock lock(DllAvCodec::m_critSection);
-@@ -203,8 +203,8 @@
- LOAD_SYMBOLS();
-
- DEFINE_METHOD0(void, avcodec_register_all_dont_call)
-- DEFINE_METHOD1(AVCodec*, avcodec_find_decoder, (enum CodecID p1))
-- DEFINE_METHOD1(AVCodec*, avcodec_find_encoder, (enum CodecID p1))
-+ DEFINE_METHOD1(AVCodec*, avcodec_find_decoder, (enum AVCodecID p1))
-+ DEFINE_METHOD1(AVCodec*, avcodec_find_encoder, (enum AVCodecID p1))
- DEFINE_METHOD1(int, avcodec_close_dont_call, (AVCodecContext *p1))
- DEFINE_METHOD0(AVFrame*, avcodec_alloc_frame)
- DEFINE_METHOD5(int, avpicture_fill, (AVPicture *p1, uint8_t *p2, PixelFormat p3, int p4, int p5))
-diff -urN xbmc-12.2-orig/xbmc/cdrip/EncoderFFmpeg.cpp xbmc-12.2-avcodec/xbmc/cdrip/EncoderFFmpeg.cpp
---- xbmc-12.2-orig/xbmc/cdrip/EncoderFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cdrip/EncoderFFmpeg.cpp 2013-08-03 15:17:18.828959790 +1100
-@@ -67,7 +67,7 @@
-
- AVCodec *codec;
- codec = m_dllAvCodec.avcodec_find_encoder(
-- strcmp(fmt->name, "ogg") == 0 ? CODEC_ID_VORBIS : fmt->audio_codec
-+ strcmp(fmt->name, "ogg") == 0 ? AV_CODEC_ID_VORBIS : fmt->audio_codec
- );
-
- if (!codec)
-diff -urN xbmc-12.2-orig/xbmc/cores/amlplayer/AMLPlayer.cpp xbmc-12.2-avcodec/xbmc/cores/amlplayer/AMLPlayer.cpp
---- xbmc-12.2-orig/xbmc/cores/amlplayer/AMLPlayer.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/amlplayer/AMLPlayer.cpp 2013-08-03 15:17:18.830959823 +1100
-@@ -387,16 +387,16 @@
-
- /* TODO: handle other subtitle codec types
- // subtitle codecs
-- CODEC_ID_DVD_SUBTITLE= 0x17000,
-- CODEC_ID_DVB_SUBTITLE,
-- CODEC_ID_TEXT, ///< raw UTF-8 text
-- CODEC_ID_XSUB,
-- CODEC_ID_SSA,
-- CODEC_ID_MOV_TEXT,
-- CODEC_ID_HDMV_PGS_SUBTITLE,
-- CODEC_ID_DVB_TELETEXT,
-- CODEC_ID_SRT,
-- CODEC_ID_MICRODVD,
-+ AV_CODEC_ID_DVD_SUBTITLE= 0x17000,
-+ AV_CODEC_ID_DVB_SUBTITLE,
-+ AV_CODEC_ID_TEXT, ///< raw UTF-8 text
-+ AV_CODEC_ID_XSUB,
-+ AV_CODEC_ID_SSA,
-+ AV_CODEC_ID_MOV_TEXT,
-+ AV_CODEC_ID_HDMV_PGS_SUBTITLE,
-+ AV_CODEC_ID_DVB_TELETEXT,
-+ AV_CODEC_ID_SRT,
-+ AV_CODEC_ID_MICRODVD,
- */
- switch(sub_type)
- {
-@@ -405,12 +405,12 @@
- "sub_type(0x%x), size(%d), bgntime(%lld), endtime(%lld), string(%s)",
- sub_type, sub_size-20, subtitle->bgntime, subtitle->endtime, &sub_buffer[20]);
- break;
-- case CODEC_ID_TEXT:
-+ case AV_CODEC_ID_TEXT:
- subtitle->bgntime = sub_pts/ 90;
- subtitle->endtime = subtitle->bgntime + 4000;
- subtitle->string = &sub_buffer[20];
- break;
-- case CODEC_ID_SSA:
-+ case AV_CODEC_ID_SSA:
- if (strncmp((const char*)&sub_buffer[20], "Dialogue:", 9) == 0)
- {
- int vars_found, hour1, min1, sec1, hunsec1, hour2, min2, sec2, hunsec2, nothing;
-diff -urN xbmc-12.2-orig/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp xbmc-12.2-avcodec/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp
---- xbmc-12.2-orig/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp 2013-08-03 15:17:18.829959807 +1100
-@@ -109,7 +109,7 @@
- if (dts && (!ac3 || g_advancedSettings.m_audioTranscodeTo.Equals("dts")))
- {
- m_CodecName = "DTS";
-- m_CodecID = CODEC_ID_DTS;
-+ m_CodecID = AV_CODEC_ID_DTS;
- m_PackFunc = &CAEPackIEC61937::PackDTS_1024;
- m_BitRate = DTS_ENCODE_BITRATE;
- codec = m_dllAvCodec.avcodec_find_encoder(m_CodecID);
-@@ -120,7 +120,7 @@
- if (!codec && ac3)
- {
- m_CodecName = "AC3";
-- m_CodecID = CODEC_ID_AC3;
-+ m_CodecID = AV_CODEC_ID_AC3;
- m_PackFunc = &CAEPackIEC61937::PackAC3;
- m_BitRate = AC3_ENCODE_BITRATE;
- codec = m_dllAvCodec.avcodec_find_encoder(m_CodecID);
-@@ -226,7 +226,7 @@
- return m_BitRate;
- }
-
--CodecID CAEEncoderFFmpeg::GetCodecID()
-+AVCodecID CAEEncoderFFmpeg::GetCodecID()
- {
- return m_CodecID;
- }
-diff -urN xbmc-12.2-orig/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h xbmc-12.2-avcodec/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h
---- xbmc-12.2-orig/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h 2013-08-03 15:17:18.829959807 +1100
-@@ -39,7 +39,7 @@
- virtual void Reset();
-
- virtual unsigned int GetBitRate ();
-- virtual CodecID GetCodecID ();
-+ virtual AVCodecID GetCodecID ();
- virtual unsigned int GetFrames ();
-
- virtual int Encode (float *data, unsigned int frames);
-@@ -51,7 +51,7 @@
- DllAvUtil m_dllAvUtil;
-
- std::string m_CodecName;
-- CodecID m_CodecID;
-+ AVCodecID m_CodecID;
- unsigned int m_BitRate;
- CAEPackIEC61937::PackFunc m_PackFunc;
-
-diff -urN xbmc-12.2-orig/xbmc/cores/AudioEngine/Interfaces/AEEncoder.h xbmc-12.2-avcodec/xbmc/cores/AudioEngine/Interfaces/AEEncoder.h
---- xbmc-12.2-orig/xbmc/cores/AudioEngine/Interfaces/AEEncoder.h 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/AudioEngine/Interfaces/AEEncoder.h 2013-08-03 15:17:18.829959807 +1100
-@@ -64,10 +64,10 @@
- virtual unsigned int GetBitRate() = 0;
-
- /**
-- * Returns the CodecID of the encoder
-+ * Returns the AVCodecID of the encoder
- * @return the ffmpeg codec id
- */
-- virtual CodecID GetCodecID() = 0;
-+ virtual AVCodecID GetCodecID() = 0;
-
- /**
- * Return the number of frames needed to encode
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDAudio.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDAudio.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDAudio.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDAudio.cpp 2013-08-03 15:17:18.830959823 +1100
-@@ -116,7 +116,7 @@
- free(m_pBuffer);
- }
-
--bool CDVDAudio::Create(const DVDAudioFrame &audioframe, CodecID codec, bool needresampler)
-+bool CDVDAudio::Create(const DVDAudioFrame &audioframe, AVCodecID codec, bool needresampler)
- {
- CLog::Log(LOGNOTICE,
- "Creating audio stream (codec id: %i, channels: %i, sample rate: %i, %s)",
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDAudio.h xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDAudio.h
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDAudio.h 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDAudio.h 2013-08-03 15:17:18.830959823 +1100
-@@ -80,7 +80,7 @@
- float GetCurrentAttenuation();
- void Pause();
- void Resume();
-- bool Create(const DVDAudioFrame &audioframe, CodecID codec, bool needresampler);
-+ bool Create(const DVDAudioFrame &audioframe, AVCodecID codec, bool needresampler);
- bool IsValidFormat(const DVDAudioFrame &audioframe);
- void Destroy();
- DWORD AddPackets(const DVDAudioFrame &audioframe);
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.cpp 2013-08-03 15:17:18.831959839 +1100
-@@ -23,7 +23,7 @@
-
- CDVDAudioCodecLPcm::CDVDAudioCodecLPcm() : CDVDAudioCodecPcm()
- {
-- m_codecID = CODEC_ID_NONE;
-+ m_codecID = AV_CODEC_ID_NONE;
- m_bufferSize = LPCM_BUFFER_SIZE;
- memset(m_buffer, 0, sizeof(m_buffer));
- }
-@@ -33,11 +33,11 @@
- m_codecID = hints.codec;
-
- CDVDStreamInfo hints2(hints, true);
-- hints2.codec = CODEC_ID_NONE;
-+ hints2.codec = AV_CODEC_ID_NONE;
- #if 0
-- if (hints.codecID = CODEC_ID_LPCM_S24BE) hints2.codec = CODEC_ID_PCM_S24BE;
-+ if (hints.codecID = AV_CODEC_ID_LPCM_S24BE) hints2.codec = AV_CODEC_ID_PCM_S24BE;
- #endif
-- if (hints2.codec != CODEC_ID_NONE)
-+ if (hints2.codec != AV_CODEC_ID_NONE)
- return CDVDAudioCodecPcm::Open(hints2, options);
-
- return false;
-@@ -54,7 +54,7 @@
- if (iSize >= 12)
- {
- #if 0
-- if (m_codecID == CODEC_ID_LPCM_S24BE)
-+ if (m_codecID == AV_CODEC_ID_LPCM_S24BE)
- #endif
- {
- for (iDecoded = 0; iDecoded <= (iSize - 12); iDecoded += 12)
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.h xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.h
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.h 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.h 2013-08-03 15:17:18.831959839 +1100
-@@ -40,5 +40,5 @@
- int m_bufferSize;
- BYTE m_buffer[LPCM_BUFFER_SIZE];
-
-- CodecID m_codecID;
-+ AVCodecID m_codecID;
- };
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp 2013-08-03 15:17:18.831959839 +1100
-@@ -67,12 +67,12 @@
- m_bufferSize = 0;
-
- if (
-- (hints.codec == CODEC_ID_AC3 && bSupportsAC3Out) ||
-- (hints.codec == CODEC_ID_DTS && bSupportsDTSOut) ||
-+ (hints.codec == AV_CODEC_ID_AC3 && bSupportsAC3Out) ||
-+ (hints.codec == AV_CODEC_ID_DTS && bSupportsDTSOut) ||
- (audioMode == AUDIO_HDMI &&
- (
-- (hints.codec == CODEC_ID_EAC3 && bSupportsAC3Out ) ||
-- (hints.codec == CODEC_ID_TRUEHD && bSupportsTrueHDOut)
-+ (hints.codec == AV_CODEC_ID_EAC3 && bSupportsAC3Out ) ||
-+ (hints.codec == AV_CODEC_ID_TRUEHD && bSupportsTrueHDOut)
- )
- )
- )
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.cpp 2013-08-03 15:17:18.832959856 +1100
-@@ -139,7 +139,7 @@
-
- /* set the stream's parameters */
- m_SampleRate = hints.samplerate;
-- if(!m_SampleRate && hints.codec == CODEC_ID_AC3)
-+ if(!m_SampleRate && hints.codec == AV_CODEC_ID_AC3)
- m_SampleRate = 48000;
-
- AVCodecContext *codec = muxer.m_pStream->codec;
-@@ -277,9 +277,9 @@
- {
- m_pSyncFrame = NULL;
-
-- if (m_bSupportsAC3Out && hints.codec == CODEC_ID_AC3) m_pSyncFrame = &CDVDAudioCodecPassthroughFFmpeg::SyncAC3;
-- else if (m_bSupportsDTSOut && hints.codec == CODEC_ID_DTS) m_pSyncFrame = &CDVDAudioCodecPassthroughFFmpeg::SyncDTS;
-- else if (m_bSupportsAACOut && hints.codec == CODEC_ID_AAC) m_pSyncFrame = &CDVDAudioCodecPassthroughFFmpeg::SyncAAC;
-+ if (m_bSupportsAC3Out && hints.codec == AV_CODEC_ID_AC3) m_pSyncFrame = &CDVDAudioCodecPassthroughFFmpeg::SyncAC3;
-+ else if (m_bSupportsDTSOut && hints.codec == AV_CODEC_ID_DTS) m_pSyncFrame = &CDVDAudioCodecPassthroughFFmpeg::SyncDTS;
-+ else if (m_bSupportsAACOut && hints.codec == AV_CODEC_ID_AAC) m_pSyncFrame = &CDVDAudioCodecPassthroughFFmpeg::SyncAAC;
- else return false;
-
- return true;
-@@ -328,7 +328,7 @@
- else
- {
- /* aac needs to be wrapped into ADTS frames */
-- if (hints.codec == CODEC_ID_AAC)
-+ if (hints.codec == AV_CODEC_ID_AAC)
- if (!SetupMuxer(hints, "adts", m_ADTS))
- {
- CLog::Log(LOGERROR, "CDVDAudioCodecPassthroughFFmpeg::Open - Unable to setup ADTS muxer");
-@@ -481,8 +481,8 @@
- {
- switch(m_codec)
- {
-- case CODEC_ID_AC3: return AE_FMT_AC3;
-- case CODEC_ID_DTS: return AE_FMT_DTS;
-+ case AV_CODEC_ID_AC3: return AE_FMT_AC3;
-+ case AV_CODEC_ID_DTS: return AE_FMT_DTS;
- default:
- return AE_FMT_INVALID; //Unknown stream type
- }
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.h xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.h
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.h 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.h 2013-08-03 15:17:18.832959856 +1100
-@@ -94,7 +94,7 @@
- unsigned int m_Needed;
- bool m_LostSync;
- int m_SampleRate;
-- CodecID m_codec;
-+ AVCodecID m_codec;
-
- unsigned int (CDVDAudioCodecPassthroughFFmpeg::*m_pSyncFrame)(BYTE* pData, unsigned int iSize, unsigned int *fSize);
- unsigned int SyncAC3(BYTE* pData, unsigned int iSize, unsigned int *fSize);
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.cpp 2013-08-03 15:17:18.832959856 +1100
-@@ -113,7 +113,7 @@
- m_iSourceSampleRate = 0;
- m_iSourceBitrate = 0;
- m_decodedDataSize = 0;
-- m_codecID = CODEC_ID_NONE;
-+ m_codecID = AV_CODEC_ID_NONE;
- m_iOutputChannels = 0;
-
- memset(m_decodedData, 0, sizeof(m_decodedData));
-@@ -136,12 +136,12 @@
-
- switch (m_codecID)
- {
-- case CODEC_ID_PCM_ALAW:
-+ case AV_CODEC_ID_PCM_ALAW:
- {
- for (int i = 0; i < 256; i++) table[i] = alaw2linear(i);
- break;
- }
-- case CODEC_ID_PCM_MULAW:
-+ case AV_CODEC_ID_PCM_MULAW:
- {
- for (int i = 0; i < 256; i++) table[i] = ulaw2linear(i);
- break;
-@@ -177,31 +177,31 @@
-
- switch (m_codecID)
- {
-- case CODEC_ID_PCM_S32LE:
-+ case AV_CODEC_ID_PCM_S32LE:
- decode_to16(4, 1, 0, &src, &samples, buf_size);
- break;
-- case CODEC_ID_PCM_S32BE:
-+ case AV_CODEC_ID_PCM_S32BE:
- decode_to16(4, 0, 0, &src, &samples, buf_size);
- break;
-- case CODEC_ID_PCM_U32LE:
-+ case AV_CODEC_ID_PCM_U32LE:
- decode_to16(4, 1, 1, &src, &samples, buf_size);
- break;
-- case CODEC_ID_PCM_U32BE:
-+ case AV_CODEC_ID_PCM_U32BE:
- decode_to16(4, 0, 1, &src, &samples, buf_size);
- break;
-- case CODEC_ID_PCM_S24LE:
-+ case AV_CODEC_ID_PCM_S24LE:
- decode_to16(3, 1, 0, &src, &samples, buf_size);
- break;
-- case CODEC_ID_PCM_S24BE:
-+ case AV_CODEC_ID_PCM_S24BE:
- decode_to16(3, 0, 0, &src, &samples, buf_size);
- break;
-- case CODEC_ID_PCM_U24LE:
-+ case AV_CODEC_ID_PCM_U24LE:
- decode_to16(3, 1, 1, &src, &samples, buf_size);
- break;
-- case CODEC_ID_PCM_U24BE:
-+ case AV_CODEC_ID_PCM_U24BE:
- decode_to16(3, 0, 1, &src, &samples, buf_size);
- break;
-- case CODEC_ID_PCM_S24DAUD:
-+ case AV_CODEC_ID_PCM_S24DAUD:
- n = buf_size / 3;
- for(;n>0;n--) {
- uint32_t v = src[0] << 16 | src[1] << 8 | src[2];
-@@ -211,50 +211,50 @@
- src += 3;
- }
- break;
-- case CODEC_ID_PCM_S16LE:
-+ case AV_CODEC_ID_PCM_S16LE:
- n = buf_size >> 1;
- for(;n>0;n--) {
- *samples++ = src[0] | (src[1] << 8);
- src += 2;
- }
- break;
-- case CODEC_ID_PCM_S16BE:
-+ case AV_CODEC_ID_PCM_S16BE:
- n = buf_size >> 1;
- for(;n>0;n--) {
- *samples++ = (src[0] << 8) | src[1];
- src += 2;
- }
- break;
-- case CODEC_ID_PCM_U16LE:
-+ case AV_CODEC_ID_PCM_U16LE:
- n = buf_size >> 1;
- for(;n>0;n--) {
- *samples++ = (src[0] | (src[1] << 8)) - 0x8000;
- src += 2;
- }
- break;
-- case CODEC_ID_PCM_U16BE:
-+ case AV_CODEC_ID_PCM_U16BE:
- n = buf_size >> 1;
- for(;n>0;n--) {
- *samples++ = ((src[0] << 8) | src[1]) - 0x8000;
- src += 2;
- }
- break;
-- case CODEC_ID_PCM_S8:
-+ case AV_CODEC_ID_PCM_S8:
- n = buf_size;
- for(;n>0;n--) {
- *samples++ = src[0] << 8;
- src++;
- }
- break;
-- case CODEC_ID_PCM_U8:
-+ case AV_CODEC_ID_PCM_U8:
- n = buf_size;
- for(;n>0;n--) {
- *samples++ = ((int)src[0] - 128) << 8;
- src++;
- }
- break;
-- case CODEC_ID_PCM_ALAW:
-- case CODEC_ID_PCM_MULAW:
-+ case AV_CODEC_ID_PCM_ALAW:
-+ case AV_CODEC_ID_PCM_MULAW:
- n = buf_size;
- for(;n>0;n--) {
- *samples++ = table[src[0]];
-@@ -281,7 +281,7 @@
- m_iSourceSampleRate = 0;
- m_iSourceBitrate = 0;
- m_decodedDataSize = 0;
-- m_codecID = CODEC_ID_NONE;
-+ m_codecID = AV_CODEC_ID_NONE;
- }
-
- void CDVDAudioCodecPcm::Reset()
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.h xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.h
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.h 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.h 2013-08-03 15:17:18.832959856 +1100
-@@ -44,7 +44,7 @@
- short m_decodedData[131072]; // could be a bit to big
- int m_decodedDataSize;
-
-- CodecID m_codecID;
-+ AVCodecID m_codecID;
- int m_iSourceSampleRate;
- int m_iSourceChannels;
- int m_iSourceBitrate;
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp 2013-08-03 15:21:00.992633897 +1100
-@@ -173,7 +173,7 @@
- CLog::Log(LOGDEBUG, "CDVDFactoryCodec: compiled in hardware support: %s", hwSupport.c_str());
-
- // dvd's have weird still-frames in it, which is not fully supported in ffmpeg
-- if(hint.stills && (hint.codec == CODEC_ID_MPEG2VIDEO || hint.codec == CODEC_ID_MPEG1VIDEO))
-+ if(hint.stills && (hint.codec == AV_CODEC_ID_MPEG2VIDEO || hint.codec == AV_CODEC_ID_MPEG1VIDEO))
- {
- if( (pCodec = OpenCodec(new CDVDVideoCodecLibMpeg2(), hint, options)) ) return pCodec;
- }
-@@ -182,7 +182,7 @@
- {
- if (g_sysinfo.HasVDADecoder())
- {
-- if (hint.codec == CODEC_ID_H264 && !hint.ptsinvalid)
-+ if (hint.codec == AV_CODEC_ID_H264 && !hint.ptsinvalid)
- {
- if ( (pCodec = OpenCodec(new CDVDVideoCodecVDA(), hint, options)) ) return pCodec;
- }
-@@ -197,8 +197,8 @@
- {
- switch(hint.codec)
- {
-- case CODEC_ID_H264:
-- if (hint.codec == CODEC_ID_H264 && hint.ptsinvalid)
-+ case AV_CODEC_ID_H264:
-+ if (hint.codec == AV_CODEC_ID_H264 && hint.ptsinvalid)
- break;
- if ( (pCodec = OpenCodec(new CDVDVideoCodecVideoToolBox(), hint, options)) ) return pCodec;
- break;
-@@ -216,13 +216,13 @@
- {
- switch(hint.codec)
- {
-- case CODEC_ID_VC1:
-- case CODEC_ID_WMV3:
-- case CODEC_ID_H264:
-- case CODEC_ID_MPEG2VIDEO:
-- if (hint.codec == CODEC_ID_H264 && hint.ptsinvalid)
-+ case AV_CODEC_ID_VC1:
-+ case AV_CODEC_ID_WMV3:
-+ case AV_CODEC_ID_H264:
-+ case AV_CODEC_ID_MPEG2VIDEO:
-+ if (hint.codec == AV_CODEC_ID_H264 && hint.ptsinvalid)
- break;
-- if (hint.codec == CODEC_ID_MPEG2VIDEO && hint.width <= 720)
-+ if (hint.codec == AV_CODEC_ID_MPEG2VIDEO && hint.width <= 720)
- break;
- if ( (pCodec = OpenCodec(new CDVDVideoCodecCrystalHD(), hint, options)) ) return pCodec;
- break;
-@@ -236,7 +236,7 @@
- #if defined(HAVE_LIBOPENMAX)
- if (g_guiSettings.GetBool("videoplayer.useomx") && !hint.software )
- {
-- if (hint.codec == CODEC_ID_H264 || hint.codec == CODEC_ID_MPEG2VIDEO || hint.codec == CODEC_ID_VC1)
-+ if (hint.codec == AV_CODEC_ID_H264 || hint.codec == AV_CODEC_ID_MPEG2VIDEO || hint.codec == AV_CODEC_ID_VC1)
- {
- if ( (pCodec = OpenCodec(new CDVDVideoCodecOpenMax(), hint, options)) ) return pCodec;
- }
-@@ -271,8 +271,8 @@
- #if defined(TARGET_DARWIN_OSX) || defined(TARGET_DARWIN_IOS)
- switch(hint.codec)
- {
-- case CODEC_ID_AC3:
-- case CODEC_ID_DTS:
-+ case AV_CODEC_ID_AC3:
-+ case AV_CODEC_ID_DTS:
- pCodec = OpenCodec( new CDVDAudioCodecPassthroughFFmpeg(), hint, options );
- if( pCodec ) return pCodec;
- break;
-@@ -286,39 +286,39 @@
-
- switch (hint.codec)
- {
-- case CODEC_ID_MP2:
-- case CODEC_ID_MP3:
-+ case AV_CODEC_ID_MP2:
-+ case AV_CODEC_ID_MP3:
- {
- pCodec = OpenCodec( new CDVDAudioCodecLibMad(), hint, options );
- if( pCodec ) return pCodec;
- break;
- }
-- case CODEC_ID_PCM_S32LE:
-- case CODEC_ID_PCM_S32BE:
-- case CODEC_ID_PCM_U32LE:
-- case CODEC_ID_PCM_U32BE:
-- case CODEC_ID_PCM_S24LE:
-- case CODEC_ID_PCM_S24BE:
-- case CODEC_ID_PCM_U24LE:
-- case CODEC_ID_PCM_U24BE:
-- case CODEC_ID_PCM_S24DAUD:
-- case CODEC_ID_PCM_S16LE:
-- case CODEC_ID_PCM_S16BE:
-- case CODEC_ID_PCM_U16LE:
-- case CODEC_ID_PCM_U16BE:
-- case CODEC_ID_PCM_S8:
-- case CODEC_ID_PCM_U8:
-- case CODEC_ID_PCM_ALAW:
-- case CODEC_ID_PCM_MULAW:
-+ case AV_CODEC_ID_PCM_S32LE:
-+ case AV_CODEC_ID_PCM_S32BE:
-+ case AV_CODEC_ID_PCM_U32LE:
-+ case AV_CODEC_ID_PCM_U32BE:
-+ case AV_CODEC_ID_PCM_S24LE:
-+ case AV_CODEC_ID_PCM_S24BE:
-+ case AV_CODEC_ID_PCM_U24LE:
-+ case AV_CODEC_ID_PCM_U24BE:
-+ case AV_CODEC_ID_PCM_S24DAUD:
-+ case AV_CODEC_ID_PCM_S16LE:
-+ case AV_CODEC_ID_PCM_S16BE:
-+ case AV_CODEC_ID_PCM_U16LE:
-+ case AV_CODEC_ID_PCM_U16BE:
-+ case AV_CODEC_ID_PCM_S8:
-+ case AV_CODEC_ID_PCM_U8:
-+ case AV_CODEC_ID_PCM_ALAW:
-+ case AV_CODEC_ID_PCM_MULAW:
- {
- pCodec = OpenCodec( new CDVDAudioCodecPcm(), hint, options );
- if( pCodec ) return pCodec;
- break;
- }
- #if 0
-- //case CODEC_ID_LPCM_S16BE:
-- //case CODEC_ID_LPCM_S20BE:
-- case CODEC_ID_LPCM_S24BE:
-+ //case AV_CODEC_ID_LPCM_S16BE:
-+ //case AV_CODEC_ID_LPCM_S20BE:
-+ case AV_CODEC_ID_LPCM_S24BE:
- {
- pCodec = OpenCodec( new CDVDAudioCodecLPcm(), hint, options );
- if( pCodec ) return pCodec;
-@@ -345,12 +345,12 @@
-
- switch (hint.codec)
- {
-- case CODEC_ID_TEXT:
-+ case AV_CODEC_ID_TEXT:
- pCodec = OpenCodec(new CDVDOverlayCodecText(), hint, options);
- if( pCodec ) return pCodec;
- break;
-
-- case CODEC_ID_SSA:
-+ case AV_CODEC_ID_SSA:
- pCodec = OpenCodec(new CDVDOverlayCodecSSA(), hint, options);
- if( pCodec ) return pCodec;
-
-@@ -358,7 +358,7 @@
- if( pCodec ) return pCodec;
- break;
-
-- case CODEC_ID_MOV_TEXT:
-+ case AV_CODEC_ID_MOV_TEXT:
- pCodec = OpenCodec(new CDVDOverlayCodecTX3G(), hint, options);
- if( pCodec ) return pCodec;
- break;
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp 2013-08-03 15:17:18.833959872 +1100
-@@ -182,7 +182,7 @@
-
- double pts_offset = 0.0;
-
-- if (m_pCodecContext->codec_id == CODEC_ID_HDMV_PGS_SUBTITLE && m_Subtitle.format == 0)
-+ if (m_pCodecContext->codec_id == AV_CODEC_ID_HDMV_PGS_SUBTITLE && m_Subtitle.format == 0)
- {
- // for pgs subtitles the packet pts of the end_segments are wrong
- // instead use the subtitle pts to calc the offset here
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecSSA.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecSSA.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecSSA.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecSSA.cpp 2013-08-03 15:17:18.834959888 +1100
-@@ -44,7 +44,7 @@
-
- bool CDVDOverlayCodecSSA::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
- {
-- if(hints.codec != CODEC_ID_SSA)
-+ if(hints.codec != AV_CODEC_ID_SSA)
- return false;
-
- Dispose();
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecText.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecText.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecText.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecText.cpp 2013-08-03 15:17:18.834959888 +1100
-@@ -41,8 +41,8 @@
-
- bool CDVDOverlayCodecText::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
- {
-- m_bIsSSA = (hints.codec == CODEC_ID_SSA);
-- if(hints.codec == CODEC_ID_TEXT || hints.codec == CODEC_ID_SSA)
-+ m_bIsSSA = (hints.codec == AV_CODEC_ID_SSA);
-+ if(hints.codec == AV_CODEC_ID_TEXT || hints.codec == AV_CODEC_ID_SSA)
- return true;
- return false;
- }
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecTX3G.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecTX3G.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecTX3G.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecTX3G.cpp 2013-08-03 15:17:18.834959888 +1100
-@@ -75,7 +75,7 @@
-
- bool CDVDOverlayCodecTX3G::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
- {
-- if (hints.codec == CODEC_ID_MOV_TEXT)
-+ if (hints.codec == AV_CODEC_ID_MOV_TEXT)
- return true;
- return false;
- }
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecCrystalHD.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecCrystalHD.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecCrystalHD.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecCrystalHD.cpp 2013-08-03 15:17:37.594265411 +1100
-@@ -55,11 +55,11 @@
- {
- switch (hints.codec)
- {
-- case CODEC_ID_MPEG2VIDEO:
-+ case AV_CODEC_ID_MPEG2VIDEO:
- m_CodecType = CRYSTALHD_CODEC_ID_MPEG2;
- m_pFormatName = "chd-mpeg2";
- break;
-- case CODEC_ID_H264:
-+ case AV_CODEC_ID_H264:
- switch(hints.profile)
- {
- case FF_PROFILE_H264_HIGH_10:
-@@ -86,11 +86,11 @@
-
- m_pFormatName = "chd-h264";
- break;
-- case CODEC_ID_VC1:
-+ case AV_CODEC_ID_VC1:
- m_CodecType = CRYSTALHD_CODEC_ID_VC1;
- m_pFormatName = "chd-vc1";
- break;
-- case CODEC_ID_WMV3:
-+ case AV_CODEC_ID_WMV3:
- m_CodecType = CRYSTALHD_CODEC_ID_WMV3;
- m_pFormatName = "chd-wmv3";
- break;
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2013-08-03 15:24:40.439297445 +1100
-@@ -103,7 +103,7 @@
- #ifdef HAVE_LIBVA
- // mpeg4 vaapi decoding is disabled
- if(*cur == PIX_FMT_VAAPI_VLD && g_guiSettings.GetBool("videoplayer.usevaapi")
-- && (avctx->codec_id != CODEC_ID_MPEG4 || g_advancedSettings.m_videoAllowMpeg4VAAPI))
-+ && (avctx->codec_id != AV_CODEC_ID_MPEG4 || g_advancedSettings.m_videoAllowMpeg4VAAPI))
- {
- VAAPI::CDecoder* dec = new VAAPI::CDecoder();
- if(dec->Open(avctx, *cur))
-@@ -176,7 +176,7 @@
- pCodec = NULL;
- m_pCodecContext = NULL;
-
-- if (hints.codec == CODEC_ID_H264)
-+ if (hints.codec == AV_CODEC_ID_H264)
- {
- switch(hints.profile)
- {
-@@ -200,7 +200,7 @@
- if(pCodec->id == hints.codec
- && pCodec->capabilities & CODEC_CAP_HWACCEL_VDPAU)
- {
-- if ((pCodec->id == CODEC_ID_MPEG4) && !g_advancedSettings.m_videoAllowMpeg4VDPAU)
-+ if ((pCodec->id == AV_CODEC_ID_MPEG4) && !g_advancedSettings.m_videoAllowMpeg4VDPAU)
- continue;
-
- CLog::Log(LOGNOTICE,"CDVDVideoCodecFFmpeg::Open() Creating VDPAU(%ix%i, %d)",hints.width, hints.height, hints.codec);
-@@ -214,7 +214,7 @@
- if(vdp->Open(m_pCodecContext, pCodec->pix_fmts ? pCodec->pix_fmts[0] : PIX_FMT_NONE))
- {
- m_pHardware = vdp;
-- m_pCodecContext->codec_id = CODEC_ID_NONE; // ffmpeg will complain if this has been set
-+ m_pCodecContext->codec_id = AV_CODEC_ID_NONE; // ffmpeg will complain if this has been set
- break;
- }
- m_dllAvUtil.av_freep(&m_pCodecContext);
-@@ -254,8 +254,8 @@
- // ffmpeg with enabled neon will crash and burn if this is enabled
- m_pCodecContext->flags &= CODEC_FLAG_EMU_EDGE;
- #else
-- if (pCodec->id != CODEC_ID_H264 && pCodec->capabilities & CODEC_CAP_DR1
-- && pCodec->id != CODEC_ID_VP8
-+ if (pCodec->id != AV_CODEC_ID_H264 && pCodec->capabilities & CODEC_CAP_DR1
-+ && pCodec->id != AV_CODEC_ID_VP8
- )
- m_pCodecContext->flags |= CODEC_FLAG_EMU_EDGE;
- #endif
-@@ -293,8 +293,8 @@
-
- int num_threads = std::min(8 /*MAX_THREADS*/, g_cpuInfo.getCPUCount());
- if( num_threads > 1 && !hints.software && m_pHardware == NULL // thumbnail extraction fails when run threaded
-- && ( pCodec->id == CODEC_ID_H264
-- || pCodec->id == CODEC_ID_MPEG4 ))
-+ && ( pCodec->id == AV_CODEC_ID_H264
-+ || pCodec->id == AV_CODEC_ID_MPEG4 ))
- m_pCodecContext->thread_count = num_threads;
-
- if (m_dllAvCodec.avcodec_open2(m_pCodecContext, pCodec, NULL) < 0)
-@@ -492,8 +492,8 @@
- m_iLastKeyframe = 300;
-
- /* h264 doesn't always have keyframes + won't output before first keyframe anyway */
-- if(m_pCodecContext->codec_id == CODEC_ID_H264
-- || m_pCodecContext->codec_id == CODEC_ID_SVQ3)
-+ if(m_pCodecContext->codec_id == AV_CODEC_ID_H264
-+ || m_pCodecContext->codec_id == AV_CODEC_ID_SVQ3)
- m_started = true;
-
- if(m_pHardware == NULL)
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecOpenMax.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecOpenMax.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecOpenMax.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecOpenMax.cpp 2013-08-03 15:17:37.595265431 +1100
-@@ -58,7 +58,7 @@
-
- switch (hints.codec)
- {
-- case CODEC_ID_H264:
-+ case AV_CODEC_ID_H264:
- {
- m_pFormatName = "omx-h264";
- if (hints.extrasize < 7 || hints.extradata == NULL)
-@@ -72,13 +72,13 @@
- m_convert_bitstream = bitstream_convert_init(hints.extradata, hints.extrasize);
- }
- break;
-- case CODEC_ID_MPEG4:
-+ case AV_CODEC_ID_MPEG4:
- m_pFormatName = "omx-mpeg4";
- break;
-- case CODEC_ID_MPEG2VIDEO:
-+ case AV_CODEC_ID_MPEG2VIDEO:
- m_pFormatName = "omx-mpeg2";
- break;
-- case CODEC_ID_VC1:
-+ case AV_CODEC_ID_VC1:
- m_pFormatName = "omx-vc1";
- break;
- default:
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp 2013-08-03 15:24:54.727535919 +1100
-@@ -697,7 +697,7 @@
-
- switch (hints.codec)
- {
-- case CODEC_ID_H264:
-+ case AV_CODEC_ID_H264:
- // source must be H.264 with valid avcC atom data in extradata
- if (extrasize < 7 || extradata == NULL)
- {
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVideoToolBox.cpp 2013-08-03 15:17:37.597265487 +1100
-@@ -538,7 +538,7 @@
- esds->esid = 0;
- esds->stream_priority = 0; // 16 ? 0x1f
-
-- esds->objectTypeId = 32; // 32 = CODEC_ID_MPEG4, 33 = CODEC_ID_H264
-+ esds->objectTypeId = 32; // 32 = AV_CODEC_ID_MPEG4, 33 = AV_CODEC_ID_H264
- // the following fields is made of 6 bits to identify the streamtype (4 for video, 5 for audio)
- // plus 1 bit to indicate upstream and 1 bit set to 1 (reserved)
- esds->streamType = 0x11;
-@@ -1095,7 +1095,7 @@
-
- switch (hints.codec)
- {
-- case CODEC_ID_MPEG4:
-+ case AV_CODEC_ID_MPEG4:
- if (extrasize)
- {
- AVIOContext *pb;
-@@ -1127,12 +1127,12 @@
- m_pFormatName = "vtb-mpeg4";
- break;
-
-- case CODEC_ID_MPEG2VIDEO:
-+ case AV_CODEC_ID_MPEG2VIDEO:
- m_fmt_desc = CreateFormatDescription(kVTFormatMPEG2Video, width, height);
- m_pFormatName = "vtb-mpeg2";
- break;
-
-- case CODEC_ID_H264:
-+ case AV_CODEC_ID_H264:
- if (extrasize < 7 || extradata == NULL)
- {
- //m_fmt_desc = CreateFormatDescription(kVTFormatH264, width, height);
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp 2013-08-03 15:17:37.597265487 +1100
-@@ -95,19 +95,19 @@
-
- /* XXX Prefered modes must come first */
- static const dxva2_mode_t dxva2_modes[] = {
-- { "MPEG2 VLD", &DXVA2_ModeMPEG2_VLD, CODEC_ID_MPEG2VIDEO },
-- { "MPEG1/2 VLD", &DXVA_ModeMPEG2and1_VLD, CODEC_ID_MPEG2VIDEO },
-+ { "MPEG2 VLD", &DXVA2_ModeMPEG2_VLD, AV_CODEC_ID_MPEG2VIDEO },
-+ { "MPEG1/2 VLD", &DXVA_ModeMPEG2and1_VLD, AV_CODEC_ID_MPEG2VIDEO },
- { "MPEG2 MoComp", &DXVA2_ModeMPEG2_MoComp, 0 },
- { "MPEG2 IDCT", &DXVA2_ModeMPEG2_IDCT, 0 },
-
- // Intel drivers return standard modes in addition to the Intel specific ones. Try the Intel specific first, they work better for Sandy Bridges.
-- { "Intel H.264 VLD, no FGT", &DXVADDI_Intel_ModeH264_E, CODEC_ID_H264 },
-+ { "Intel H.264 VLD, no FGT", &DXVADDI_Intel_ModeH264_E, AV_CODEC_ID_H264 },
- { "Intel H.264 inverse discrete cosine transform (IDCT), no FGT", &DXVADDI_Intel_ModeH264_C, 0 },
- { "Intel H.264 motion compensation (MoComp), no FGT", &DXVADDI_Intel_ModeH264_A, 0 },
- { "Intel VC-1 VLD", &DXVADDI_Intel_ModeVC1_E, 0 },
-
-- { "H.264 variable-length decoder (VLD), FGT", &DXVA2_ModeH264_F, CODEC_ID_H264 },
-- { "H.264 VLD, no FGT", &DXVA2_ModeH264_E, CODEC_ID_H264 },
-+ { "H.264 variable-length decoder (VLD), FGT", &DXVA2_ModeH264_F, AV_CODEC_ID_H264 },
-+ { "H.264 VLD, no FGT", &DXVA2_ModeH264_E, AV_CODEC_ID_H264 },
- { "H.264 IDCT, FGT", &DXVA2_ModeH264_D, 0, },
- { "H.264 inverse discrete cosine transform (IDCT), no FGT", &DXVA2_ModeH264_C, 0, },
- { "H.264 MoComp, FGT", &DXVA2_ModeH264_B, 0, },
-@@ -120,10 +120,10 @@
- { "Windows Media Video 9 MoComp", &DXVA2_ModeWMV9_B, 0 },
- { "Windows Media Video 9 post processing", &DXVA2_ModeWMV9_A, 0 },
-
-- { "VC-1 VLD", &DXVA2_ModeVC1_D, CODEC_ID_VC1 },
-- { "VC-1 VLD", &DXVA2_ModeVC1_D, CODEC_ID_WMV3 },
-- { "VC-1 VLD 2010", &DXVA_ModeVC1_D2010, CODEC_ID_VC1 },
-- { "VC-1 VLD 2010", &DXVA_ModeVC1_D2010, CODEC_ID_WMV3 },
-+ { "VC-1 VLD", &DXVA2_ModeVC1_D, AV_CODEC_ID_VC1 },
-+ { "VC-1 VLD", &DXVA2_ModeVC1_D, AV_CODEC_ID_WMV3 },
-+ { "VC-1 VLD 2010", &DXVA_ModeVC1_D2010, AV_CODEC_ID_VC1 },
-+ { "VC-1 VLD 2010", &DXVA_ModeVC1_D2010, AV_CODEC_ID_WMV3 },
- { "VC-1 IDCT", &DXVA2_ModeVC1_C, 0 },
- { "VC-1 MoComp", &DXVA2_ModeVC1_B, 0 },
- { "VC-1 post processing", &DXVA2_ModeVC1_A, 0 },
-@@ -435,7 +435,7 @@
- static bool CheckCompatibility(AVCodecContext *avctx)
- {
- // The incompatibilities are all for H264
-- if(avctx->codec_id != CODEC_ID_H264)
-+ if(avctx->codec_id != AV_CODEC_ID_H264)
- return true;
-
- // Macroblock width incompatibility
-@@ -626,7 +626,7 @@
-
- if(m_refs == 0)
- {
-- if(avctx->codec_id == CODEC_ID_H264)
-+ if(avctx->codec_id == AV_CODEC_ID_H264)
- m_refs = 16;
- else
- m_refs = 2;
-@@ -771,9 +771,9 @@
- }
-
- // Status reports are available only for the DXVA2_ModeH264 and DXVA2_ModeVC1 modes
-- if(avctx->codec_id != CODEC_ID_H264
-- && avctx->codec_id != CODEC_ID_VC1
-- && avctx->codec_id != CODEC_ID_WMV3)
-+ if(avctx->codec_id != AV_CODEC_ID_H264
-+ && avctx->codec_id != AV_CODEC_ID_VC1
-+ && avctx->codec_id != AV_CODEC_ID_WMV3)
- return 0;
-
- DXVA2_DecodeExecuteParams params = {};
-@@ -786,7 +786,7 @@
- params.pExtensionData = &data;
- data.Function = DXVA_STATUS_REPORTING_FUNCTION;
- data.pPrivateOutputData = &status;
-- data.PrivateOutputDataSize = avctx->codec_id == CODEC_ID_H264 ? sizeof(DXVA_Status_H264) : sizeof(DXVA_Status_VC1);
-+ data.PrivateOutputDataSize = avctx->codec_id == AV_CODEC_ID_H264 ? sizeof(DXVA_Status_H264) : sizeof(DXVA_Status_VC1);
- HRESULT hr;
- if(FAILED( hr = m_decoder->Execute(&params)))
- {
-@@ -794,7 +794,7 @@
- return VC_ERROR;
- }
-
-- if(avctx->codec_id == CODEC_ID_H264)
-+ if(avctx->codec_id == AV_CODEC_ID_H264)
- {
- if(status.h264.bStatus)
- CLog::Log(LOGWARNING, "DXVA - decoder problem of status %d with %d", status.h264.bStatus, status.h264.bBufType);
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/OpenMaxVideo.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/OpenMaxVideo.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/OpenMaxVideo.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/OpenMaxVideo.cpp 2013-08-03 15:17:37.598265512 +1100
-@@ -115,7 +115,7 @@
-
- switch (hints.codec)
- {
-- case CODEC_ID_H264:
-+ case AV_CODEC_ID_H264:
- {
- switch(hints.profile)
- {
-@@ -140,7 +140,7 @@
- }
- }
- break;
-- case CODEC_ID_MPEG4:
-+ case AV_CODEC_ID_MPEG4:
- // (role name) video_decoder.mpeg4
- // MPEG-4, DivX 4/5 and Xvid compatible
- decoder_name = OMX_MPEG4_DECODER;
-@@ -154,12 +154,12 @@
- m_pFormatName = "omx-mpeg4";
- break;
- */
-- case CODEC_ID_MPEG2VIDEO:
-+ case AV_CODEC_ID_MPEG2VIDEO:
- // (role name) video_decoder.mpeg2
- // MPEG-2
- decoder_name = OMX_MPEG2V_DECODER;
- break;
-- case CODEC_ID_VC1:
-+ case AV_CODEC_ID_VC1:
- // (role name) video_decoder.vc1
- // VC-1, WMV9
- decoder_name = OMX_VC1_DECODER;
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp 2013-08-03 15:17:37.598265512 +1100
-@@ -268,14 +268,14 @@
-
- vector<VAProfile> accepted;
- switch (avctx->codec_id) {
-- case CODEC_ID_MPEG2VIDEO:
-+ case AV_CODEC_ID_MPEG2VIDEO:
- accepted.push_back(VAProfileMPEG2Main);
- break;
-- case CODEC_ID_MPEG4:
-- case CODEC_ID_H263:
-+ case AV_CODEC_ID_MPEG4:
-+ case AV_CODEC_ID_H263:
- accepted.push_back(VAProfileMPEG4AdvancedSimple);
- break;
-- case CODEC_ID_H264:
-+ case AV_CODEC_ID_H264:
- {
- #ifdef FF_PROFILE_H264_BASELINE
- if (avctx->profile == FF_PROFILE_H264_BASELINE)
-@@ -294,10 +294,10 @@
- }
- break;
- }
-- case CODEC_ID_WMV3:
-+ case AV_CODEC_ID_WMV3:
- accepted.push_back(VAProfileVC1Main);
- break;
-- case CODEC_ID_VC1:
-+ case AV_CODEC_ID_VC1:
- accepted.push_back(VAProfileVC1Advanced);
- break;
- default:
-@@ -383,7 +383,7 @@
- m_refs = avctx->refs;
- if(m_refs == 0)
- {
-- if(avctx->codec_id == CODEC_ID_H264)
-+ if(avctx->codec_id == AV_CODEC_ID_H264)
- m_refs = 16;
- else
- m_refs = 2;
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp 2013-08-03 15:25:15.336879885 +1100
-@@ -184,10 +184,10 @@
- SpewHardwareAvailable();
-
- VdpDecoderProfile profile = 0;
-- if(avctx->codec_id == CODEC_ID_H264)
-+ if(avctx->codec_id == AV_CODEC_ID_H264)
- profile = VDP_DECODER_PROFILE_H264_HIGH;
- #ifdef VDP_DECODER_PROFILE_MPEG4_PART2_ASP
-- else if(avctx->codec_id == CODEC_ID_MPEG4)
-+ else if(avctx->codec_id == AV_CODEC_ID_MPEG4)
- profile = VDP_DECODER_PROFILE_MPEG4_PART2_ASP;
- #endif
- if(profile)
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxBXA.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxBXA.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxBXA.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxBXA.cpp 2013-08-03 15:17:37.600265539 +1100
-@@ -90,7 +90,7 @@
- m_stream->iBitRate = m_header.sampleRate * m_header.channels * m_header.bitsPerSample;
- m_stream->iChannels = m_header.channels;
- m_stream->type = STREAM_AUDIO;
-- m_stream->codec = CODEC_ID_PCM_S16LE;
-+ m_stream->codec = AV_CODEC_ID_PCM_S16LE;
-
- return true;
- }
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.cpp 2013-08-03 15:21:18.031918421 +1100
-@@ -31,8 +31,8 @@
- {
- char sInfo[64];
-
-- if (codec == CODEC_ID_AC3) strcpy(sInfo, "AC3 ");
-- else if (codec == CODEC_ID_DTS)
-+ if (codec == AV_CODEC_ID_AC3) strcpy(sInfo, "AC3 ");
-+ else if (codec == AV_CODEC_ID_DTS)
- {
- #ifdef FF_PROFILE_DTS_HD_MA
- if (profile == FF_PROFILE_DTS_HD_MA)
-@@ -43,7 +43,7 @@
- #endif
- strcpy(sInfo, "DTS ");
- }
-- else if (codec == CODEC_ID_MP2) strcpy(sInfo, "MP2 ");
-+ else if (codec == AV_CODEC_ID_MP2) strcpy(sInfo, "MP2 ");
- else strcpy(sInfo, "");
-
- if (iChannels == 1) strcat(sInfo, "Mono");
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp 2013-08-03 15:23:36.700233526 +1100
-@@ -450,7 +450,7 @@
- if (iErr < 0)
- {
- CLog::Log(LOGWARNING,"could not find codec parameters for %s", strFile.c_str());
-- if (m_pInput->IsStreamType(DVDSTREAM_TYPE_DVD) || (m_pFormatContext->nb_streams == 1 && m_pFormatContext->streams[0]->codec->codec_id == CODEC_ID_AC3))
-+ if (m_pInput->IsStreamType(DVDSTREAM_TYPE_DVD) || (m_pFormatContext->nb_streams == 1 && m_pFormatContext->streams[0]->codec->codec_id == AV_CODEC_ID_AC3))
- {
- // special case, our codecs can still handle it.
- }
-@@ -715,7 +715,7 @@
- }
-
- // we need to get duration slightly different for matroska embedded text subtitels
-- if(m_bMatroska && stream->codec->codec_id == CODEC_ID_TEXT && pkt.convergence_duration != 0)
-+ if(m_bMatroska && stream->codec->codec_id == AV_CODEC_ID_TEXT && pkt.convergence_duration != 0)
- pkt.duration = pkt.convergence_duration;
-
- if(m_bAVI && stream->codec && stream->codec->codec_type == AVMEDIA_TYPE_VIDEO)
-@@ -967,7 +967,7 @@
- st->bVFR = false;
-
- // never trust pts in avi files with h264.
-- if (m_bAVI && pStream->codec->codec_id == CODEC_ID_H264)
-+ if (m_bAVI && pStream->codec->codec_id == AV_CODEC_ID_H264)
- st->bPTSInvalid = true;
-
- //average fps is more accurate for mkv files
-@@ -1008,15 +1008,15 @@
-
- if ( m_pInput->IsStreamType(DVDSTREAM_TYPE_DVD) )
- {
-- if (pStream->codec->codec_id == CODEC_ID_PROBE)
-+ if (pStream->codec->codec_id == AV_CODEC_ID_PROBE)
- {
-- // fix MPEG-1/MPEG-2 video stream probe returning CODEC_ID_PROBE for still frames.
-+ // fix MPEG-1/MPEG-2 video stream probe returning AV_CODEC_ID_PROBE for still frames.
- // ffmpeg issue 1871, regression from ffmpeg r22831.
- if ((pStream->id & 0xF0) == 0xE0)
- {
-- pStream->codec->codec_id = CODEC_ID_MPEG2VIDEO;
-+ pStream->codec->codec_id = AV_CODEC_ID_MPEG2VIDEO;
- pStream->codec->codec_tag = MKTAG('M','P','2','V');
-- CLog::Log(LOGERROR, "%s - CODEC_ID_PROBE detected, forcing CODEC_ID_MPEG2VIDEO", __FUNCTION__);
-+ CLog::Log(LOGERROR, "%s - AV_CODEC_ID_PROBE detected, forcing AV_CODEC_ID_MPEG2VIDEO", __FUNCTION__);
- }
- }
- }
-@@ -1053,9 +1053,9 @@
- }
- case AVMEDIA_TYPE_ATTACHMENT:
- { //mkv attachments. Only bothering with fonts for now.
-- if(pStream->codec->codec_id == CODEC_ID_TTF
-+ if(pStream->codec->codec_id == AV_CODEC_ID_TTF
- #if (!defined USE_EXTERNAL_FFMPEG)
-- || pStream->codec->codec_id == CODEC_ID_OTF
-+ || pStream->codec->codec_id == AV_CODEC_ID_OTF
- #endif
- )
- {
-@@ -1137,19 +1137,19 @@
- // id's reported from libdvdnav
- switch(m_streams[iId]->codec)
- {
-- case CODEC_ID_AC3:
-+ case AV_CODEC_ID_AC3:
- m_streams[iId]->iPhysicalId = pStream->id - 128;
- break;
-- case CODEC_ID_DTS:
-+ case AV_CODEC_ID_DTS:
- m_streams[iId]->iPhysicalId = pStream->id - 136;
- break;
-- case CODEC_ID_MP2:
-+ case AV_CODEC_ID_MP2:
- m_streams[iId]->iPhysicalId = pStream->id - 448;
- break;
-- case CODEC_ID_PCM_S16BE:
-+ case AV_CODEC_ID_PCM_S16BE:
- m_streams[iId]->iPhysicalId = pStream->id - 160;
- break;
-- case CODEC_ID_DVD_SUBTITLE:
-+ case AV_CODEC_ID_DVD_SUBTITLE:
- m_streams[iId]->iPhysicalId = pStream->id - 0x20;
- break;
- default:
-@@ -1300,7 +1300,7 @@
-
- #ifdef FF_PROFILE_DTS_HD_MA
- /* use profile to determine the DTS type */
-- if (stream->codec == CODEC_ID_DTS)
-+ if (stream->codec == AV_CODEC_ID_DTS)
- {
- if (stream->profile == FF_PROFILE_DTS_HD_MA)
- strName = "dtshd_ma";
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h 2013-08-03 15:22:13.480844244 +1100
-@@ -35,7 +35,7 @@
- #include "config.h"
- #endif
- #ifndef _LINUX
--enum CodecID;
-+enum AVCodecID;
- #include <libavcodec/avcodec.h>
- #else
- extern "C" {
-@@ -88,7 +88,7 @@
- {
- iId = 0;
- iPhysicalId = 0;
-- codec = (CodecID)0; // CODEC_ID_NONE
-+ codec = (AVCodecID)0; // AV_CODEC_ID_NONE
- codec_fourcc = 0;
- profile = FF_PROFILE_UNKNOWN;
- level = 0;
-@@ -118,7 +118,7 @@
-
- int iId; // most of the time starting from 0
- int iPhysicalId; // id
-- CodecID codec;
-+ AVCodecID codec;
- unsigned int codec_fourcc; // if available
- int profile; // encoder profile of the stream reported by the decoder. used to qualify hw decoders.
- int level; // encoder level of the stream reported by the decoder. used to qualify hw decoders.
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxHTSP.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxHTSP.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxHTSP.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxHTSP.cpp 2013-08-03 15:17:39.181291285 +1100
-@@ -290,39 +290,39 @@
-
- if(!strcmp(type, "AC3")) {
- st.a = new CDemuxStreamAudioHTSP(this, type);
-- st.a->codec = CODEC_ID_AC3;
-+ st.a->codec = AV_CODEC_ID_AC3;
- } else if(!strcmp(type, "EAC3")) {
- st.a = new CDemuxStreamAudioHTSP(this, type);
-- st.a->codec = CODEC_ID_EAC3;
-+ st.a->codec = AV_CODEC_ID_EAC3;
- } else if(!strcmp(type, "MPEG2AUDIO")) {
- st.a = new CDemuxStreamAudioHTSP(this, type);
-- st.a->codec = CODEC_ID_MP2;
-+ st.a->codec = AV_CODEC_ID_MP2;
- } else if(!strcmp(type, "AAC")) {
- st.a = new CDemuxStreamAudioHTSP(this, type);
-- st.a->codec = CODEC_ID_AAC;
-+ st.a->codec = AV_CODEC_ID_AAC;
- } else if(!strcmp(type, "MPEG2VIDEO")) {
- st.v = new CDemuxStreamVideoHTSP(this, type);
-- st.v->codec = CODEC_ID_MPEG2VIDEO;
-+ st.v->codec = AV_CODEC_ID_MPEG2VIDEO;
- st.v->iWidth = htsmsg_get_u32_or_default(sub, "width" , 0);
- st.v->iHeight = htsmsg_get_u32_or_default(sub, "height", 0);
- } else if(!strcmp(type, "H264")) {
- st.v = new CDemuxStreamVideoHTSP(this, type);
-- st.v->codec = CODEC_ID_H264;
-+ st.v->codec = AV_CODEC_ID_H264;
- st.v->iWidth = htsmsg_get_u32_or_default(sub, "width" , 0);
- st.v->iHeight = htsmsg_get_u32_or_default(sub, "height", 0);
- } else if(!strcmp(type, "DVBSUB")) {
- st.s = new CDemuxStreamSubtitle();
-- st.s->codec = CODEC_ID_DVB_SUBTITLE;
-+ st.s->codec = AV_CODEC_ID_DVB_SUBTITLE;
- uint32_t composition_id = 0, ancillary_id = 0;
- htsmsg_get_u32(sub, "composition_id", &composition_id);
- htsmsg_get_u32(sub, "ancillary_id" , &ancillary_id);
- st.s->identifier = (composition_id & 0xffff) | ((ancillary_id & 0xffff) << 16);
- } else if(!strcmp(type, "TEXTSUB")) {
- st.s = new CDemuxStreamSubtitle();
-- st.s->codec = CODEC_ID_TEXT;
-+ st.s->codec = AV_CODEC_ID_TEXT;
- } else if(!strcmp(type, "TELETEXT")) {
- st.t = new CDemuxStreamTeletext();
-- st.t->codec = CODEC_ID_DVB_TELETEXT;
-+ st.t->codec = AV_CODEC_ID_DVB_TELETEXT;
- } else {
- continue;
- }
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp 2013-08-03 15:17:39.181291285 +1100
-@@ -60,10 +60,10 @@
- {
- switch (codec)
- {
-- case CODEC_ID_MPEG2VIDEO:
-+ case AV_CODEC_ID_MPEG2VIDEO:
- strInfo = "mpeg2video";
- break;
-- case CODEC_ID_H264:
-+ case AV_CODEC_ID_H264:
- strInfo = "h264";
- break;
- default:
-@@ -75,19 +75,19 @@
- {
- switch (codec)
- {
-- case CODEC_ID_AC3:
-+ case AV_CODEC_ID_AC3:
- strInfo = "ac3";
- break;
-- case CODEC_ID_EAC3:
-+ case AV_CODEC_ID_EAC3:
- strInfo = "eac3";
- break;
-- case CODEC_ID_MP2:
-+ case AV_CODEC_ID_MP2:
- strInfo = "mpeg2audio";
- break;
-- case CODEC_ID_AAC:
-+ case AV_CODEC_ID_AAC:
- strInfo = "aac";
- break;
-- case CODEC_ID_DTS:
-+ case AV_CODEC_ID_DTS:
- strInfo = "dts";
- break;
- default:
-@@ -349,7 +349,7 @@
- {
- st = dynamic_cast<CDemuxStreamAudioPVRClient*>(stm);
- if (!st
-- || (st->codec != (CodecID)props.stream[i].iCodecId)
-+ || (st->codec != (AVCodecID)props.stream[i].iCodecId)
- || (st->iChannels != props.stream[i].iChannels))
- DisposeStream(i);
- }
-@@ -375,7 +375,7 @@
- {
- st = dynamic_cast<CDemuxStreamVideoPVRClient*>(stm);
- if (!st
-- || (st->codec != (CodecID)props.stream[i].iCodecId)
-+ || (st->codec != (AVCodecID)props.stream[i].iCodecId)
- || (st->iWidth != props.stream[i].iWidth)
- || (st->iHeight != props.stream[i].iHeight))
- DisposeStream(i);
-@@ -395,11 +395,11 @@
- m_streams[i] = st;
- st->m_parser_split = true;
- }
-- else if (props.stream[i].iCodecId == CODEC_ID_DVB_TELETEXT)
-+ else if (props.stream[i].iCodecId == AV_CODEC_ID_DVB_TELETEXT)
- {
- if (stm)
- {
-- if (stm->codec != (CodecID)props.stream[i].iCodecId)
-+ if (stm->codec != (AVCodecID)props.stream[i].iCodecId)
- DisposeStream(i);
- }
- if (!m_streams[i])
-@@ -411,7 +411,7 @@
- if (stm)
- {
- st = dynamic_cast<CDemuxStreamSubtitlePVRClient*>(stm);
-- if (!st || (st->codec != (CodecID)props.stream[i].iCodecId))
-+ if (!st || (st->codec != (AVCodecID)props.stream[i].iCodecId))
- DisposeStream(i);
- }
- if (!m_streams[i])
-@@ -428,7 +428,7 @@
- m_streams[i] = new CDemuxStream();
- }
-
-- m_streams[i]->codec = (CodecID)props.stream[i].iCodecId;
-+ m_streams[i]->codec = (AVCodecID)props.stream[i].iCodecId;
- m_streams[i]->iId = i;
- m_streams[i]->iPhysicalId = props.stream[i].iPhysicalId;
- m_streams[i]->language[0] = props.stream[i].strLanguage[0];
-@@ -475,19 +475,19 @@
- CDemuxStream *stream = GetStream(iStreamId);
- if (stream)
- {
-- if (stream->codec == CODEC_ID_AC3)
-+ if (stream->codec == AV_CODEC_ID_AC3)
- strName = "ac3";
-- else if (stream->codec == CODEC_ID_MP2)
-+ else if (stream->codec == AV_CODEC_ID_MP2)
- strName = "mp2";
-- else if (stream->codec == CODEC_ID_AAC)
-+ else if (stream->codec == AV_CODEC_ID_AAC)
- strName = "aac";
-- else if (stream->codec == CODEC_ID_DTS)
-+ else if (stream->codec == AV_CODEC_ID_DTS)
- strName = "dca";
-- else if (stream->codec == CODEC_ID_MPEG2VIDEO)
-+ else if (stream->codec == AV_CODEC_ID_MPEG2VIDEO)
- strName = "mpeg2video";
-- else if (stream->codec == CODEC_ID_H264)
-+ else if (stream->codec == AV_CODEC_ID_H264)
- strName = "h264";
-- else if (stream->codec == CODEC_ID_EAC3)
-+ else if (stream->codec == AV_CODEC_ID_EAC3)
- strName = "eac3";
- }
- }
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxShoutcast.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxShoutcast.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxShoutcast.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxShoutcast.cpp 2013-08-03 15:17:39.182291301 +1100
-@@ -86,12 +86,12 @@
- stricmp(strMimeType.c_str(), CONTENT_TYPE_AACPLUS) == 0)
- {
- // need an aac decoder first
-- m_pDemuxStream->codec = CODEC_ID_AAC;
-+ m_pDemuxStream->codec = AV_CODEC_ID_AAC;
- }
- else // (stricmp(strMimeType, CONTENT_TYPE_MP3) == 0)
- {
- // default to mp3
-- m_pDemuxStream->codec = CODEC_ID_MP3;
-+ m_pDemuxStream->codec = AV_CODEC_ID_MP3;
- }
-
- return true;
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxVobsub.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxVobsub.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxVobsub.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxVobsub.cpp 2013-08-03 15:17:39.182291301 +1100
-@@ -71,7 +71,7 @@
-
- CDVDStreamInfo hints;
- CDVDCodecOptions options;
-- hints.codec = CODEC_ID_DVD_SUBTITLE;
-+ hints.codec = AV_CODEC_ID_DVD_SUBTITLE;
-
- char line[2048];
- DECLARE_UNUSED(bool,res)
-@@ -211,7 +211,7 @@
- else
- stream->iPhysicalId = -1;
-
-- stream->codec = CODEC_ID_DVD_SUBTITLE;
-+ stream->codec = AV_CODEC_ID_DVD_SUBTITLE;
- stream->iId = m_Streams.size();
-
- state.id = stream->iId;
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDFileInfo.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDFileInfo.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDFileInfo.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDFileInfo.cpp 2013-08-03 15:17:39.182291301 +1100
-@@ -162,7 +162,7 @@
- CDVDStreamInfo hint(*pDemuxer->GetStream(nVideoStream), true);
- hint.software = true;
-
-- if (hint.codec == CODEC_ID_MPEG2VIDEO || hint.codec == CODEC_ID_MPEG1VIDEO)
-+ if (hint.codec == AV_CODEC_ID_MPEG2VIDEO || hint.codec == AV_CODEC_ID_MPEG1VIDEO)
- {
- // libmpeg2 is not thread safe so use ffmepg for mpeg2/mpeg1 thumb extraction
- CDVDCodecOptions dvdOptions;
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDPlayerAudio.h xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDPlayerAudio.h
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDPlayerAudio.h 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDPlayerAudio.h 2013-08-03 15:37:53.655526419 +1100
-@@ -38,7 +38,7 @@
- class IAudioCallback;
- class CDVDAudioCodec;
-
--enum CodecID;
-+enum AVCodecID;
-
- #define DECODE_FLAG_DROP 1
- #define DECODE_FLAG_RESYNC 2
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp 2013-08-03 15:17:39.183291318 +1100
-@@ -86,7 +86,7 @@
- }
- }
- }
-- else if (m_streaminfo.codec == CODEC_ID_DVD_SUBTITLE)
-+ else if (m_streaminfo.codec == AV_CODEC_ID_DVD_SUBTITLE)
- {
- CDVDOverlaySpu* pSPUInfo = m_dvdspus.AddData(pPacket->pData, pPacket->iSize, pPacket->pts);
- if (pSPUInfo)
-@@ -171,7 +171,7 @@
- }
-
- // dvd's use special subtitle decoder
-- if(hints.codec == CODEC_ID_DVD_SUBTITLE && filename == "dvd")
-+ if(hints.codec == AV_CODEC_ID_DVD_SUBTITLE && filename == "dvd")
- return true;
-
- m_pOverlayCodec = CDVDFactoryCodec::CreateOverlayCodec(hints);
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDPlayerTeletext.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDPlayerTeletext.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDPlayerTeletext.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDPlayerTeletext.cpp 2013-08-03 15:20:16.168885372 +1100
-@@ -114,7 +114,7 @@
- bool CDVDTeletextData::CheckStream(CDVDStreamInfo &hints)
- {
- #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52,38,1)
-- if (hints.codec == CODEC_ID_DVB_TELETEXT)
-+ if (hints.codec == AV_CODEC_ID_DVB_TELETEXT)
- return true;
- #endif
-
-@@ -126,7 +126,7 @@
- m_messageQueue.Init();
-
- #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52,38,1)
-- if (hints.codec == CODEC_ID_DVB_TELETEXT)
-+ if (hints.codec == AV_CODEC_ID_DVB_TELETEXT)
- {
- CLog::Log(LOGNOTICE, "Creating teletext data thread");
- Create();
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDPlayerVideo.h xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDPlayerVideo.h
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDPlayerVideo.h 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDPlayerVideo.h 2013-08-03 15:17:39.184291335 +1100
-@@ -31,7 +31,6 @@
- #include "cores/VideoRenderers/RenderManager.h"
- #endif
-
--enum CodecID;
- class CDemuxStreamVideo;
- class CDVDOverlayCodecCC;
-
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDStreamInfo.cpp xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDStreamInfo.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDStreamInfo.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDStreamInfo.cpp 2013-08-03 15:17:39.184291335 +1100
-@@ -38,7 +38,7 @@
-
- void CDVDStreamInfo::Clear()
- {
-- codec = CODEC_ID_NONE;
-+ codec = AV_CODEC_ID_NONE;
- type = STREAM_NONE;
- software = false;
- codec_tag = 0;
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDStreamInfo.h xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDStreamInfo.h
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDStreamInfo.h 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/dvdplayer/DVDStreamInfo.h 2013-08-03 15:17:39.184291335 +1100
-@@ -59,7 +59,7 @@
- void Assign(const CDVDStreamInfo &right, bool withextradata);
- void Assign(const CDemuxStream &right, bool withextradata);
-
-- CodecID codec;
-+ AVCodecID codec;
- StreamType type;
- bool software; //force software decoding
-
-diff -urN xbmc-12.2-orig/xbmc/cores/omxplayer/OMXAudio.cpp xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXAudio.cpp
---- xbmc-12.2-orig/xbmc/cores/omxplayer/OMXAudio.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXAudio.cpp 2013-08-03 15:17:39.185291351 +1100
-@@ -1225,17 +1225,17 @@
- }
- }
-
--bool COMXAudio::CanHWDecode(CodecID codec)
-+bool COMXAudio::CanHWDecode(AVCodecID codec)
- {
- bool ret = false;
- switch(codec)
- {
-- case CODEC_ID_DTS:
-+ case AV_CODEC_ID_DTS:
- CLog::Log(LOGDEBUG, "COMXAudio::CanHWDecode OMX_AUDIO_CodingDTS\n");
- ret = true;
- break;
-- case CODEC_ID_AC3:
-- case CODEC_ID_EAC3:
-+ case AV_CODEC_ID_AC3:
-+ case AV_CODEC_ID_EAC3:
- CLog::Log(LOGDEBUG, "COMXAudio::CanHWDecode OMX_AUDIO_CodingDDP\n");
- ret = true;
- break;
-diff -urN xbmc-12.2-orig/xbmc/cores/omxplayer/OMXAudio.h xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXAudio.h
---- xbmc-12.2-orig/xbmc/cores/omxplayer/OMXAudio.h 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXAudio.h 2013-08-03 15:17:39.185291351 +1100
-@@ -85,7 +85,7 @@
- void Process();
-
- void SetCodingType(AEDataFormat dataFormat);
-- static bool CanHWDecode(CodecID codec);
-+ static bool CanHWDecode(AVCodecID codec);
-
- void PrintChannels(OMX_AUDIO_CHANNELTYPE eChannelMapping[]);
- void PrintPCM(OMX_AUDIO_PARAM_PCMMODETYPE *pcm, std::string direction);
-diff -urN xbmc-12.2-orig/xbmc/cores/omxplayer/OMXPlayerAudio.cpp xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXPlayerAudio.cpp
---- xbmc-12.2-orig/xbmc/cores/omxplayer/OMXPlayerAudio.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXPlayerAudio.cpp 2013-08-03 15:19:42.317320020 +1100
-@@ -305,8 +305,8 @@
- m_hints.samplerate = m_pAudioCodec->GetSampleRate();
- }
-
-- /* only check bitrate changes on CODEC_ID_DTS, CODEC_ID_AC3, CODEC_ID_EAC3 */
-- if(m_hints.codec != CODEC_ID_DTS && m_hints.codec != CODEC_ID_AC3 && m_hints.codec != CODEC_ID_EAC3)
-+ /* only check bitrate changes on AV_CODEC_ID_DTS, AV_CODEC_ID_AC3, AV_CODEC_ID_EAC3 */
-+ if(m_hints.codec != AV_CODEC_ID_DTS && m_hints.codec != AV_CODEC_ID_AC3 && m_hints.codec != AV_CODEC_ID_EAC3)
- new_bitrate = old_bitrate = 0;
-
- if(m_hints_current.codec != m_hints.codec ||
-@@ -667,12 +667,12 @@
- /* pathrought is overriding hw decode*/
- if(AUDIO_IS_BITSTREAM(g_guiSettings.GetInt("audiooutput.mode")) && m_use_passthrough)
- {
-- if(hints.codec == CODEC_ID_AC3 && g_guiSettings.GetBool("audiooutput.ac3passthrough") && hdmi_passthrough_ac3)
-+ if(hints.codec == AV_CODEC_ID_AC3 && g_guiSettings.GetBool("audiooutput.ac3passthrough") && hdmi_passthrough_ac3)
- {
- dataFormat = AE_FMT_AC3;
- m_passthrough = true;
- }
-- if(hints.codec == CODEC_ID_DTS && g_guiSettings.GetBool("audiooutput.dtspassthrough") && hdmi_passthrough_dts)
-+ if(hints.codec == AV_CODEC_ID_DTS && g_guiSettings.GetBool("audiooutput.dtspassthrough") && hdmi_passthrough_dts)
- {
- dataFormat = AE_FMT_DTS;
- m_passthrough = true;
-@@ -682,12 +682,12 @@
- /* hw decode */
- if(m_use_hw_decode && !m_passthrough)
- {
-- if(hints.codec == CODEC_ID_AC3 && COMXAudio::CanHWDecode(m_hints.codec))
-+ if(hints.codec == AV_CODEC_ID_AC3 && COMXAudio::CanHWDecode(m_hints.codec))
- {
- dataFormat = AE_FMT_AC3;
- m_hw_decode = true;
- }
-- if(hints.codec == CODEC_ID_DTS && COMXAudio::CanHWDecode(m_hints.codec))
-+ if(hints.codec == AV_CODEC_ID_DTS && COMXAudio::CanHWDecode(m_hints.codec))
- {
- dataFormat = AE_FMT_DTS;
- m_hw_decode = true;
-diff -urN xbmc-12.2-orig/xbmc/cores/omxplayer/OMXVideo.cpp xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXVideo.cpp
---- xbmc-12.2-orig/xbmc/cores/omxplayer/OMXVideo.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXVideo.cpp 2013-08-03 15:17:39.186291368 +1100
-@@ -131,11 +131,11 @@
- return true;
- }
-
--bool COMXVideo::NaluFormatStartCodes(enum CodecID codec, uint8_t *in_extradata, int in_extrasize)
-+bool COMXVideo::NaluFormatStartCodes(enum AVCodecID codec, uint8_t *in_extradata, int in_extrasize)
- {
- switch(codec)
- {
-- case CODEC_ID_H264:
-+ case AV_CODEC_ID_H264:
- if (in_extrasize < 7 || in_extradata == NULL)
- return true;
- // valid avcC atom data always starts with the value 1 (version), otherwise annexb
-@@ -178,7 +178,7 @@
-
- switch (hints.codec)
- {
-- case CODEC_ID_H264:
-+ case AV_CODEC_ID_H264:
- {
- switch(hints.profile)
- {
-@@ -234,64 +234,64 @@
- }
- }
- break;
-- case CODEC_ID_MPEG4:
-+ case AV_CODEC_ID_MPEG4:
- // (role name) video_decoder.mpeg4
- // MPEG-4, DivX 4/5 and Xvid compatible
- decoder_name = OMX_MPEG4_DECODER;
- m_codingType = OMX_VIDEO_CodingMPEG4;
- m_video_codec_name = "omx-mpeg4";
- break;
-- case CODEC_ID_MPEG1VIDEO:
-- case CODEC_ID_MPEG2VIDEO:
-+ case AV_CODEC_ID_MPEG1VIDEO:
-+ case AV_CODEC_ID_MPEG2VIDEO:
- // (role name) video_decoder.mpeg2
- // MPEG-2
- decoder_name = OMX_MPEG2V_DECODER;
- m_codingType = OMX_VIDEO_CodingMPEG2;
- m_video_codec_name = "omx-mpeg2";
- break;
-- case CODEC_ID_H263:
-+ case AV_CODEC_ID_H263:
- // (role name) video_decoder.mpeg4
- // MPEG-4, DivX 4/5 and Xvid compatible
- decoder_name = OMX_MPEG4_DECODER;
- m_codingType = OMX_VIDEO_CodingMPEG4;
- m_video_codec_name = "omx-h263";
- break;
-- case CODEC_ID_VP6:
-+ case AV_CODEC_ID_VP6:
- // this form is encoded upside down
- vflip = true;
- // fall through
-- case CODEC_ID_VP6F:
-- case CODEC_ID_VP6A:
-+ case AV_CODEC_ID_VP6F:
-+ case AV_CODEC_ID_VP6A:
- // (role name) video_decoder.vp6
- // VP6
- decoder_name = OMX_VP6_DECODER;
- m_codingType = OMX_VIDEO_CodingVP6;
- m_video_codec_name = "omx-vp6";
- break;
-- case CODEC_ID_VP8:
-+ case AV_CODEC_ID_VP8:
- // (role name) video_decoder.vp8
- // VP8
- decoder_name = OMX_VP8_DECODER;
- m_codingType = OMX_VIDEO_CodingVP8;
- m_video_codec_name = "omx-vp8";
- break;
-- case CODEC_ID_THEORA:
-+ case AV_CODEC_ID_THEORA:
- // (role name) video_decoder.theora
- // theora
- decoder_name = OMX_THEORA_DECODER;
- m_codingType = OMX_VIDEO_CodingTheora;
- m_video_codec_name = "omx-theora";
- break;
-- case CODEC_ID_MJPEG:
-- case CODEC_ID_MJPEGB:
-+ case AV_CODEC_ID_MJPEG:
-+ case AV_CODEC_ID_MJPEGB:
- // (role name) video_decoder.mjpg
- // mjpg
- decoder_name = OMX_MJPEG_DECODER;
- m_codingType = OMX_VIDEO_CodingMJPEG;
- m_video_codec_name = "omx-mjpeg";
- break;
-- case CODEC_ID_VC1:
-- case CODEC_ID_WMV3:
-+ case AV_CODEC_ID_VC1:
-+ case AV_CODEC_ID_WMV3:
- // (role name) video_decoder.vc1
- // VC-1, WMV9
- decoder_name = OMX_VC1_DECODER;
-diff -urN xbmc-12.2-orig/xbmc/cores/omxplayer/OMXVideo.h xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXVideo.h
---- xbmc-12.2-orig/xbmc/cores/omxplayer/OMXVideo.h 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/cores/omxplayer/OMXVideo.h 2013-08-03 15:18:46.130381924 +1100
-@@ -98,7 +98,7 @@
- ResolutionUpdateCallBackFn m_res_callback;
- void *m_res_ctx;
- bool m_submitted_eos;
-- bool NaluFormatStartCodes(enum CodecID codec, uint8_t *in_extradata, int in_extrasize);
-+ bool NaluFormatStartCodes(enum AVCodecID codec, uint8_t *in_extradata, int in_extrasize);
- };
-
- #endif
-diff -urN xbmc-12.2-orig/xbmc/utils/BitstreamConverter.cpp xbmc-12.2-avcodec/xbmc/utils/BitstreamConverter.cpp
---- xbmc-12.2-orig/xbmc/utils/BitstreamConverter.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/utils/BitstreamConverter.cpp 2013-08-03 15:25:54.780538147 +1100
-@@ -431,7 +431,7 @@
- Close();
- }
-
--bool CBitstreamConverter::Open(enum CodecID codec, uint8_t *in_extradata, int in_extrasize, bool to_annexb)
-+bool CBitstreamConverter::Open(enum AVCodecID codec, uint8_t *in_extradata, int in_extrasize, bool to_annexb)
- {
- m_to_annexb = to_annexb;
-
-@@ -439,7 +439,7 @@
-
- switch(codec)
- {
-- case CODEC_ID_H264:
-+ case AV_CODEC_ID_H264:
- if (in_extrasize < 7 || in_extradata == NULL)
- {
- CLog::Log(LOGERROR, "CBitstreamConverter::Open avcC data too small or missing\n");
-@@ -587,7 +587,7 @@
-
- if (pData)
- {
-- if(m_codec == CODEC_ID_H264)
-+ if(m_codec == AV_CODEC_ID_H264)
- {
- if(m_to_annexb)
- {
-diff -urN xbmc-12.2-orig/xbmc/utils/BitstreamConverter.h xbmc-12.2-avcodec/xbmc/utils/BitstreamConverter.h
---- xbmc-12.2-orig/xbmc/utils/BitstreamConverter.h 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-avcodec/xbmc/utils/BitstreamConverter.h 2013-08-03 15:17:39.188291400 +1100
-@@ -114,7 +114,7 @@
- static void skip_bits( bits_reader_t *br, int nbits );
- static uint32_t get_bits( bits_reader_t *br, int nbits );
-
-- bool Open(enum CodecID codec, uint8_t *in_extradata, int in_extrasize, bool to_annexb);
-+ bool Open(enum AVCodecID codec, uint8_t *in_extradata, int in_extrasize, bool to_annexb);
- void Close(void);
- bool NeedConvert(void) { return m_convert_bitstream; };
- bool Convert(uint8_t *pData, int iSize);
-@@ -163,7 +163,7 @@
- bool m_convert_bytestream;
- DllAvUtil *m_dllAvUtil;
- DllAvFormat *m_dllAvFormat;
-- CodecID m_codec;
-+ AVCodecID m_codec;
- };
-
- #endif
-diff -urN xbmc-12.2-orig/lib/DllAvFilter.h xbmc-12.2-bufferframe/lib/DllAvFilter.h
---- xbmc-12.2-orig/lib/DllAvFilter.h 2013-05-03 16:57:40.000000000 +1100
-+++ xbmc-12.2-bufferframe/lib/DllAvFilter.h 2013-08-03 15:57:21.000000000 +1100
-@@ -46,6 +46,7 @@
- #include <libavfilter/avfiltergraph.h>
- #include <libavfilter/buffersink.h>
- #include <libavfilter/avcodec.h>
-+ #include <libavfilter/buffersrc.h>
- #elif (defined HAVE_FFMPEG_AVFILTER_H)
- #include <ffmpeg/avfiltergraph.h>
- #include <ffmpeg/buffersink.h>
-@@ -55,9 +56,17 @@
- #include "libavfilter/avfiltergraph.h"
- #include "libavfilter/buffersink.h"
- #include "libavfilter/avcodec.h"
-+ #include <libavfilter/buffersrc.h>
- #endif
- }
-
-+#if LIBAVFILTER_VERSION_MICRO >= 100
-+ #define LIBAVFILTER_FROM_FFMPEG
-+#else
-+ #define LIBAVFILTER_FROM_LIBAV
-+#endif
-+
-+
- #include "threads/SingleLock.h"
-
- class DllAvFilterInterface
-@@ -74,10 +83,13 @@
- virtual void avfilter_inout_free(AVFilterInOut **inout)=0;
- virtual int avfilter_graph_parse(AVFilterGraph *graph, const char *filters, AVFilterInOut **inputs, AVFilterInOut **outputs, void *log_ctx)=0;
- virtual int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx)=0;
--#if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0)
-- virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0;
--#else
-+#if (defined(LIBAVFILTER_FROM_LIBAV) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3,5,0)) || \
-+ (defined(LIBAVFILTER_FROM_FFMPEG) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3,43,100))
-+ virtual int av_buffersrc_add_frame(AVFilterContext *buffer_filter, AVFrame *frame)=0;
-+#elif defined(LIBAVFILTER_FROM_FFMPEG) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,72,105)
- virtual int av_buffersrc_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0;
-+#else
-+ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0;
- #endif
- virtual void avfilter_unref_buffer(AVFilterBufferRef *ref)=0;
- virtual int avfilter_link(AVFilterContext *src, unsigned srcpad, AVFilterContext *dst, unsigned dstpad)=0;
-@@ -134,10 +146,13 @@
- {
- return ::avfilter_graph_config(graphctx, log_ctx);
- }
--#if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0)
-- virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, flags); }
--#else
-+#if (defined(LIBAVFILTER_FROM_LIBAV) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3,5,0)) || \
-+ (defined(LIBAVFILTER_FROM_FFMPEG) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3,43,100))
-+ virtual int av_buffersrc_add_frame(AVFilterContext *buffer_filter, AVFrame* frame) { return ::av_buffersrc_add_frame(buffer_filter, frame); }
-+#elif defined(LIBAVFILTER_FROM_FFMPEG) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,72,105)
- virtual int av_buffersrc_add_frame(AVFilterContext *buffer_filter, AVFrame* frame, int flags) { return ::av_buffersrc_add_frame(buffer_filter, frame, flags); }
-+#else
-+ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, flags); }
- #endif
- virtual void avfilter_unref_buffer(AVFilterBufferRef *ref) { ::avfilter_unref_buffer(ref); }
- virtual int avfilter_link(AVFilterContext *src, unsigned srcpad, AVFilterContext *dst, unsigned dstpad) { return ::avfilter_link(src, srcpad, dst, dstpad); }
-@@ -172,10 +187,13 @@
- DEFINE_METHOD1(void, avfilter_inout_free_dont_call, (AVFilterInOut **p1))
- DEFINE_FUNC_ALIGNED5(int, __cdecl, avfilter_graph_parse_dont_call, AVFilterGraph *, const char *, AVFilterInOut **, AVFilterInOut **, void *)
- DEFINE_FUNC_ALIGNED2(int, __cdecl, avfilter_graph_config_dont_call, AVFilterGraph *, void *)
--#if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0)
-- DEFINE_METHOD3(int, av_vsrc_buffer_add_frame, (AVFilterContext *p1, AVFrame *p2, int p3))
--#else
-+#if (defined(LIBAVFILTER_FROM_LIBAV) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3,5,0)) || \
-+ (defined(LIBAVFILTER_FROM_FFMPEG) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3,43,100))
-+ DEFINE_METHOD2(int, av_buffersrc_add_frame, (AVFilterContext *p1, AVFrame *p2))
-+#elif defined(LIBAVFILTER_FROM_FFMPEG) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,72,105)
- DEFINE_METHOD3(int, av_buffersrc_add_frame, (AVFilterContext *p1, AVFrame *p2, int p3))
-+#else
-+ DEFINE_METHOD3(int, av_vsrc_buffer_add_frame, (AVFilterContext *p1, AVFrame *p2, int p3))
- #endif
- DEFINE_METHOD1(void, avfilter_unref_buffer, (AVFilterBufferRef *p1))
- DEFINE_METHOD4(int, avfilter_link, (AVFilterContext *p1, unsigned p2, AVFilterContext *p3, unsigned p4))
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp xbmc-12.2-bufferframe/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-bufferframe/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2013-08-03 15:55:20.699922079 +1100
-@@ -796,18 +796,25 @@
-
- if (frame)
- {
--#if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0)
-- result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, 0);
--#else
-+#if (defined(LIBAVFILTER_FROM_LIBAV) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3,5,0)) || \
-+ (defined(LIBAVFILTER_FROM_FFMPEG) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(3,43,100))
-+ // API changed in:
-+ // ffmpeg: commit 7e350379f87e7f74420b4813170fe808e2313911 (28 Nov 2012)
-+ // not released (post 1.2)
-+ // libav: commit 7e350379f87e7f74420b4813170fe808e2313911 (28 Nov 2012)
-+ // release v9 (5 January 2013)
-+ result = m_dllAvFilter.av_buffersrc_add_frame(m_pFilterIn, frame);
-+#elif defined(LIBAVFILTER_FROM_FFMPEG) && LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,72,105)
-+ // API changed in:
-+ // ffmpeg: commit 7bac2a78c2241df4bcc1665703bb71afd9a3e692 (28 Apr 2012)
-+ // release 0.11 (25 May 2012)
- result = m_dllAvFilter.av_buffersrc_add_frame(m_pFilterIn, frame, 0);
-+#else
-+ result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, 0);
- #endif
- if (result < 0)
- {
--#if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0)
-- CLog::Log(LOGERROR, "CDVDVideoCodecFFmpeg::FilterProcess - av_vsrc_buffer_add_frame");
--#else
-- CLog::Log(LOGERROR, "CDVDVideoCodecFFmpeg::FilterProcess - av_buffersrc_add_frame");
--#endif
-+ CLog::Log(LOGERROR, "CDVDVideoCodecFFmpeg::FilterProcess - av_buffersrc_add_frame/av_vsrc_buffer_add_frame");
- return VC_ERROR;
- }
- }
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp xbmc-12.2-dsp_mask/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-dsp_mask/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp 2013-08-03 16:51:34.431714287 +1100
-@@ -272,9 +272,6 @@
- memcpy(m_pCodecContext->extradata, hints.extradata, hints.extrasize);
- }
-
-- // set acceleration
-- m_pCodecContext->dsp_mask = 0;//FF_MM_FORCE | FF_MM_MMX | FF_MM_MMXEXT | FF_MM_SSE;
--
- // advanced setting override for skip loop filter (see avcodec.h for valid options)
- // TODO: allow per video setting?
- if (g_advancedSettings.m_iSkipLoopFilter != 0)
-diff -urN xbmc-12.2-orig/xbmc/cdrip/EncoderFFmpeg.h xbmc-12.2-framesize/xbmc/cdrip/EncoderFFmpeg.h
---- xbmc-12.2-orig/xbmc/cdrip/EncoderFFmpeg.h 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-framesize/xbmc/cdrip/EncoderFFmpeg.h 2013-08-03 16:25:51.108586271 +1100
-@@ -45,7 +45,7 @@
- AVCodecContext *m_CodecCtx;
- AVStream *m_Stream;
- AVPacket m_Pkt;
-- unsigned char m_BCBuffer[AVCODEC_MAX_AUDIO_FRAME_SIZE];
-+ unsigned char m_BCBuffer[192000];
- static int MuxerReadPacket(void *opaque, uint8_t *buf, int buf_size);
- void SetTag(const CStdString tag, const CStdString value);
-
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp xbmc-12.2-framesize/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-framesize/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecFFmpeg.cpp 2013-08-03 16:26:54.049609066 +1100
-@@ -30,8 +30,8 @@
- {
- m_iBufferSize1 = 0;
- m_iBufferSize2 = 0;
-- m_pBuffer2 = (BYTE*)_aligned_malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE + FF_INPUT_BUFFER_PADDING_SIZE, 16);
-- memset(m_pBuffer2, 0, AVCODEC_MAX_AUDIO_FRAME_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
-+ m_pBuffer2 = (BYTE*)_aligned_malloc(192000 + FF_INPUT_BUFFER_PADDING_SIZE, 16);
-+ memset(m_pBuffer2, 0, 192000 + FF_INPUT_BUFFER_PADDING_SIZE);
-
- m_iBuffered = 0;
- m_pCodecContext = NULL;
-@@ -145,7 +145,7 @@
- int iBytesUsed, got_frame;
- if (!m_pCodecContext) return -1;
-
-- m_iBufferSize1 = AVCODEC_MAX_AUDIO_FRAME_SIZE ;
-+ m_iBufferSize1 = 192000 ;
- m_iBufferSize2 = 0;
-
- AVPacket avpkt;
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.h xbmc-12.2-framesize/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.h
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.h 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-framesize/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecLPcm.h 2013-08-03 16:27:14.603943109 +1100
-@@ -24,7 +24,7 @@
- #include "DVDCodecs/DVDCodecs.h"
- #include "DVDAudioCodecPcm.h"
-
--#define LPCM_BUFFER_SIZE (AVCODEC_MAX_AUDIO_FRAME_SIZE / 2)
-+#define LPCM_BUFFER_SIZE (192000 / 2)
-
- class CDVDAudioCodecLPcm : public CDVDAudioCodecPcm
- {
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.h xbmc-12.2-framesize/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.h
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.h 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-framesize/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPassthroughFFmpeg.h 2013-08-03 16:27:33.671253002 +1100
-@@ -66,7 +66,7 @@
- std::list<DataPacket*> m_OutputBuffer;
- unsigned int m_OutputSize;
- bool m_WroteHeader;
-- unsigned char m_BCBuffer[AVCODEC_MAX_AUDIO_FRAME_SIZE];
-+ unsigned char m_BCBuffer[192000];
- unsigned int m_Consumed;
- unsigned int m_BufferSize;
- uint8_t *m_Buffer;
-@@ -89,7 +89,7 @@
- unsigned int m_DecodeSize;
- bool SupportsFormat(CDVDStreamInfo &hints);
-
-- uint8_t m_NeededBuffer[AVCODEC_MAX_AUDIO_FRAME_SIZE];
-+ uint8_t m_NeededBuffer[192000];
- unsigned int m_NeededUsed;
- unsigned int m_Needed;
- bool m_LostSync;
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.cpp xbmc-12.2-framesize/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-framesize/xbmc/cores/dvdplayer/DVDCodecs/Audio/DVDAudioCodecPcm.cpp 2013-08-03 16:27:23.996095755 +1100
-@@ -172,8 +172,8 @@
- src = pData;
- int buf_size = iSize;
-
-- if (iSize > AVCODEC_MAX_AUDIO_FRAME_SIZE / 2)
-- iSize = AVCODEC_MAX_AUDIO_FRAME_SIZE / 2;
-+ if (iSize > 192000 / 2)
-+ iSize = 192000 / 2;
-
- switch (m_codecID)
- {
-diff -urN xbmc-12.2-orig/xbmc/cores/omxplayer/OMXAudioCodecOMX.cpp xbmc-12.2-framesize/xbmc/cores/omxplayer/OMXAudioCodecOMX.cpp
---- xbmc-12.2-orig/xbmc/cores/omxplayer/OMXAudioCodecOMX.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-framesize/xbmc/cores/omxplayer/OMXAudioCodecOMX.cpp 2013-08-03 16:27:42.952403863 +1100
-@@ -26,7 +26,7 @@
-
- #include "cores/AudioEngine/Utils/AEUtil.h"
-
--#define MAX_AUDIO_FRAME_SIZE (AVCODEC_MAX_AUDIO_FRAME_SIZE*2)
-+#define MAX_AUDIO_FRAME_SIZE (192000*2)
-
- template <class AudioDataType>
- static inline void _Upmix(AudioDataType *input,
-@@ -178,7 +178,7 @@
- int iBytesUsed, got_frame;
- if (!m_pCodecContext) return -1;
-
-- m_iBufferSize1 = AVCODEC_MAX_AUDIO_FRAME_SIZE;
-+ m_iBufferSize1 = 192000;
- m_iBufferSize2 = 0;
-
- AVPacket avpkt;
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecFFmpeg.cpp 2013-08-03 16:41:47.751742559 +1100
-@@ -60,7 +60,6 @@
- m_pCodecContext->debug_mv = 0;
- m_pCodecContext->debug = 0;
- m_pCodecContext->workaround_bugs = FF_BUG_AUTODETECT;
-- m_pCodecContext->sub_id = hints.identifier;
- m_pCodecContext->codec_tag = hints.codec_tag;
- m_pCodecContext->time_base.num = 1;
- m_pCodecContext->time_base.den = DVD_TIME_BASE;
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp 2013-08-03 16:41:47.752742576 +1100
-@@ -1043,7 +1043,6 @@
- {
- CDemuxStreamSubtitleFFmpeg* st = new CDemuxStreamSubtitleFFmpeg(this, pStream);
- m_streams[iId] = st;
-- st->identifier = pStream->codec->sub_id;
-
- if(m_dllAvUtil.av_dict_get(pStream->metadata, "title", NULL, 0))
- st->m_description = m_dllAvUtil.av_dict_get(pStream->metadata, "title", NULL, 0)->value;
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h 2013-08-03 16:41:47.752742576 +1100
-@@ -207,11 +207,8 @@
- public:
- CDemuxStreamSubtitle() : CDemuxStream()
- {
-- identifier = 0;
- type = STREAM_SUBTITLE;
- }
--
-- int identifier;
- };
-
- class CDemuxStreamTeletext : public CDemuxStream
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxHTSP.cpp xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxHTSP.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxHTSP.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxHTSP.cpp 2013-08-03 16:41:47.753742593 +1100
-@@ -316,7 +316,13 @@
- uint32_t composition_id = 0, ancillary_id = 0;
- htsmsg_get_u32(sub, "composition_id", &composition_id);
- htsmsg_get_u32(sub, "ancillary_id" , &ancillary_id);
-- st.s->identifier = (composition_id & 0xffff) | ((ancillary_id & 0xffff) << 16);
-+ if(composition_id || ancillary_id)
-+ {
-+ st.s->ExtraData = new uint8_t[4];
-+ st.s->ExtraSize = 4;
-+ ((uint16_t*)st.s->ExtraData)[0] = composition_id;
-+ ((uint16_t*)st.s->ExtraData)[1] = ancillary_id;
-+ }
- } else if(!strcmp(type, "TEXTSUB")) {
- st.s = new CDemuxStreamSubtitle();
- st.s->codec = AV_CODEC_ID_TEXT;
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp 2013-08-03 16:41:47.753742593 +1100
-@@ -418,7 +418,13 @@
- {
- st = new CDemuxStreamSubtitlePVRClient(this);
- }
-- st->identifier = props.stream[i].iIdentifier;
-+ if(props.stream[i].iIdentifier)
-+ {
-+ st->ExtraData = new uint8_t[4];
-+ st->ExtraSize = 4;
-+ ((uint16_t*)st->ExtraData)[0] = (props.stream[i].iIdentifier >> 0) & 0xFFFFu;
-+ ((uint16_t*)st->ExtraData)[1] = (props.stream[i].iIdentifier >> 4) & 0xFFFFu;
-+ }
- m_streams[i] = st;
- }
- else
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDStreamInfo.cpp xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDStreamInfo.cpp
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDStreamInfo.cpp 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDStreamInfo.cpp 2013-08-03 16:41:47.753742593 +1100
-@@ -67,7 +67,6 @@
- bitrate = 0;
- bitspersample = 0;
-
-- identifier = 0;
- orientation = 0;
- }
-
-@@ -108,7 +107,6 @@
- || bitspersample != right.bitspersample ) return false;
-
- // SUBTITLE
-- if( identifier != right.identifier ) return false;
-
- return true;
- }
-@@ -164,7 +162,6 @@
- bitspersample = right.bitspersample;
-
- // SUBTITLE
-- identifier = right.identifier;
- }
-
- void CDVDStreamInfo::Assign(const CDemuxStream& right, bool withextradata)
-@@ -209,7 +206,5 @@
- }
- else if( right.type == STREAM_SUBTITLE )
- {
-- const CDemuxStreamSubtitle *stream = static_cast<const CDemuxStreamSubtitle*>(&right);
-- identifier = stream->identifier;
- }
- }
-diff -urN xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDStreamInfo.h xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDStreamInfo.h
---- xbmc-12.2-orig/xbmc/cores/dvdplayer/DVDStreamInfo.h 2013-05-03 16:57:41.000000000 +1100
-+++ xbmc-12.2-sub_id/xbmc/cores/dvdplayer/DVDStreamInfo.h 2013-08-03 16:41:47.753742593 +1100
-@@ -87,7 +87,6 @@
- int bitspersample;
-
- // SUBTITLE
-- int identifier;
-
- // CODEC EXTRADATA
- void* extradata; // extra data for codec to use
diff --git a/multimedia/xbmc/patches/xbmc-Gotham-rtmpdump-build.patch b/multimedia/xbmc/patches/xbmc-Gotham-rtmpdump-build.patch
new file mode 100644
index 0000000000..b745a55754
--- /dev/null
+++ b/multimedia/xbmc/patches/xbmc-Gotham-rtmpdump-build.patch
@@ -0,0 +1,13 @@
+diff -Naur xbmc-Gotham_alpha9.orig/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp xbmc-Gotham_alpha9/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp
+--- xbmc-Gotham_alpha9.orig/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp 2013-10-31 16:48:45.000000000 +0000
++++ xbmc-Gotham_alpha9/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp 2013-11-28 05:47:36.418763917 +0000
+@@ -21,9 +21,7 @@
+ #if (defined HAVE_CONFIG_H) && (!defined TARGET_WINDOWS)
+ #include "config.h"
+ #endif
+-#ifdef TARGET_WINDOWS
+ #include "system.h" // just for HAS_LIBRTMP
+-#endif
+
+ #ifdef HAS_LIBRTMP
+ #include "settings/AdvancedSettings.h"
diff --git a/multimedia/xbmc/patches/xbmc-Gotham-samba-4.0.patch b/multimedia/xbmc/patches/xbmc-Gotham-samba-4.0.patch
new file mode 100644
index 0000000000..6306472009
--- /dev/null
+++ b/multimedia/xbmc/patches/xbmc-Gotham-samba-4.0.patch
@@ -0,0 +1,24 @@
+diff -Naur xbmc-Gotham_alpha9.orig/xbmc/filesystem/SMBDirectory.cpp xbmc-Gotham_alpha9/xbmc/filesystem/SMBDirectory.cpp
+--- xbmc-Gotham_alpha9.orig/xbmc/filesystem/SMBDirectory.cpp 2013-10-31 16:48:45.000000000 +0000
++++ xbmc-Gotham_alpha9/xbmc/filesystem/SMBDirectory.cpp 2013-11-28 06:04:24.156764793 +0000
+@@ -43,7 +43,7 @@
+ #include "threads/SingleLock.h"
+ #include "PasswordManager.h"
+
+-#include <libsmbclient.h>
++#include <samba-4.0/libsmbclient.h>
+
+ #if defined(TARGET_DARWIN)
+ #define XBMC_SMB_MOUNT_PATH "Library/Application Support/XBMC/Mounts/"
+diff -Naur xbmc-Gotham_alpha9.orig/xbmc/filesystem/SmbFile.cpp xbmc-Gotham_alpha9/xbmc/filesystem/SmbFile.cpp
+--- xbmc-Gotham_alpha9.orig/xbmc/filesystem/SmbFile.cpp 2013-10-31 16:48:45.000000000 +0000
++++ xbmc-Gotham_alpha9/xbmc/filesystem/SmbFile.cpp 2013-11-28 06:05:11.648764834 +0000
+@@ -26,7 +26,7 @@
+ #include "SmbFile.h"
+ #include "PasswordManager.h"
+ #include "SMBDirectory.h"
+-#include <libsmbclient.h>
++#include <samba-4.0/libsmbclient.h>
+ #include "settings/AdvancedSettings.h"
+ #include "settings/Settings.h"
+ #include "threads/SingleLock.h"
diff --git a/multimedia/xbmc/patches/xbmc-pvr-addons-ffmpeg-2.0.patch b/multimedia/xbmc/patches/xbmc-pvr-addons-ffmpeg-2.0.patch
deleted file mode 100644
index 35d4d6db4f..0000000000
--- a/multimedia/xbmc/patches/xbmc-pvr-addons-ffmpeg-2.0.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Naur xbmc-pvr-addons-12.0-Frodo.orig/addons/pvr.hts/src/client.h xbmc-pvr-addons-12.0-Frodo/addons/pvr.hts/src/client.h
---- xbmc-pvr-addons-12.0-Frodo.orig/addons/pvr.hts/src/client.h 2013-01-19 01:40:32.000000000 +0000
-+++ xbmc-pvr-addons-12.0-Frodo/addons/pvr.hts/src/client.h 2013-11-12 01:35:15.818543473 +0000
-@@ -26,6 +26,10 @@
- #include "libXBMC_gui.h"
- #include "avcodec.h"
-
-+#if !defined (CodecID)
-+#define CodecID AVCodecID
-+#endif
-+
- #define DEFAULT_HOST "127.0.0.1"
- #define DEFAULT_HTTP_PORT 9981
- #define DEFAULT_HTSP_PORT 9982
diff --git a/multimedia/xbmc/patches/xbmc-rtmpdump-build.patch b/multimedia/xbmc/patches/xbmc-rtmpdump-build.patch
deleted file mode 100644
index e77d7d0e8a..0000000000
--- a/multimedia/xbmc/patches/xbmc-rtmpdump-build.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -Naur xbmc-11.0.orig/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp xbmc-11.0/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp
---- xbmc-11.0.orig/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp 2012-03-21 22:07:50.000000000 +0000
-+++ xbmc-11.0/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp 2012-03-31 21:44:15.320639375 +0000
-@@ -22,9 +22,7 @@
- #if (defined HAVE_CONFIG_H) && (!defined WIN32)
- #include "config.h"
- #endif
--#ifdef _WIN32
- #include "system.h" // just for HAS_LIBRTMP
--#endif
-
- #ifdef HAS_LIBRTMP
- #include "settings/AdvancedSettings.h"
diff --git a/multimedia/xbmc/xbmc.SlackBuild b/multimedia/xbmc/xbmc.SlackBuild
index d82f5414f6..958faa0834 100644
--- a/multimedia/xbmc/xbmc.SlackBuild
+++ b/multimedia/xbmc/xbmc.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for XBMC
-# Copyright 2009-2013 Larry Hajali <larryhaja[at]gmail[dot]com>
+# Copyright 2009-2014 Larry Hajali <larryhaja[at]gmail[dot]com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=xbmc
-VERSION=${VERSION:-12.3}
+VERSION=${VERSION:-13.0_r2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -64,7 +64,7 @@ cd $TMP
rm -rf $DIRNAME
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $DIRNAME
-tar xvf $CWD/$PRGNAM-pvr-addons-12.0-Frodo.tar.gz || tar xvf $CWD/12.0-Frodo.tar.gz
+tar xvf $CWD/$PRGNAM-pvr-addons-13.0-Gotham.tar.gz || tar xvf $CWD/13.0-Gotham.tar.gz
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -78,30 +78,28 @@ if grep 'sse2' /proc/cpuinfo 2>&1 > /dev/null; then
fi
# No need to show Git: "Version" in a release build.
-sed -i 's|^#ifdef GIT_REV|#ifndef GIT_REV|' $PRGNAM/GUIInfoManager.cpp
+sed -i '/GetXbmcGitRevision/,/else/d' $PRGNAM/GUIInfoManager.cpp
# Patch for building against rtmpdump. Only needed if xbmc fails to build
# w/rtmpdump. See the following link for a rather obtuse explanation.
# http://slaxbmc.blogspot.com/2011/03/23-install-xbmc-from-source.html
-patch -p1 < $CWD/patches/xbmc-rtmpdump-build.patch
+patch -p1 < $CWD/patches/xbmc-Gotham-rtmpdump-build.patch
# Patch for Samba 4.0.
-patch -p1 < $CWD/patches/samba-4.0.patch
+patch -p1 < $CWD/patches/xbmc-Gotham-samba-4.0.patch
# Hack for using afpfs-ng.
cat lib/afpfs-ng/fix_afpfs-ng_includes.patch | head -1336 | tail -1172 | patch -p1
AFPFS_NGFLAGS="-I$PWD/include"
-# Build external ffmpeg.
if [ "${FFMPEG:-no}" == "yes" ]; then
OPT_DEPS="--enable-external-ffmpeg"
- OPT_DEPS_ADDONS="--enable-external-ffmpeg"
- # Patches for newer ffmpeg > 2.0.
- patch -p1 < $CWD/patches/xbmc-12.2-ffmpeg-2.0.patch
- patch -p0 < $CWD/patches/xbmc-pvr-addons-ffmpeg-2.0.patch
+ # Renable external ffmpeg. Patches from fedora.
+ patch -p1 < $CWD/patches/0001-Revert-drop-support-for-external-ffmpeg.patch
+ patch -p1 < $CWD/patches/0002-Revert-linux-link-ffmpeg-statically.patch
+ patch -p1 < $CWD/patches/0003-makefile-include.patch
else
- OPT_DEPS="--disable-external-ffmpeg"
- OPT_DEPS_ADDONS="--disable-external-ffmpeg"
+ OPT_DEPS=""
fi
# Build webserver. Requires libmicrohttpd.
@@ -117,14 +115,13 @@ if [ "${PULSE:-no}" == "yes" ]; then
fi
# Build the pvr addons.
-cd $PRGNAM-pvr-addons-12.0-Frodo
+cd $PRGNAM-pvr-addons-13.0-Gotham
./bootstrap
CFLAGS="$SLKCFLAGS $AFPFS_NGFLAGS" \
CXXFLAGS="$SLKCFLAGS $AFPFS_NGFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX}/xbmc/addons \
- $OPT_DEPS_ADDONS \
--enable-release \
--enable-addons-with-dependencies=yes \
--docdir=/usr/doc/$PRGNAM-$VERSION \
@@ -150,6 +147,7 @@ CXXFLAGS="$SLKCFLAGS $AFPFS_NGFLAGS" \
--enable-ffmpeg-libvorbis \
--enable-alsa \
--disable-asap-codec \
+ --enable-texturepacker \
$OPT_DEPS \
--enable-external-libraries \
--build=$ARCH-slackware-linux
@@ -164,8 +162,7 @@ fi
make install DESTDIR=$PKG
-# Remove *.in files from the pvr addons.
-find $PKG -name "*\.in" -exec rm -f '{}' \;
+install -m 0755 tools/TexturePacker/TexturePacker $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -186,10 +183,13 @@ fi
gzip -9 $PKG/usr/man/man?/*.?
cp -a \
- tools/EventClients/README.txt $PRGNAM-pvr-addons-12.0-Frodo/COPYING \
+ tools/EventClients/README.txt $PRGNAM-pvr-addons-13.0-Gotham/COPYING \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+# Final clean up.
rm -f $PKG/usr/share/xbmc/{README.linux,LICENSE.GPL,*.txt}
+find $PKG \( -name "Makefile*" -o -name "*cmake*" -o -name "*\.in" \) -exec rm -f '{}' \;
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/multimedia/xbmc/xbmc.info b/multimedia/xbmc/xbmc.info
index cf3a533b19..7c34597ce2 100644
--- a/multimedia/xbmc/xbmc.info
+++ b/multimedia/xbmc/xbmc.info
@@ -1,12 +1,12 @@
PRGNAM="xbmc"
-VERSION="12.3"
+VERSION="13.0_r2"
HOMEPAGE="http://xbmc.org/"
-DOWNLOAD="http://mirrors.xbmc.org/releases/source/xbmc-12.3.tar.gz \
- https://github.com/opdenkamp/xbmc-pvr-addons/archive/12.0-Frodo.tar.gz"
-MD5SUM="7ae385ebf8e5cfcb917393235e6efbdb \
- 4a1020b1a890e26505da7cc9afef1cea"
+DOWNLOAD="http://mirrors.xbmc.org/releases/source/xbmc-13.0_r2.tar.gz \
+ https://github.com/opdenkamp/xbmc-pvr-addons/archive/13.0-Gotham.tar.gz"
+MD5SUM="8f34b930be1dbeced07b43e316a9fcce \
+ 63f5863393ca869eb6f357a62de76378"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="%README% jdk libass libmpeg2 libmodplug yajl tinyxml"
+REQUIRES="jdk libass libmpeg2 libmodplug yajl tinyxml"
MAINTAINER="Larry Hajali"
EMAIL="larryhaja[at]gmail[dot]com"