diff options
11 files changed, 127 insertions, 598 deletions
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc.inc b/meta-multimedia/recipes-multimedia/vlc/vlc.inc index f13c0ead6e..19ac8206c6 100644 --- a/meta-multimedia/recipes-multimedia/vlc/vlc.inc +++ b/meta-multimedia/recipes-multimedia/vlc/vlc.inc | |||
| @@ -5,7 +5,7 @@ SECTION = "multimedia" | |||
| 5 | LICENSE = "GPL-2.0" | 5 | LICENSE = "GPL-2.0" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
| 7 | 7 | ||
| 8 | DEPENDS = "fribidi libtool libgcrypt libgcrypt-native \ | 8 | DEPENDS = "coreutils-native fribidi libtool libgcrypt libgcrypt-native \ |
| 9 | dbus dbus-glib libxml2 gnutls \ | 9 | dbus dbus-glib libxml2 gnutls \ |
| 10 | tremor faad2 ffmpeg flac fluidsynth alsa-lib \ | 10 | tremor faad2 ffmpeg flac fluidsynth alsa-lib \ |
| 11 | lua-native lua libidn \ | 11 | lua-native lua libidn \ |
| @@ -21,12 +21,12 @@ SRC_URI = "http://download.videolan.org/pub/videolan/${BPN}/${PV}/${BP}.tar.xz" | |||
| 21 | inherit autotools gettext pkgconfig distro_features_check | 21 | inherit autotools gettext pkgconfig distro_features_check |
| 22 | 22 | ||
| 23 | ARM_INSTRUCTION_SET = "arm" | 23 | ARM_INSTRUCTION_SET = "arm" |
| 24 | 24 | export BUILDCC = "${BUILD_CC}" | |
| 25 | EXTRA_OECONF = "\ | 25 | EXTRA_OECONF = "\ |
| 26 | --enable-run-as-root \ | 26 | --enable-run-as-root \ |
| 27 | --enable-xvideo \ | 27 | --enable-xvideo \ |
| 28 | --disable-screen --disable-caca \ | 28 | --disable-screen --disable-caca \ |
| 29 | --enable-httpd --enable-vlm \ | 29 | --enable-vlm \ |
| 30 | --enable-freetype \ | 30 | --enable-freetype \ |
| 31 | --enable-tremor \ | 31 | --enable-tremor \ |
| 32 | --enable-v4l2 --disable-aa --disable-faad \ | 32 | --enable-v4l2 --disable-aa --disable-faad \ |
| @@ -35,22 +35,22 @@ EXTRA_OECONF = "\ | |||
| 35 | --without-kde-solid \ | 35 | --without-kde-solid \ |
| 36 | --enable-realrtsp \ | 36 | --enable-realrtsp \ |
| 37 | --disable-libtar \ | 37 | --disable-libtar \ |
| 38 | --enable-avcodec \ | ||
| 38 | ac_cv_path_MOC=${STAGING_BINDIR_NATIVE}/moc4 \ | 39 | ac_cv_path_MOC=${STAGING_BINDIR_NATIVE}/moc4 \ |
| 39 | ac_cv_path_RCC=${STAGING_BINDIR_NATIVE}/rcc4 \ | 40 | ac_cv_path_RCC=${STAGING_BINDIR_NATIVE}/rcc4 \ |
| 40 | ac_cv_path_UIC=${STAGING_BINDIR_NATIVE}/uic4 \ | 41 | ac_cv_path_UIC=${STAGING_BINDIR_NATIVE}/uic4 \ |
| 41 | " | 42 | " |
| 42 | 43 | ||
| 43 | PACKAGECONFIG ?= " live555 dc1394 dv1394 notify fontconfig freetype dvdread png ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 sdl vdpau', '', d)}" | 44 | PACKAGECONFIG ?= " live555 dc1394 dv1394 notify fontconfig freetype dvdread png ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" |
| 45 | |||
| 44 | PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad" | 46 | PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad" |
| 45 | PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl libsdl-image " | ||
| 46 | PACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52" | 47 | PACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52" |
| 47 | PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" | 48 | PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" |
| 48 | PACKAGECONFIG[live555] = "--enable-live555,--disable-live555,live555" | 49 | PACKAGECONFIG[live555] = "--enable-live555,--disable-live555,live555" |
| 49 | PACKAGECONFIG[libass] = "--enable-libass,--disable-libass,libass" | 50 | PACKAGECONFIG[libass] = "--enable-libass,--disable-libass,libass" |
| 50 | PACKAGECONFIG[mkv] = "--enable-mkv,--disable-mkv,libmatroska libebml" | ||
| 51 | PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc,libpostproc" | 51 | PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc,libpostproc" |
| 52 | PACKAGECONFIG[libva] = "--enable-libva,--disable-libva,libva" | ||
| 52 | PACKAGECONFIG[opencv] = "--enable-opencv,--disable-opencv,opencv" | 53 | PACKAGECONFIG[opencv] = "--enable-opencv,--disable-opencv,opencv" |
| 53 | PACKAGECONFIG[libva] = "--enable-libva --enable-avcodec,--disable-libva --disable-avcodec,libva libav" | ||
| 54 | PACKAGECONFIG[speex] = "--enable-speex,--disable-speex,speex" | 54 | PACKAGECONFIG[speex] = "--enable-speex,--disable-speex,speex" |
| 55 | PACKAGECONFIG[gstreamer] = "--enable-gst-decode,--disable-gst-decode,gstreamer1.0 gstreamer1.0-plugins-base gst-plugins-bad" | 55 | PACKAGECONFIG[gstreamer] = "--enable-gst-decode,--disable-gst-decode,gstreamer1.0 gstreamer1.0-plugins-base gst-plugins-bad" |
| 56 | PACKAGECONFIG[vpx] = "--enable-vpx,--disable-vpx, libvpx" | 56 | PACKAGECONFIG[vpx] = "--enable-vpx,--disable-vpx, libvpx" |
| @@ -81,7 +81,6 @@ do_configure_prepend() { | |||
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | do_configure_append() { | 83 | do_configure_append() { |
| 84 | sed -i -e s:'$(MOC) $(DEFS) $(CPPFLAGS)':'$(MOC) $(DEFS)'\ -I${B}/include\ -DSYS_LINUX:g ${B}/modules/gui/qt4/Makefile | ||
| 85 | sed -i -e s:'${top_builddir_slash}libtool':'${top_builddir_slash}'${TARGET_SYS}-libtool:g ${B}/doltlibtool | 84 | sed -i -e s:'${top_builddir_slash}libtool':'${top_builddir_slash}'${TARGET_SYS}-libtool:g ${B}/doltlibtool |
| 86 | } | 85 | } |
| 87 | 86 | ||
| @@ -94,10 +93,11 @@ FILES_libvlc = "${libdir}/lib*.so.*" | |||
| 94 | 93 | ||
| 95 | FILES_${PN} += "\ | 94 | FILES_${PN} += "\ |
| 96 | ${bindir}/vlc \ | 95 | ${bindir}/vlc \ |
| 96 | ${libdir}/vlc/vlc/libvlc_vdpau.so \ | ||
| 97 | ${datadir}/applications \ | 97 | ${datadir}/applications \ |
| 98 | ${datadir}/vlc/ \ | 98 | ${datadir}/vlc/ \ |
| 99 | ${datadir}/icons \ | 99 | ${datadir}/icons \ |
| 100 | ${lindir}/vlc/vlc/libvlc_vdpau.so \ | 100 | ${datadir}/metainfo/vlc.appdata.xml \ |
| 101 | " | 101 | " |
| 102 | 102 | ||
| 103 | FILES_${PN}-dbg += "\ | 103 | FILES_${PN}-dbg += "\ |
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc/0001-enable-subdir-objects.patch b/meta-multimedia/recipes-multimedia/vlc/vlc/0001-enable-subdir-objects.patch deleted file mode 100644 index 9f0e708ed7..0000000000 --- a/meta-multimedia/recipes-multimedia/vlc/vlc/0001-enable-subdir-objects.patch +++ /dev/null | |||
| @@ -1,13 +0,0 @@ | |||
| 1 | Index: vlc-2.1.2/configure.ac | ||
| 2 | =================================================================== | ||
| 3 | --- vlc-2.1.2.orig/configure.ac | ||
| 4 | +++ vlc-2.1.2/configure.ac | ||
| 5 | @@ -24,7 +24,7 @@ AC_CANONICAL_BUILD | ||
| 6 | AC_CANONICAL_HOST | ||
| 7 | AC_PRESERVE_HELP_ORDER | ||
| 8 | |||
| 9 | -AM_INIT_AUTOMAKE(tar-ustar color-tests foreign) | ||
| 10 | +AM_INIT_AUTOMAKE(tar-ustar color-tests foreign subdir-objects) | ||
| 11 | AC_CONFIG_HEADERS([config.h]) | ||
| 12 | |||
| 13 | # Disable with "./configure --disable-silent-rules" or "make V=1" | ||
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc/0002-glibc-does-not-provide-strlcpy.patch b/meta-multimedia/recipes-multimedia/vlc/vlc/0002-glibc-does-not-provide-strlcpy.patch index 6d2a46fb3c..3db3df34b2 100644 --- a/meta-multimedia/recipes-multimedia/vlc/vlc/0002-glibc-does-not-provide-strlcpy.patch +++ b/meta-multimedia/recipes-multimedia/vlc/vlc/0002-glibc-does-not-provide-strlcpy.patch | |||
| @@ -1,8 +1,6 @@ | |||
| 1 | Index: vlc-2.1.2/src/input/subtitles.c | 1 | --- a/src/input/subtitles.c |
| 2 | =================================================================== | 2 | +++ b/src/input/subtitles.c |
| 3 | --- vlc-2.1.2.orig/src/input/subtitles.c | 3 | @@ -42,6 +42,12 @@ |
| 4 | +++ vlc-2.1.2/src/input/subtitles.c | ||
| 5 | @@ -44,6 +44,12 @@ | ||
| 6 | #include "input_internal.h" | 4 | #include "input_internal.h" |
| 7 | 5 | ||
| 8 | /** | 6 | /** |
| @@ -12,6 +10,6 @@ Index: vlc-2.1.2/src/input/subtitles.c | |||
| 12 | +#define strlcpy(dst, src, n) *((char* ) mempcpy(dst, src, n)) = '\0' | 10 | +#define strlcpy(dst, src, n) *((char* ) mempcpy(dst, src, n)) = '\0' |
| 13 | + | 11 | + |
| 14 | +/** | 12 | +/** |
| 15 | * We are not going to autodetect more subtitle files than this. | 13 | * The possible extensions for subtitle files we support |
| 16 | */ | 14 | */ |
| 17 | #define MAX_SUBTITLE_FILES 128 | 15 | static const char *const sub_exts[] = { SLAVE_SPU_EXTENSIONS, "" }; |
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc/0003-use-am-path-libgcrypt.patch b/meta-multimedia/recipes-multimedia/vlc/vlc/0003-use-am-path-libgcrypt.patch deleted file mode 100644 index 8e881d0935..0000000000 --- a/meta-multimedia/recipes-multimedia/vlc/vlc/0003-use-am-path-libgcrypt.patch +++ /dev/null | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | * The upstream tests for libgcrypt are awkward and not working. | ||
| 2 | - Requires libgcrypt-config, which seems broken? | ||
| 3 | * AM_PATH_LIBGCRYPT exists for a reason, why not use it? KISS. | ||
| 4 | * Upstream abandoned AM_PATH_LIBGCRYPT in the past...newer automake ok? | ||
| 5 | |||
| 6 | Upstream status: Pending | ||
| 7 | |||
| 8 | Index: vlc-2.2.1/configure.ac | ||
| 9 | =================================================================== | ||
| 10 | --- vlc-2.2.1.orig/configure.ac | ||
| 11 | +++ vlc-2.2.1/configure.ac | ||
| 12 | @@ -4017,25 +4017,19 @@ PKG_ENABLE_MODULES_VLC([LIBXML2], [xml], | ||
| 13 | dnl | ||
| 14 | dnl libgcrypt | ||
| 15 | dnl | ||
| 16 | +GCRYPT_LIBVER=1 | ||
| 17 | +GCRYPT_REQ=1.1.94 | ||
| 18 | AC_ARG_ENABLE(libgcrypt, | ||
| 19 | [ --disable-libgcrypt gcrypt support (default enabled)]) | ||
| 20 | AS_IF([test "${enable_libgcrypt}" != "no"], [ | ||
| 21 | - AC_CHECK_DECL([GCRYCTL_SET_THREAD_CBS], [ | ||
| 22 | - libgcrypt-config --version >/dev/null || \ | ||
| 23 | - AC_MSG_ERROR([gcrypt.h present but libgcrypt-config could not be found]) | ||
| 24 | - AC_CHECK_LIB(gcrypt, gcry_control, [ | ||
| 25 | - have_libgcrypt="yes" | ||
| 26 | - GCRYPT_CFLAGS="`libgcrypt-config --cflags`" | ||
| 27 | - GCRYPT_LIBS="`libgcrypt-config --libs`" | ||
| 28 | - ], [ | ||
| 29 | - AC_MSG_ERROR([libgcrypt not found. Install libgcrypt or pass --disable-libgcrypt.]) | ||
| 30 | - ], [`libgcrypt-config --libs`]) | ||
| 31 | - ], [ | ||
| 32 | - AC_MSG_ERROR([libgcrypt version 1.1.94 or higher not found. Install libgcrypt or pass --disable-libgcrypt.]) | ||
| 33 | - ], [#include <gcrypt.h>] | ||
| 34 | - ) | ||
| 35 | + AM_PATH_LIBGCRYPT($GCRYPT_LIBVER:$GCRYPT_REQ, | ||
| 36 | + [ | ||
| 37 | + GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS" | ||
| 38 | + GCRYPT_LIBS="$LIBGCRYPT_LIBS" | ||
| 39 | + ],[ | ||
| 40 | + AC_MSG_ERROR([libgcrypt version 1.1.94 or higher not found. Install libgcrypt or use --disable-libgcrypt. Have a nice day.]) | ||
| 41 | + ]) | ||
| 42 | ]) | ||
| 43 | - | ||
| 44 | AC_SUBST(GCRYPT_CFLAGS) | ||
| 45 | AC_SUBST(GCRYPT_LIBS) | ||
| 46 | AM_CONDITIONAL([HAVE_GCRYPT], [test "${have_libgcrypt}" = "yes"]) | ||
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc/0004-modules-gui-qt4-out-of-tree-build.patch b/meta-multimedia/recipes-multimedia/vlc/vlc/0004-modules-gui-qt4-out-of-tree-build.patch deleted file mode 100644 index 53df1c6ebf..0000000000 --- a/meta-multimedia/recipes-multimedia/vlc/vlc/0004-modules-gui-qt4-out-of-tree-build.patch +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | * modules/gui/qt4/Makefile.am not B!=S friendly | ||
| 2 | * Simple solution to missing directories in ${B} | ||
| 3 | |||
| 4 | Upstream status: Pending | ||
| 5 | |||
| 6 | Signed-off-by: Tim Orling <TicoTimo@gmail.com> | ||
| 7 | |||
| 8 | Index: vlc-2.2.1/modules/gui/qt4/Makefile.am | ||
| 9 | =================================================================== | ||
| 10 | --- vlc-2.2.1.orig/modules/gui/qt4/Makefile.am | ||
| 11 | +++ vlc-2.2.1/modules/gui/qt4/Makefile.am | ||
| 12 | @@ -127,6 +127,7 @@ moc_verbose_0 = @echo " MOC " $@; | ||
| 13 | moc_verbose__0 = $(moc_verbose_0) | ||
| 14 | |||
| 15 | .hpp.moc.cpp: | ||
| 16 | + [ -d $(dir $@) ] || mkdir -p $(dir $@) | ||
| 17 | $(moc_verbose)$(MOC) $(MOC_CPPFLAGS) -o $@ $< | ||
| 18 | |||
| 19 | # These MOC files depend on the configure settings: | ||
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc/0005-libpostproc-header-check.patch b/meta-multimedia/recipes-multimedia/vlc/vlc/0005-libpostproc-header-check.patch index 2d84ffd2f4..77a7d61730 100644 --- a/meta-multimedia/recipes-multimedia/vlc/vlc/0005-libpostproc-header-check.patch +++ b/meta-multimedia/recipes-multimedia/vlc/vlc/0005-libpostproc-header-check.patch | |||
| @@ -2,16 +2,14 @@ | |||
| 2 | 2 | ||
| 3 | Upstream-status: Pending | 3 | Upstream-status: Pending |
| 4 | 4 | ||
| 5 | Index: vlc-2.1.4/configure.ac | 5 | --- a/configure.ac |
| 6 | =================================================================== | 6 | +++ b/configure.ac |
| 7 | --- vlc-2.1.4.orig/configure.ac | 7 | @@ -2589,7 +2589,7 @@ then |
| 8 | +++ vlc-2.1.4/configure.ac | ||
| 9 | @@ -2444,7 +2444,7 @@ then | ||
| 10 | VLC_SAVE_FLAGS | 8 | VLC_SAVE_FLAGS |
| 11 | CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}" | 9 | CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}" |
| 12 | CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}" | 10 | CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}" |
| 13 | - AC_CHECK_HEADERS(postproc/postprocess.h) | 11 | - AC_CHECK_HEADERS(postproc/postprocess.h) |
| 14 | + AC_CHECK_HEADERS(postproc/postprocess.h,[],[AC_CHECK_HEADERS(libpostproc/postprocess.h)]) | 12 | + AC_CHECK_HEADERS(postproc/postprocess.h,[],[AC_CHECK_HEADERS(libpostproc/postprocess.h)]) |
| 15 | VLC_ADD_PLUGIN([postproc]) | 13 | VLC_ADD_PLUGIN([postproc]) |
| 16 | VLC_ADD_LIBS([postproc],[$POSTPROC_LIBS $AVUTIL_LIBS]) | 14 | VLC_RESTORE_FLAGS |
| 17 | VLC_ADD_CFLAGS([postproc],[$POSTPROC_CFLAGS $AVUTIL_CFLAGS]) | 15 | ],[ |
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch b/meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch index 145e1ab821..96b5d2d246 100644 --- a/meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch +++ b/meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch | |||
| @@ -5,46 +5,29 @@ Upstream-status: Pending | |||
| 5 | 5 | ||
| 6 | Signed-off-by: Tim Orling <TicoTimo@gmail.com> | 6 | Signed-off-by: Tim Orling <TicoTimo@gmail.com> |
| 7 | 7 | ||
| 8 | Index: vlc-2.2.1/modules/lua/demux.c | 8 | --- a/modules/lua/demux.c |
| 9 | =================================================================== | 9 | +++ b/modules/lua/demux.c |
| 10 | --- vlc-2.2.1.orig/modules/lua/demux.c | 10 | @@ -52,7 +52,7 @@ struct vlclua_playlist |
| 11 | +++ vlc-2.2.1/modules/lua/demux.c | ||
| 12 | @@ -52,7 +52,7 @@ struct demux_sys_t | ||
| 13 | static int vlclua_demux_peek( lua_State *L ) | 11 | static int vlclua_demux_peek( lua_State *L ) |
| 14 | { | 12 | { |
| 15 | demux_t *p_demux = (demux_t *)vlclua_get_this( L ); | 13 | stream_t *s = (stream_t *)vlclua_get_this(L); |
| 16 | - int n = luaL_checkint( L, 1 ); | 14 | - int n = luaL_checkint( L, 1 ); |
| 17 | + int n = luaL_checkinteger( L, 1 ); | 15 | + int n = luaL_checkinteger( L, 1 ); |
| 18 | const uint8_t *p_peek; | 16 | const uint8_t *p_peek; |
| 19 | 17 | ||
| 20 | int i_peek = stream_Peek( p_demux->s, &p_peek, n ); | 18 | ssize_t val = vlc_stream_Peek(s->p_source, &p_peek, n); |
| 21 | @@ -67,7 +67,7 @@ static int vlclua_demux_read( lua_State | 19 | @@ -66,7 +66,7 @@ static int vlclua_demux_peek( lua_State |
| 20 | static int vlclua_demux_read( lua_State *L ) | ||
| 22 | { | 21 | { |
| 23 | demux_t *p_demux = (demux_t *)vlclua_get_this( L ); | 22 | stream_t *s = (stream_t *)vlclua_get_this(L); |
| 24 | const uint8_t *p_read; | ||
| 25 | - int n = luaL_checkint( L, 1 ); | 23 | - int n = luaL_checkint( L, 1 ); |
| 26 | + int n = luaL_checkinteger( L, 1 ); | 24 | + int n = luaL_checkinteger( L, 1 ); |
| 27 | int i_read = stream_Peek( p_demux->s, &p_read, n ); | 25 | char *buf = malloc(n); |
| 28 | 26 | ||
| 29 | if( i_read > 0 ) | 27 | if (buf != NULL) |
| 30 | Index: vlc-2.2.1/modules/lua/libs/configuration.c | 28 | --- a/modules/lua/libs/net.c |
| 31 | =================================================================== | 29 | +++ b/modules/lua/libs/net.c |
| 32 | --- vlc-2.2.1.orig/modules/lua/libs/configuration.c | 30 | @@ -179,7 +179,7 @@ static int vlclua_net_listen_tcp( lua_St |
| 33 | +++ vlc-2.2.1/modules/lua/libs/configuration.c | ||
| 34 | @@ -84,7 +84,7 @@ static int vlclua_config_set( lua_State | ||
| 35 | break; | ||
| 36 | |||
| 37 | case VLC_VAR_INTEGER: | ||
| 38 | - config_PutInt( p_this, psz_name, luaL_checkint( L, 2 ) ); | ||
| 39 | + config_PutInt( p_this, psz_name, luaL_checkinteger( L, 2 ) ); | ||
| 40 | break; | ||
| 41 | |||
| 42 | case VLC_VAR_BOOL: | ||
| 43 | Index: vlc-2.2.1/modules/lua/libs/net.c | ||
| 44 | =================================================================== | ||
| 45 | --- vlc-2.2.1.orig/modules/lua/libs/net.c | ||
| 46 | +++ vlc-2.2.1/modules/lua/libs/net.c | ||
| 47 | @@ -202,7 +202,7 @@ static int vlclua_net_listen_tcp( lua_St | ||
| 48 | { | 31 | { |
| 49 | vlc_object_t *p_this = vlclua_get_this( L ); | 32 | vlc_object_t *p_this = vlclua_get_this( L ); |
| 50 | const char *psz_host = luaL_checkstring( L, 1 ); | 33 | const char *psz_host = luaL_checkstring( L, 1 ); |
| @@ -53,16 +36,16 @@ Index: vlc-2.2.1/modules/lua/libs/net.c | |||
| 53 | int *pi_fd = net_ListenTCP( p_this, psz_host, i_port ); | 36 | int *pi_fd = net_ListenTCP( p_this, psz_host, i_port ); |
| 54 | if( pi_fd == NULL ) | 37 | if( pi_fd == NULL ) |
| 55 | return luaL_error( L, "Cannot listen on %s:%d", psz_host, i_port ); | 38 | return luaL_error( L, "Cannot listen on %s:%d", psz_host, i_port ); |
| 56 | @@ -274,7 +274,7 @@ static int vlclua_net_connect_tcp( lua_S | 39 | @@ -251,7 +251,7 @@ static int vlclua_net_connect_tcp( lua_S |
| 57 | { | 40 | { |
| 58 | vlc_object_t *p_this = vlclua_get_this( L ); | 41 | vlc_object_t *p_this = vlclua_get_this( L ); |
| 59 | const char *psz_host = luaL_checkstring( L, 1 ); | 42 | const char *psz_host = luaL_checkstring( L, 1 ); |
| 60 | - int i_port = luaL_checkint( L, 2 ); | 43 | - int i_port = luaL_checkint( L, 2 ); |
| 61 | + int i_port = luaL_checkinteger( L, 2 ); | 44 | + int i_port = luaL_checkinteger( L, 2 ); |
| 62 | int i_fd = net_Connect( p_this, psz_host, i_port, SOCK_STREAM, IPPROTO_TCP ); | 45 | int i_fd = net_ConnectTCP( p_this, psz_host, i_port ); |
| 63 | lua_pushinteger( L, vlclua_fd_map_safe( L, i_fd ) ); | 46 | lua_pushinteger( L, vlclua_fd_map_safe( L, i_fd ) ); |
| 64 | return 1; | 47 | return 1; |
| 65 | @@ -282,26 +282,26 @@ static int vlclua_net_connect_tcp( lua_S | 48 | @@ -259,14 +259,14 @@ static int vlclua_net_connect_tcp( lua_S |
| 66 | 49 | ||
| 67 | static int vlclua_net_close( lua_State *L ) | 50 | static int vlclua_net_close( lua_State *L ) |
| 68 | { | 51 | { |
| @@ -79,22 +62,25 @@ Index: vlc-2.2.1/modules/lua/libs/net.c | |||
| 79 | size_t i_len; | 62 | size_t i_len; |
| 80 | const char *psz_buffer = luaL_checklstring( L, 2, &i_len ); | 63 | const char *psz_buffer = luaL_checklstring( L, 2, &i_len ); |
| 81 | 64 | ||
| 82 | - i_len = luaL_optint( L, 3, i_len ); | 65 | @@ -278,7 +278,7 @@ static int vlclua_net_send( lua_State *L |
| 83 | + i_len = luaL_optinteger( L, 3, i_len ); | ||
| 84 | lua_pushinteger( L, (fd != -1) ? send( fd, psz_buffer, i_len, 0 ) : -1 ); | ||
| 85 | return 1; | ||
| 86 | } | ||
| 87 | 66 | ||
| 88 | static int vlclua_net_recv( lua_State *L ) | 67 | static int vlclua_net_recv( lua_State *L ) |
| 89 | { | 68 | { |
| 90 | - int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); | 69 | - int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); |
| 91 | - size_t i_len = luaL_optint( L, 2, 1 ); | ||
| 92 | + int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); | 70 | + int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); |
| 93 | + size_t i_len = luaL_optinteger( L, 2, 1 ); | 71 | size_t i_len = (size_t)luaL_optinteger( L, 2, 1 ); |
| 94 | char psz_buffer[i_len]; | 72 | char psz_buffer[i_len]; |
| 95 | 73 | ||
| 96 | ssize_t i_ret = (fd != -1) ? recv( fd, psz_buffer, i_len, 0 ) : -1; | 74 | @@ -312,7 +312,7 @@ static int vlclua_net_poll( lua_State *L |
| 97 | @@ -382,19 +382,19 @@ static int vlclua_fd_open( lua_State *L | 75 | lua_pushnil( L ); |
| 76 | for( int i = 0; lua_next( L, 1 ); i++ ) | ||
| 77 | { | ||
| 78 | - luafds[i] = luaL_checkint( L, -2 ); | ||
| 79 | + luafds[i] = luaL_checkinteger( L, -2 ); | ||
| 80 | p_fds[i].fd = vlclua_fd_get( L, luafds[i] ); | ||
| 81 | p_fds[i].events = luaL_checkinteger( L, -1 ); | ||
| 82 | p_fds[i].events &= POLLIN | POLLOUT | POLLPRI; | ||
| 83 | @@ -360,7 +360,7 @@ static int vlclua_fd_open( lua_State *L | ||
| 98 | #ifndef _WIN32 | 84 | #ifndef _WIN32 |
| 99 | static int vlclua_fd_write( lua_State *L ) | 85 | static int vlclua_fd_write( lua_State *L ) |
| 100 | { | 86 | { |
| @@ -103,47 +89,18 @@ Index: vlc-2.2.1/modules/lua/libs/net.c | |||
| 103 | size_t i_len; | 89 | size_t i_len; |
| 104 | const char *psz_buffer = luaL_checklstring( L, 2, &i_len ); | 90 | const char *psz_buffer = luaL_checklstring( L, 2, &i_len ); |
| 105 | 91 | ||
| 106 | - i_len = luaL_optint( L, 3, i_len ); | 92 | @@ -371,7 +371,7 @@ static int vlclua_fd_write( lua_State *L |
| 107 | + i_len = luaL_optinteger( L, 3, i_len ); | ||
| 108 | lua_pushinteger( L, (fd != -1) ? write( fd, psz_buffer, i_len ) : -1 ); | ||
| 109 | return 1; | ||
| 110 | } | ||
| 111 | 93 | ||
| 112 | static int vlclua_fd_read( lua_State *L ) | 94 | static int vlclua_fd_read( lua_State *L ) |
| 113 | { | 95 | { |
| 114 | - int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); | 96 | - int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); |
| 115 | - size_t i_len = luaL_optint( L, 2, 1 ); | ||
| 116 | + int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); | 97 | + int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); |
| 117 | + size_t i_len = luaL_optinteger( L, 2, 1 ); | 98 | size_t i_len = (size_t)luaL_optinteger( L, 2, 1 ); |
| 118 | char psz_buffer[i_len]; | 99 | char psz_buffer[i_len]; |
| 119 | 100 | ||
| 120 | ssize_t i_ret = (fd != -1) ? read( fd, psz_buffer, i_len ) : -1; | 101 | --- a/modules/lua/libs/osd.c |
| 121 | Index: vlc-2.2.1/modules/lua/libs/osd.c | 102 | +++ b/modules/lua/libs/osd.c |
| 122 | =================================================================== | 103 | @@ -154,7 +154,7 @@ static int vlc_osd_slider_type_from_stri |
| 123 | --- vlc-2.2.1.orig/modules/lua/libs/osd.c | ||
| 124 | +++ vlc-2.2.1/modules/lua/libs/osd.c | ||
| 125 | @@ -67,7 +67,7 @@ static int vlclua_osd_icon( lua_State *L | ||
| 126 | { | ||
| 127 | const char *psz_icon = luaL_checkstring( L, 1 ); | ||
| 128 | int i_icon = vlc_osd_icon_from_string( psz_icon ); | ||
| 129 | - int i_chan = luaL_optint( L, 2, SPU_DEFAULT_CHANNEL ); | ||
| 130 | + int i_chan = luaL_optinteger( L, 2, SPU_DEFAULT_CHANNEL ); | ||
| 131 | if( !i_icon ) | ||
| 132 | return luaL_error( L, "\"%s\" is not a valid osd icon.", psz_icon ); | ||
| 133 | |||
| 134 | @@ -114,9 +114,9 @@ static int vlc_osd_position_from_string( | ||
| 135 | static int vlclua_osd_message( lua_State *L ) | ||
| 136 | { | ||
| 137 | const char *psz_message = luaL_checkstring( L, 1 ); | ||
| 138 | - int i_chan = luaL_optint( L, 2, SPU_DEFAULT_CHANNEL ); | ||
| 139 | + int i_chan = luaL_optinteger( L, 2, SPU_DEFAULT_CHANNEL ); | ||
| 140 | const char *psz_position = luaL_optstring( L, 3, "top-right" ); | ||
| 141 | - mtime_t duration = luaL_optint( L, 4, 1000000 ); | ||
| 142 | + mtime_t duration = luaL_optinteger( L, 4, 1000000 ); | ||
| 143 | |||
| 144 | input_thread_t *p_input = vlclua_get_input_internal( L ); | ||
| 145 | if( p_input ) | ||
| 146 | @@ -154,10 +154,10 @@ static int vlc_osd_slider_type_from_stri | ||
| 147 | 104 | ||
| 148 | static int vlclua_osd_slider( lua_State *L ) | 105 | static int vlclua_osd_slider( lua_State *L ) |
| 149 | { | 106 | { |
| @@ -151,11 +108,7 @@ Index: vlc-2.2.1/modules/lua/libs/osd.c | |||
| 151 | + int i_position = luaL_checkinteger( L, 1 ); | 108 | + int i_position = luaL_checkinteger( L, 1 ); |
| 152 | const char *psz_type = luaL_checkstring( L, 2 ); | 109 | const char *psz_type = luaL_checkstring( L, 2 ); |
| 153 | int i_type = vlc_osd_slider_type_from_string( psz_type ); | 110 | int i_type = vlc_osd_slider_type_from_string( psz_type ); |
| 154 | - int i_chan = luaL_optint( L, 3, SPU_DEFAULT_CHANNEL ); | 111 | int i_chan = (int)luaL_optinteger( L, 3, VOUT_SPU_CHANNEL_OSD ); |
| 155 | + int i_chan = luaL_optinteger( L, 3, SPU_DEFAULT_CHANNEL ); | ||
| 156 | if( !i_type ) | ||
| 157 | return luaL_error( L, "\"%s\" is not a valid slider type.", | ||
| 158 | psz_type ); | ||
| 159 | @@ -198,7 +198,7 @@ static int vlclua_spu_channel_register( | 112 | @@ -198,7 +198,7 @@ static int vlclua_spu_channel_register( |
| 160 | 113 | ||
| 161 | static int vlclua_spu_channel_clear( lua_State *L ) | 114 | static int vlclua_spu_channel_clear( lua_State *L ) |
| @@ -165,10 +118,8 @@ Index: vlc-2.2.1/modules/lua/libs/osd.c | |||
| 165 | input_thread_t *p_input = vlclua_get_input_internal( L ); | 118 | input_thread_t *p_input = vlclua_get_input_internal( L ); |
| 166 | if( !p_input ) | 119 | if( !p_input ) |
| 167 | return luaL_error( L, "Unable to find input." ); | 120 | return luaL_error( L, "Unable to find input." ); |
| 168 | Index: vlc-2.2.1/modules/lua/libs/playlist.c | 121 | --- a/modules/lua/libs/playlist.c |
| 169 | =================================================================== | 122 | +++ b/modules/lua/libs/playlist.c |
| 170 | --- vlc-2.2.1.orig/modules/lua/libs/playlist.c | ||
| 171 | +++ vlc-2.2.1/modules/lua/libs/playlist.c | ||
| 172 | @@ -69,7 +69,7 @@ static int vlclua_playlist_next( lua_Sta | 123 | @@ -69,7 +69,7 @@ static int vlclua_playlist_next( lua_Sta |
| 173 | 124 | ||
| 174 | static int vlclua_playlist_skip( lua_State * L ) | 125 | static int vlclua_playlist_skip( lua_State * L ) |
| @@ -186,17 +137,17 @@ Index: vlc-2.2.1/modules/lua/libs/playlist.c | |||
| 186 | + int i_id = luaL_checkinteger( L, 1 ); | 137 | + int i_id = luaL_checkinteger( L, 1 ); |
| 187 | playlist_t *p_playlist = vlclua_get_playlist_internal( L ); | 138 | playlist_t *p_playlist = vlclua_get_playlist_internal( L ); |
| 188 | PL_LOCK; | 139 | PL_LOCK; |
| 189 | int i_ret = playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, | 140 | playlist_ViewPlay( p_playlist, NULL, |
| 190 | @@ -139,7 +139,7 @@ static int vlclua_playlist_gotoitem( lua | 141 | @@ -138,7 +138,7 @@ static int vlclua_playlist_gotoitem( lua |
| 191 | 142 | ||
| 192 | static int vlclua_playlist_delete( lua_State * L ) | 143 | static int vlclua_playlist_delete( lua_State * L ) |
| 193 | { | 144 | { |
| 194 | - int i_id = luaL_checkint( L, 1 ); | 145 | - int i_id = luaL_checkint( L, 1 ); |
| 195 | + int i_id = luaL_checkinteger( L, 1 ); | 146 | + int i_id = luaL_checkinteger( L, 1 ); |
| 196 | playlist_t *p_playlist = vlclua_get_playlist_internal( L ); | 147 | playlist_t *p_playlist = vlclua_get_playlist_internal( L ); |
| 148 | |||
| 197 | PL_LOCK; | 149 | PL_LOCK; |
| 198 | playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_id ); | 150 | @@ -152,8 +152,8 @@ static int vlclua_playlist_delete( lua_S |
| 199 | @@ -155,8 +155,8 @@ static int vlclua_playlist_delete( lua_S | ||
| 200 | 151 | ||
| 201 | static int vlclua_playlist_move( lua_State * L ) | 152 | static int vlclua_playlist_move( lua_State * L ) |
| 202 | { | 153 | { |
| @@ -207,11 +158,9 @@ Index: vlc-2.2.1/modules/lua/libs/playlist.c | |||
| 207 | playlist_t *p_playlist = vlclua_get_playlist_internal( L ); | 158 | playlist_t *p_playlist = vlclua_get_playlist_internal( L ); |
| 208 | PL_LOCK; | 159 | PL_LOCK; |
| 209 | playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_item ); | 160 | playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_item ); |
| 210 | Index: vlc-2.2.1/modules/lua/libs/stream.c | 161 | --- a/modules/lua/libs/stream.c |
| 211 | =================================================================== | 162 | +++ b/modules/lua/libs/stream.c |
| 212 | --- vlc-2.2.1.orig/modules/lua/libs/stream.c | 163 | @@ -123,7 +123,7 @@ static int vlclua_stream_read( lua_State |
| 213 | +++ vlc-2.2.1/modules/lua/libs/stream.c | ||
| 214 | @@ -101,7 +101,7 @@ static int vlclua_stream_read( lua_State | ||
| 215 | { | 164 | { |
| 216 | int i_read; | 165 | int i_read; |
| 217 | stream_t **pp_stream = (stream_t **)luaL_checkudata( L, 1, "stream" ); | 166 | stream_t **pp_stream = (stream_t **)luaL_checkudata( L, 1, "stream" ); |
| @@ -220,23 +169,8 @@ Index: vlc-2.2.1/modules/lua/libs/stream.c | |||
| 220 | uint8_t *p_read = malloc( n ); | 169 | uint8_t *p_read = malloc( n ); |
| 221 | if( !p_read ) return vlclua_error( L ); | 170 | if( !p_read ) return vlclua_error( L ); |
| 222 | 171 | ||
| 223 | Index: vlc-2.2.1/modules/lua/libs/variables.c | 172 | --- a/modules/lua/libs/volume.c |
| 224 | =================================================================== | 173 | +++ b/modules/lua/libs/volume.c |
| 225 | --- vlc-2.2.1.orig/modules/lua/libs/variables.c | ||
| 226 | +++ vlc-2.2.1/modules/lua/libs/variables.c | ||
| 227 | @@ -103,7 +103,7 @@ static int vlclua_tovalue( lua_State *L, | ||
| 228 | val->b_bool = luaL_checkboolean( L, -1 ); | ||
| 229 | break; | ||
| 230 | case VLC_VAR_INTEGER: | ||
| 231 | - val->i_int = luaL_checkint( L, -1 ); | ||
| 232 | + val->i_int = luaL_checkinteger( L, -1 ); | ||
| 233 | break; | ||
| 234 | case VLC_VAR_STRING: | ||
| 235 | val->psz_string = (char*)luaL_checkstring( L, -1 ); /* XXX: Beware, this only stays valid as long as (L,-1) stays in the stack */ | ||
| 236 | Index: vlc-2.2.1/modules/lua/libs/volume.c | ||
| 237 | =================================================================== | ||
| 238 | --- vlc-2.2.1.orig/modules/lua/libs/volume.c | ||
| 239 | +++ vlc-2.2.1/modules/lua/libs/volume.c | ||
| 240 | @@ -48,7 +48,7 @@ | 174 | @@ -48,7 +48,7 @@ |
| 241 | static int vlclua_volume_set( lua_State *L ) | 175 | static int vlclua_volume_set( lua_State *L ) |
| 242 | { | 176 | { |
| @@ -246,34 +180,54 @@ Index: vlc-2.2.1/modules/lua/libs/volume.c | |||
| 246 | if( i_volume < 0 ) | 180 | if( i_volume < 0 ) |
| 247 | i_volume = 0; | 181 | i_volume = 0; |
| 248 | int i_ret = playlist_VolumeSet( p_this, i_volume/(float)AOUT_VOLUME_DEFAULT ); | 182 | int i_ret = playlist_VolumeSet( p_this, i_volume/(float)AOUT_VOLUME_DEFAULT ); |
| 249 | @@ -68,7 +68,7 @@ static int vlclua_volume_up( lua_State * | 183 | --- a/modules/lua/libs/dialog.c |
| 250 | playlist_t *p_this = vlclua_get_playlist_internal( L ); | 184 | +++ b/modules/lua/libs/dialog.c |
| 251 | float volume; | 185 | @@ -382,7 +382,7 @@ static int lua_GetDialogUpdate( lua_Stat |
| 252 | 186 | /* Read entry in the Lua registry */ | |
| 253 | - playlist_VolumeUp( p_this, luaL_optint( L, 1, 1 ), &volume ); | 187 | lua_pushlightuserdata( L, (void*) &key_update ); |
| 254 | + playlist_VolumeUp( p_this, luaL_optinteger( L, 1, 1 ), &volume ); | 188 | lua_gettable( L, LUA_REGISTRYINDEX ); |
| 255 | lua_pushnumber( L, lroundf(volume * AOUT_VOLUME_DEFAULT) ); | 189 | - return luaL_checkint( L, -1 ); |
| 256 | return 1; | 190 | + return luaL_checkinteger( L, -1 ); |
| 257 | } | ||
| 258 | @@ -78,7 +78,7 @@ static int vlclua_volume_down( lua_State | ||
| 259 | playlist_t *p_this = vlclua_get_playlist_internal( L ); | ||
| 260 | float volume; | ||
| 261 | |||
| 262 | - playlist_VolumeDown( p_this, luaL_optint( L, 1, 1 ), &volume ); | ||
| 263 | + playlist_VolumeDown( p_this, luaL_optinteger( L, 1, 1 ), &volume ); | ||
| 264 | lua_pushnumber( L, lroundf(volume * AOUT_VOLUME_DEFAULT) ); | ||
| 265 | return 1; | ||
| 266 | } | 191 | } |
| 267 | Index: vlc-2.2.1/modules/lua/libs/win.c | ||
| 268 | =================================================================== | ||
| 269 | --- vlc-2.2.1.orig/modules/lua/libs/win.c | ||
| 270 | +++ vlc-2.2.1/modules/lua/libs/win.c | ||
| 271 | @@ -123,7 +123,7 @@ static int vlclua_console_init( lua_Stat | ||
| 272 | 192 | ||
| 273 | static int vlclua_console_wait( lua_State *L ) | 193 | /** Manually update a dialog |
| 274 | { | 194 | @@ -573,22 +573,22 @@ static int vlclua_create_widget_inner( l |
| 275 | - int i_timeout = luaL_optint( L, 1, 0 ); | 195 | |
| 276 | + int i_timeout = luaL_optinteger( L, 1, 0 ); | 196 | /* Set common arguments: col, row, hspan, vspan, width, height */ |
| 277 | DWORD status = WaitForSingleObject( GetConsole( L ), i_timeout ); | 197 | if( lua_isnumber( L, arg ) ) |
| 278 | lua_pushboolean( L, status == WAIT_OBJECT_0 ); | 198 | - p_widget->i_column = luaL_checkint( L, arg ); |
| 279 | return 1; | 199 | + p_widget->i_column = luaL_checkinteger( L, arg ); |
| 200 | else goto end_of_args; | ||
| 201 | if( lua_isnumber( L, ++arg ) ) | ||
| 202 | - p_widget->i_row = luaL_checkint( L, arg ); | ||
| 203 | + p_widget->i_row = luaL_checkinteger( L, arg ); | ||
| 204 | else goto end_of_args; | ||
| 205 | if( lua_isnumber( L, ++arg ) ) | ||
| 206 | - p_widget->i_horiz_span = luaL_checkint( L, arg ); | ||
| 207 | + p_widget->i_horiz_span = luaL_checkinteger( L, arg ); | ||
| 208 | else goto end_of_args; | ||
| 209 | if( lua_isnumber( L, ++arg ) ) | ||
| 210 | - p_widget->i_vert_span = luaL_checkint( L, arg ); | ||
| 211 | + p_widget->i_vert_span = luaL_checkinteger( L, arg ); | ||
| 212 | else goto end_of_args; | ||
| 213 | if( lua_isnumber( L, ++arg ) ) | ||
| 214 | - p_widget->i_width = luaL_checkint( L, arg ); | ||
| 215 | + p_widget->i_width = luaL_checkinteger( L, arg ); | ||
| 216 | else goto end_of_args; | ||
| 217 | if( lua_isnumber( L, ++arg ) ) | ||
| 218 | - p_widget->i_height = luaL_checkint( L, arg ); | ||
| 219 | + p_widget->i_height = luaL_checkinteger( L, arg ); | ||
| 220 | else goto end_of_args; | ||
| 221 | |||
| 222 | end_of_args: | ||
| 223 | --- a/modules/lua/libs/io.c | ||
| 224 | +++ b/modules/lua/libs/io.c | ||
| 225 | @@ -139,7 +139,7 @@ static int vlclua_io_file_seek( lua_Stat | ||
| 226 | const char* psz_mode = luaL_optstring( L, 2, NULL ); | ||
| 227 | if ( psz_mode != NULL ) | ||
| 228 | { | ||
| 229 | - long i_offset = luaL_optlong( L, 3, 0 ); | ||
| 230 | + long i_offset = (long)luaL_optinteger( L, 3, 0 ); | ||
| 231 | int i_mode; | ||
| 232 | if ( !strcmp( psz_mode, "set" ) ) | ||
| 233 | i_mode = SEEK_SET; | ||
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc/0009-Avcodec-swscale-use-AV_PIX_FMT-consistently.patch b/meta-multimedia/recipes-multimedia/vlc/vlc/0009-Avcodec-swscale-use-AV_PIX_FMT-consistently.patch deleted file mode 100644 index cb3ba71dd6..0000000000 --- a/meta-multimedia/recipes-multimedia/vlc/vlc/0009-Avcodec-swscale-use-AV_PIX_FMT-consistently.patch +++ /dev/null | |||
| @@ -1,293 +0,0 @@ | |||
| 1 | From 427732a379893491eac27aeadff0e0b3e252d158 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jean-Baptiste Kempf <jb@videolan.org> | ||
| 3 | Date: Mon, 31 Aug 2015 08:19:00 +0200 | ||
| 4 | Subject: [PATCH] Avcodec/swscale: use AV_PIX_FMT consistently | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | (cherry picked from commit faa7bd357b1f9e07a6ffbc451a188773fad7a275) | ||
| 10 | Signed-off-by: Rafaël Carré <funman@videolan.org> | ||
| 11 | |||
| 12 | Conflicts: | ||
| 13 | modules/codec/avcodec/chroma.c | ||
| 14 | modules/codec/avcodec/video.c | ||
| 15 | --- | ||
| 16 | modules/codec/avcodec/chroma.c | 104 ++++++++++++++++++++--------------------- | ||
| 17 | modules/codec/avcodec/video.c | 10 ++-- | ||
| 18 | modules/video_chroma/swscale.c | 28 +++++------ | ||
| 19 | 3 files changed, 71 insertions(+), 71 deletions(-) | ||
| 20 | |||
| 21 | diff --git a/modules/codec/avcodec/chroma.c b/modules/codec/avcodec/chroma.c | ||
| 22 | index 393364b..c31f93d 100644 | ||
| 23 | --- a/modules/codec/avcodec/chroma.c | ||
| 24 | +++ b/modules/codec/avcodec/chroma.c | ||
| 25 | @@ -62,77 +62,77 @@ static const struct | ||
| 26 | } chroma_table[] = | ||
| 27 | { | ||
| 28 | /* Planar YUV formats */ | ||
| 29 | - {VLC_CODEC_I444, PIX_FMT_YUV444P, 0, 0, 0 }, | ||
| 30 | - {VLC_CODEC_J444, PIX_FMT_YUVJ444P, 0, 0, 0 }, | ||
| 31 | - | ||
| 32 | - {VLC_CODEC_I440, PIX_FMT_YUV440P, 0, 0, 0 }, | ||
| 33 | - {VLC_CODEC_J440, PIX_FMT_YUVJ440P, 0, 0, 0 }, | ||
| 34 | - | ||
| 35 | - {VLC_CODEC_I422, PIX_FMT_YUV422P, 0, 0, 0 }, | ||
| 36 | - {VLC_CODEC_J422, PIX_FMT_YUVJ422P, 0, 0, 0 }, | ||
| 37 | - | ||
| 38 | - {VLC_CODEC_I420, PIX_FMT_YUV420P, 0, 0, 0 }, | ||
| 39 | - {VLC_CODEC_YV12, PIX_FMT_YUV420P, 0, 0, 0 }, | ||
| 40 | - {VLC_FOURCC('I','Y','U','V'), PIX_FMT_YUV420P, 0, 0, 0 }, | ||
| 41 | - {VLC_CODEC_J420, PIX_FMT_YUVJ420P, 0, 0, 0 }, | ||
| 42 | - {VLC_CODEC_I411, PIX_FMT_YUV411P, 0, 0, 0 }, | ||
| 43 | - {VLC_CODEC_I410, PIX_FMT_YUV410P, 0, 0, 0 }, | ||
| 44 | - {VLC_FOURCC('Y','V','U','9'), PIX_FMT_YUV410P, 0, 0, 0 }, | ||
| 45 | - | ||
| 46 | - {VLC_FOURCC('N','V','1','2'), PIX_FMT_NV12, 0, 0, 0 }, | ||
| 47 | - {VLC_FOURCC('N','V','2','1'), PIX_FMT_NV21, 0, 0, 0 }, | ||
| 48 | - | ||
| 49 | - {VLC_CODEC_I420_9L, PIX_FMT_YUV420P9LE, 0, 0, 0 }, | ||
| 50 | - {VLC_CODEC_I420_9B, PIX_FMT_YUV420P9BE, 0, 0, 0 }, | ||
| 51 | - {VLC_CODEC_I420_10L, PIX_FMT_YUV420P10LE, 0, 0, 0 }, | ||
| 52 | - {VLC_CODEC_I420_10B, PIX_FMT_YUV420P10BE, 0, 0, 0 }, | ||
| 53 | + {VLC_CODEC_I444, AV_PIX_FMT_YUV444P, 0, 0, 0 }, | ||
| 54 | + {VLC_CODEC_J444, AV_PIX_FMT_YUVJ444P, 0, 0, 0 }, | ||
| 55 | + | ||
| 56 | + {VLC_CODEC_I440, AV_PIX_FMT_YUV440P, 0, 0, 0 }, | ||
| 57 | + {VLC_CODEC_J440, AV_PIX_FMT_YUVJ440P, 0, 0, 0 }, | ||
| 58 | + | ||
| 59 | + {VLC_CODEC_I422, AV_PIX_FMT_YUV422P, 0, 0, 0 }, | ||
| 60 | + {VLC_CODEC_J422, AV_PIX_FMT_YUVJ422P, 0, 0, 0 }, | ||
| 61 | + | ||
| 62 | + {VLC_CODEC_I420, AV_PIX_FMT_YUV420P, 0, 0, 0 }, | ||
| 63 | + {VLC_CODEC_YV12, AV_PIX_FMT_YUV420P, 0, 0, 0 }, | ||
| 64 | + {VLC_FOURCC('I','Y','U','V'), AV_PIX_FMT_YUV420P, 0, 0, 0 }, | ||
| 65 | + {VLC_CODEC_J420, AV_PIX_FMT_YUVJ420P, 0, 0, 0 }, | ||
| 66 | + {VLC_CODEC_I411, AV_PIX_FMT_YUV411P, 0, 0, 0 }, | ||
| 67 | + {VLC_CODEC_I410, AV_PIX_FMT_YUV410P, 0, 0, 0 }, | ||
| 68 | + {VLC_FOURCC('Y','V','U','9'), AV_PIX_FMT_YUV410P, 0, 0, 0 }, | ||
| 69 | + | ||
| 70 | + {VLC_FOURCC('N','V','1','2'), AV_PIX_FMT_NV12, 0, 0, 0 }, | ||
| 71 | + {VLC_FOURCC('N','V','2','1'), AV_PIX_FMT_NV21, 0, 0, 0 }, | ||
| 72 | + | ||
| 73 | + {VLC_CODEC_I420_9L, AV_PIX_FMT_YUV420P9LE, 0, 0, 0 }, | ||
| 74 | + {VLC_CODEC_I420_9B, AV_PIX_FMT_YUV420P9BE, 0, 0, 0 }, | ||
| 75 | + {VLC_CODEC_I420_10L, AV_PIX_FMT_YUV420P10LE, 0, 0, 0 }, | ||
| 76 | + {VLC_CODEC_I420_10B, AV_PIX_FMT_YUV420P10BE, 0, 0, 0 }, | ||
| 77 | #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51,13,0) | ||
| 78 | - {VLC_CODEC_I422_9L, PIX_FMT_YUV422P9LE, 0, 0, 0 }, | ||
| 79 | - {VLC_CODEC_I422_9B, PIX_FMT_YUV422P9BE, 0, 0, 0 }, | ||
| 80 | + {VLC_CODEC_I422_9L, AV_PIX_FMT_YUV422P9LE, 0, 0, 0 }, | ||
| 81 | + {VLC_CODEC_I422_9B, AV_PIX_FMT_YUV422P9BE, 0, 0, 0 }, | ||
| 82 | #endif | ||
| 83 | - {VLC_CODEC_I422_10L, PIX_FMT_YUV422P10LE, 0, 0, 0 }, | ||
| 84 | - {VLC_CODEC_I422_10B, PIX_FMT_YUV422P10BE, 0, 0, 0 }, | ||
| 85 | + {VLC_CODEC_I422_10L, AV_PIX_FMT_YUV422P10LE, 0, 0, 0 }, | ||
| 86 | + {VLC_CODEC_I422_10B, AV_PIX_FMT_YUV422P10BE, 0, 0, 0 }, | ||
| 87 | |||
| 88 | - {VLC_CODEC_YUV420A, PIX_FMT_YUVA420P, 0, 0, 0 }, | ||
| 89 | + {VLC_CODEC_YUV420A, AV_PIX_FMT_YUVA420P, 0, 0, 0 }, | ||
| 90 | #if LIBAVUTIL_VERSION_CHECK( 51, 45, 0, 74, 100 ) | ||
| 91 | {VLC_CODEC_YUV422A, AV_PIX_FMT_YUVA422P, 0, 0, 0 }, | ||
| 92 | #endif | ||
| 93 | |||
| 94 | - {VLC_CODEC_I444_9L, PIX_FMT_YUV444P9LE, 0, 0, 0 }, | ||
| 95 | - {VLC_CODEC_I444_9B, PIX_FMT_YUV444P9BE, 0, 0, 0 }, | ||
| 96 | - {VLC_CODEC_I444_10L, PIX_FMT_YUV444P10LE, 0, 0, 0 }, | ||
| 97 | - {VLC_CODEC_I444_10B, PIX_FMT_YUV444P10BE, 0, 0, 0 }, | ||
| 98 | - {VLC_CODEC_I444_16L, PIX_FMT_YUV444P16LE, 0, 0, 0 }, | ||
| 99 | - {VLC_CODEC_I444_16B, PIX_FMT_YUV444P16BE, 0, 0, 0 }, | ||
| 100 | + {VLC_CODEC_I444_9L, AV_PIX_FMT_YUV444P9LE, 0, 0, 0 }, | ||
| 101 | + {VLC_CODEC_I444_9B, AV_PIX_FMT_YUV444P9BE, 0, 0, 0 }, | ||
| 102 | + {VLC_CODEC_I444_10L, AV_PIX_FMT_YUV444P10LE, 0, 0, 0 }, | ||
| 103 | + {VLC_CODEC_I444_10B, AV_PIX_FMT_YUV444P10BE, 0, 0, 0 }, | ||
| 104 | + {VLC_CODEC_I444_16L, AV_PIX_FMT_YUV444P16LE, 0, 0, 0 }, | ||
| 105 | + {VLC_CODEC_I444_16B, AV_PIX_FMT_YUV444P16BE, 0, 0, 0 }, | ||
| 106 | |||
| 107 | /* Packed YUV formats */ | ||
| 108 | - {VLC_CODEC_YUYV, PIX_FMT_YUYV422, 0, 0, 0 }, | ||
| 109 | - {VLC_FOURCC('Y','U','Y','V'), PIX_FMT_YUYV422, 0, 0, 0 }, | ||
| 110 | - {VLC_CODEC_UYVY, PIX_FMT_UYVY422, 0, 0, 0 }, | ||
| 111 | - {VLC_FOURCC('Y','4','1','1'), PIX_FMT_UYYVYY411, 0, 0, 0 }, | ||
| 112 | + {VLC_CODEC_YUYV, AV_PIX_FMT_YUYV422, 0, 0, 0 }, | ||
| 113 | + {VLC_FOURCC('Y','U','Y','V'), AV_PIX_FMT_YUYV422, 0, 0, 0 }, | ||
| 114 | + {VLC_CODEC_UYVY, AV_PIX_FMT_UYVY422, 0, 0, 0 }, | ||
| 115 | + {VLC_FOURCC('Y','4','1','1'), AV_PIX_FMT_UYYVYY411, 0, 0, 0 }, | ||
| 116 | |||
| 117 | /* Packed RGB formats */ | ||
| 118 | - VLC_RGB( VLC_FOURCC('R','G','B','4'), PIX_FMT_RGB4, PIX_FMT_BGR4, 0x10, 0x06, 0x01 ) | ||
| 119 | - VLC_RGB( VLC_FOURCC('R','G','B','8'), PIX_FMT_RGB8, PIX_FMT_BGR8, 0xC0, 0x38, 0x07 ) | ||
| 120 | + VLC_RGB( VLC_FOURCC('R','G','B','4'), AV_PIX_FMT_RGB4, AV_PIX_FMT_BGR4, 0x10, 0x06, 0x01 ) | ||
| 121 | + VLC_RGB( VLC_FOURCC('R','G','B','8'), AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, 0xC0, 0x38, 0x07 ) | ||
| 122 | |||
| 123 | - VLC_RGB( VLC_CODEC_RGB15, PIX_FMT_RGB555, PIX_FMT_BGR555, 0x7c00, 0x03e0, 0x001f ) | ||
| 124 | - VLC_RGB( VLC_CODEC_RGB16, PIX_FMT_RGB565, PIX_FMT_BGR565, 0xf800, 0x07e0, 0x001f ) | ||
| 125 | - VLC_RGB( VLC_CODEC_RGB24, PIX_FMT_BGR24, PIX_FMT_RGB24, 0xff0000, 0x00ff00, 0x0000ff ) | ||
| 126 | + VLC_RGB( VLC_CODEC_RGB15, AV_PIX_FMT_RGB555, AV_PIX_FMT_BGR555, 0x7c00, 0x03e0, 0x001f ) | ||
| 127 | + VLC_RGB( VLC_CODEC_RGB16, AV_PIX_FMT_RGB565, AV_PIX_FMT_BGR565, 0xf800, 0x07e0, 0x001f ) | ||
| 128 | + VLC_RGB( VLC_CODEC_RGB24, AV_PIX_FMT_BGR24, AV_PIX_FMT_RGB24, 0xff0000, 0x00ff00, 0x0000ff ) | ||
| 129 | |||
| 130 | - VLC_RGB( VLC_CODEC_RGB32, PIX_FMT_RGB32, PIX_FMT_BGR32, 0x00ff0000, 0x0000ff00, 0x000000ff ) | ||
| 131 | - VLC_RGB( VLC_CODEC_RGB32, PIX_FMT_RGB32_1, PIX_FMT_BGR32_1, 0xff000000, 0x00ff0000, 0x0000ff00 ) | ||
| 132 | + VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_RGB32, AV_PIX_FMT_BGR32, 0x00ff0000, 0x0000ff00, 0x000000ff ) | ||
| 133 | + VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_RGB32_1, AV_PIX_FMT_BGR32_1, 0xff000000, 0x00ff0000, 0x0000ff00 ) | ||
| 134 | |||
| 135 | #ifdef AV_PIX_FMT_0BGR32 | ||
| 136 | VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_0BGR32, AV_PIX_FMT_0RGB32, 0x000000ff, 0x0000ff00, 0x00ff0000 ) | ||
| 137 | #endif | ||
| 138 | |||
| 139 | - {VLC_CODEC_RGBA, PIX_FMT_RGBA, 0, 0, 0 }, | ||
| 140 | - {VLC_CODEC_ARGB, PIX_FMT_ARGB, 0, 0, 0 }, | ||
| 141 | - {VLC_CODEC_BGRA, PIX_FMT_BGRA, 0, 0, 0 }, | ||
| 142 | - {VLC_CODEC_GREY, PIX_FMT_GRAY8, 0, 0, 0}, | ||
| 143 | + {VLC_CODEC_RGBA, AV_PIX_FMT_RGBA, 0, 0, 0 }, | ||
| 144 | + {VLC_CODEC_ARGB, AV_PIX_FMT_ARGB, 0, 0, 0 }, | ||
| 145 | + {VLC_CODEC_BGRA, AV_PIX_FMT_BGRA, 0, 0, 0 }, | ||
| 146 | + {VLC_CODEC_GREY, AV_PIX_FMT_GRAY8, 0, 0, 0}, | ||
| 147 | |||
| 148 | /* Paletized RGB */ | ||
| 149 | - {VLC_CODEC_RGBP, PIX_FMT_PAL8, 0, 0, 0}, | ||
| 150 | + {VLC_CODEC_RGBP, AV_PIX_FMT_PAL8, 0, 0, 0}, | ||
| 151 | |||
| 152 | #if LIBAVUTIL_VERSION_CHECK(51, 42, 0, 74,100) | ||
| 153 | {VLC_CODEC_GBR_PLANAR, AV_PIX_FMT_GBRP, 0, 0, 0 }, | ||
| 154 | @@ -201,5 +201,5 @@ int FindFfmpegChroma( vlc_fourcc_t fourcc ) | ||
| 155 | for( int i = 0; chroma_table[i].i_chroma != 0; i++ ) | ||
| 156 | if( chroma_table[i].i_chroma == fourcc ) | ||
| 157 | return chroma_table[i].i_chroma_id; | ||
| 158 | - return PIX_FMT_NONE; | ||
| 159 | + return AV_PIX_FMT_NONE; | ||
| 160 | } | ||
| 161 | diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c | ||
| 162 | index c115db9..ae600e8 100644 | ||
| 163 | --- a/modules/codec/avcodec/video.c | ||
| 164 | +++ b/modules/codec/avcodec/video.c | ||
| 165 | @@ -1004,7 +1004,7 @@ static picture_t *lavc_dr_GetFrame(struct AVCodecContext *ctx, | ||
| 166 | if (GetVlcChroma(&dec->fmt_out.video, ctx->pix_fmt) != VLC_SUCCESS) | ||
| 167 | return NULL; | ||
| 168 | dec->fmt_out.i_codec = dec->fmt_out.video.i_chroma; | ||
| 169 | - if (ctx->pix_fmt == PIX_FMT_PAL8) | ||
| 170 | + if (ctx->pix_fmt == AV_PIX_FMT_PAL8) | ||
| 171 | return NULL; | ||
| 172 | |||
| 173 | int width = frame->width; | ||
| 174 | @@ -1180,7 +1180,7 @@ static picture_t *ffmpeg_dr_GetFrameBuf(struct AVCodecContext *p_context) | ||
| 175 | if (GetVlcChroma(&p_dec->fmt_out.video, p_context->pix_fmt) != VLC_SUCCESS) | ||
| 176 | goto no_dr; | ||
| 177 | |||
| 178 | - if (p_context->pix_fmt == PIX_FMT_PAL8) | ||
| 179 | + if (p_context->pix_fmt == AV_PIX_FMT_PAL8) | ||
| 180 | goto no_dr; | ||
| 181 | |||
| 182 | p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma; | ||
| 183 | @@ -1215,7 +1215,7 @@ static picture_t *ffmpeg_dr_GetFrameBuf(struct AVCodecContext *p_context) | ||
| 184 | goto no_dr; | ||
| 185 | } | ||
| 186 | |||
| 187 | - if( p_context->pix_fmt == PIX_FMT_YUV422P ) | ||
| 188 | + if( p_context->pix_fmt == AV_PIX_FMT_YUV422P ) | ||
| 189 | { | ||
| 190 | if( 2 * p_pic->p[1].i_pitch != p_pic->p[0].i_pitch || | ||
| 191 | 2 * p_pic->p[2].i_pitch != p_pic->p[0].i_pitch ) | ||
| 192 | @@ -1325,7 +1325,7 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context, | ||
| 193 | |||
| 194 | /* Enumerate available formats */ | ||
| 195 | bool can_hwaccel = false; | ||
| 196 | - for( size_t i = 0; pi_fmt[i] != PIX_FMT_NONE; i++ ) | ||
| 197 | + for( size_t i = 0; pi_fmt[i] != AV_PIX_FMT_NONE; i++ ) | ||
| 198 | { | ||
| 199 | const AVPixFmtDescriptor *dsc = av_pix_fmt_desc_get(pi_fmt[i]); | ||
| 200 | if (dsc == NULL) | ||
| 201 | @@ -1352,7 +1352,7 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context, | ||
| 202 | if( p_va == NULL ) | ||
| 203 | goto end; | ||
| 204 | |||
| 205 | - for( size_t i = 0; pi_fmt[i] != PIX_FMT_NONE; i++ ) | ||
| 206 | + for( size_t i = 0; pi_fmt[i] != AV_PIX_FMT_NONE; i++ ) | ||
| 207 | { | ||
| 208 | if( p_va->pix_fmt != pi_fmt[i] ) | ||
| 209 | continue; | ||
| 210 | diff --git a/modules/video_chroma/swscale.c b/modules/video_chroma/swscale.c | ||
| 211 | index 569e0f5..4e0ecf1 100644 | ||
| 212 | --- a/modules/video_chroma/swscale.c | ||
| 213 | +++ b/modules/video_chroma/swscale.c | ||
| 214 | @@ -257,35 +257,35 @@ static void FixParameters( int *pi_fmt, bool *pb_has_a, bool *pb_swap_uv, vlc_fo | ||
| 215 | switch( fmt ) | ||
| 216 | { | ||
| 217 | case VLC_CODEC_YUV422A: | ||
| 218 | - *pi_fmt = PIX_FMT_YUV422P; | ||
| 219 | + *pi_fmt = AV_PIX_FMT_YUV422P; | ||
| 220 | *pb_has_a = true; | ||
| 221 | break; | ||
| 222 | case VLC_CODEC_YUV420A: | ||
| 223 | - *pi_fmt = PIX_FMT_YUV420P; | ||
| 224 | + *pi_fmt = AV_PIX_FMT_YUV420P; | ||
| 225 | *pb_has_a = true; | ||
| 226 | break; | ||
| 227 | case VLC_CODEC_YUVA: | ||
| 228 | - *pi_fmt = PIX_FMT_YUV444P; | ||
| 229 | + *pi_fmt = AV_PIX_FMT_YUV444P; | ||
| 230 | *pb_has_a = true; | ||
| 231 | break; | ||
| 232 | case VLC_CODEC_RGBA: | ||
| 233 | - *pi_fmt = PIX_FMT_BGR32; | ||
| 234 | + *pi_fmt = AV_PIX_FMT_BGR32; | ||
| 235 | *pb_has_a = true; | ||
| 236 | break; | ||
| 237 | case VLC_CODEC_ARGB: | ||
| 238 | - *pi_fmt = PIX_FMT_BGR32_1; | ||
| 239 | + *pi_fmt = AV_PIX_FMT_BGR32_1; | ||
| 240 | *pb_has_a = true; | ||
| 241 | break; | ||
| 242 | case VLC_CODEC_BGRA: | ||
| 243 | - *pi_fmt = PIX_FMT_RGB32; | ||
| 244 | + *pi_fmt = AV_PIX_FMT_RGB32; | ||
| 245 | *pb_has_a = true; | ||
| 246 | break; | ||
| 247 | case VLC_CODEC_YV12: | ||
| 248 | - *pi_fmt = PIX_FMT_YUV420P; | ||
| 249 | + *pi_fmt = AV_PIX_FMT_YUV420P; | ||
| 250 | *pb_swap_uv = true; | ||
| 251 | break; | ||
| 252 | case VLC_CODEC_YV9: | ||
| 253 | - *pi_fmt = PIX_FMT_YUV410P; | ||
| 254 | + *pi_fmt = AV_PIX_FMT_YUV410P; | ||
| 255 | *pb_swap_uv = true; | ||
| 256 | break; | ||
| 257 | default: | ||
| 258 | @@ -314,7 +314,7 @@ static int GetParameters( ScalerConfiguration *p_cfg, | ||
| 259 | { | ||
| 260 | if( p_fmti->i_chroma == VLC_CODEC_YUVP && ALLOW_YUVP ) | ||
| 261 | { | ||
| 262 | - i_fmti = i_fmto = PIX_FMT_GRAY8; | ||
| 263 | + i_fmti = i_fmto = AV_PIX_FMT_GRAY8; | ||
| 264 | i_sws_flags = SWS_POINT; | ||
| 265 | } | ||
| 266 | } | ||
| 267 | @@ -327,9 +327,9 @@ static int GetParameters( ScalerConfiguration *p_cfg, | ||
| 268 | * Without SWS_ACCURATE_RND the quality is really bad for some conversions */ | ||
| 269 | switch( i_fmto ) | ||
| 270 | { | ||
| 271 | - case PIX_FMT_ARGB: | ||
| 272 | - case PIX_FMT_RGBA: | ||
| 273 | - case PIX_FMT_ABGR: | ||
| 274 | + case AV_PIX_FMT_ARGB: | ||
| 275 | + case AV_PIX_FMT_RGBA: | ||
| 276 | + case AV_PIX_FMT_ABGR: | ||
| 277 | i_sws_flags |= SWS_ACCURATE_RND; | ||
| 278 | break; | ||
| 279 | } | ||
| 280 | @@ -403,8 +403,8 @@ static int Init( filter_t *p_filter ) | ||
| 281 | const unsigned i_fmto_visible_width = p_fmto->i_visible_width * p_sys->i_extend_factor; | ||
| 282 | for( int n = 0; n < (cfg.b_has_a ? 2 : 1); n++ ) | ||
| 283 | { | ||
| 284 | - const int i_fmti = n == 0 ? cfg.i_fmti : PIX_FMT_GRAY8; | ||
| 285 | - const int i_fmto = n == 0 ? cfg.i_fmto : PIX_FMT_GRAY8; | ||
| 286 | + const int i_fmti = n == 0 ? cfg.i_fmti : AV_PIX_FMT_GRAY8; | ||
| 287 | + const int i_fmto = n == 0 ? cfg.i_fmto : AV_PIX_FMT_GRAY8; | ||
| 288 | struct SwsContext *ctx; | ||
| 289 | |||
| 290 | ctx = sws_getContext( i_fmti_visible_width, p_fmti->i_visible_height, i_fmti, | ||
| 291 | -- | ||
| 292 | 2.5.0 | ||
| 293 | |||
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc/0010-SWSCALE-fix-compilation-with-4.x.patch b/meta-multimedia/recipes-multimedia/vlc/vlc/0010-SWSCALE-fix-compilation-with-4.x.patch deleted file mode 100644 index 56744e7de8..0000000000 --- a/meta-multimedia/recipes-multimedia/vlc/vlc/0010-SWSCALE-fix-compilation-with-4.x.patch +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | From 6fa8a4a9bb64ff34328aae46acd600f8502b2c05 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jean-Baptiste Kempf <jb@videolan.org> | ||
| 3 | Date: Mon, 31 Aug 2015 09:07:39 +0200 | ||
| 4 | Subject: [PATCH] SWSCALE: fix compilation with 4.x | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | (cherry picked from commit 2b23857c68622edda76b72b74aeb3d943ee277c9) | ||
| 10 | Signed-off-by: Rafaël Carré <funman@videolan.org> | ||
| 11 | --- | ||
| 12 | modules/video_chroma/swscale.c | 3 +++ | ||
| 13 | 1 file changed, 3 insertions(+) | ||
| 14 | |||
| 15 | diff --git a/modules/video_chroma/swscale.c b/modules/video_chroma/swscale.c | ||
| 16 | index 4e0ecf1..26d0d6f 100644 | ||
| 17 | --- a/modules/video_chroma/swscale.c | ||
| 18 | +++ b/modules/video_chroma/swscale.c | ||
| 19 | @@ -36,6 +36,7 @@ | ||
| 20 | #include <vlc_cpu.h> | ||
| 21 | |||
| 22 | #include <libswscale/swscale.h> | ||
| 23 | +#include <libswscale/version.h> | ||
| 24 | |||
| 25 | #ifdef __APPLE__ | ||
| 26 | # include <TargetConditionals.h> | ||
| 27 | @@ -235,6 +236,7 @@ static int GetSwsCpuMask(void) | ||
| 28 | { | ||
| 29 | int i_sws_cpu = 0; | ||
| 30 | |||
| 31 | +#if LIBSWSCALE_VERSION_MAJOR < 4 | ||
| 32 | #if defined(__i386__) || defined(__x86_64__) | ||
| 33 | if( vlc_CPU_MMX() ) | ||
| 34 | i_sws_cpu |= SWS_CPU_CAPS_MMX; | ||
| 35 | @@ -248,6 +250,7 @@ static int GetSwsCpuMask(void) | ||
| 36 | if( vlc_CPU_ALTIVEC() ) | ||
| 37 | i_sws_cpu |= SWS_CPU_CAPS_ALTIVEC; | ||
| 38 | #endif | ||
| 39 | +#endif | ||
| 40 | |||
| 41 | return i_sws_cpu; | ||
| 42 | } | ||
| 43 | -- | ||
| 44 | 2.5.0 | ||
| 45 | |||
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc_2.2.2.bb b/meta-multimedia/recipes-multimedia/vlc/vlc_2.2.2.bb deleted file mode 100644 index b5be04cb91..0000000000 --- a/meta-multimedia/recipes-multimedia/vlc/vlc_2.2.2.bb +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | require ${BPN}.inc | ||
| 2 | |||
| 3 | # work around build failure | ||
| 4 | EXTRA_OECONF += " --enable-libxml2=no" | ||
| 5 | |||
| 6 | SRC_URI += "file://0001-enable-subdir-objects.patch \ | ||
| 7 | file://0002-glibc-does-not-provide-strlcpy.patch \ | ||
| 8 | file://0003-use-am-path-libgcrypt.patch \ | ||
| 9 | file://0004-modules-gui-qt4-out-of-tree-build.patch \ | ||
| 10 | file://0005-libpostproc-header-check.patch \ | ||
| 11 | file://0006-make-opencv-configurable.patch \ | ||
| 12 | file://0007-use-vorbisidec.patch \ | ||
| 13 | file://0008-fix-luaL-checkint.patch \ | ||
| 14 | file://0009-Avcodec-swscale-use-AV_PIX_FMT-consistently.patch \ | ||
| 15 | file://0010-SWSCALE-fix-compilation-with-4.x.patch \ | ||
| 16 | " | ||
| 17 | |||
| 18 | SRC_URI[md5sum] = "f98d60f0f59ef72b6e3407f2ff09bda6" | ||
| 19 | SRC_URI[sha256sum] = "9ad23128be16f9b40ed772961272cb0748ed8e4aa1bc79c129e589feebea5fb5" | ||
diff --git a/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.6.bb b/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.6.bb new file mode 100644 index 0000000000..95b6779fde --- /dev/null +++ b/meta-multimedia/recipes-multimedia/vlc/vlc_3.0.6.bb | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | require ${BPN}.inc | ||
| 2 | |||
| 3 | # work around build failure | ||
| 4 | EXTRA_OECONF += " --enable-libxml2=no" | ||
| 5 | |||
| 6 | SRC_URI += " \ | ||
| 7 | file://0002-glibc-does-not-provide-strlcpy.patch \ | ||
| 8 | file://0005-libpostproc-header-check.patch \ | ||
| 9 | file://0006-make-opencv-configurable.patch \ | ||
| 10 | file://0007-use-vorbisidec.patch \ | ||
| 11 | file://0008-fix-luaL-checkint.patch \ | ||
| 12 | " | ||
| 13 | SRC_URI[md5sum] = "4ff71d262e070fd19f86a1c3542c7b4e" | ||
| 14 | SRC_URI[sha256sum] = "18c16d4be0f34861d0aa51fbd274fb87f0cab3b7119757ead93f3db3a1f27ed3" | ||
