diff options
Diffstat (limited to 'meta-openembedded/meta-multimedia/recipes-multimedia/vlc')
13 files changed, 921 insertions, 0 deletions
diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/libdvdcss_1.3.0.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/libdvdcss_1.3.0.bb new file mode 100644 index 000000000..79e64aebd --- /dev/null +++ b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/libdvdcss_1.3.0.bb @@ -0,0 +1,12 @@ +DESCRIPTION = "libdvdcss is a simple library designed for accessing DVDs like a block device without having to bother about the decryption." +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +SRC_URI = "http://download.videolan.org/pub/libdvdcss/${PV}/libdvdcss-${PV}.tar.bz2" + +inherit autotools + +EXTRA_OECONF = " --disable-doc " + +SRC_URI[md5sum] = "7f0fdb3ff91d638f5e45ed7536f7eb67" +SRC_URI[sha256sum] = "7c414acd520c4e4dd7267952f72d738ff50321a7869af4d75c65aefad44f1395" diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc.inc b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc.inc new file mode 100644 index 000000000..8e82b3bd3 --- /dev/null +++ b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc.inc @@ -0,0 +1,113 @@ +DESCRIPTION = "Video player and streamer - davinci edition" +HOMEPAGE = "http://www.videolan.org" +SECTION = "multimedia" + +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "libfribidi libtool libgcrypt libgcrypt-native \ + dbus dbus-glib libxml2 gnutls \ + tremor faad2 ffmpeg flac fluidsynth alsa-lib \ + lua-native lua libidn \ + avahi jpeg xz libmodplug mpeg2dec \ + libmtp libopus orc libsamplerate0 libusb1 schroedinger taglib \ + tiff" + +# While this item does not require it, it depends on ffmpeg which does +LICENSE_FLAGS = "commercial" + +SRC_URI = "http://download.videolan.org/pub/videolan/${BPN}/${PV}/${BP}.tar.xz" + +inherit autotools gettext pkgconfig distro_features_check + +ARM_INSTRUCTION_SET = "arm" + +EXTRA_OECONF = "\ + --enable-run-as-root \ + --enable-xvideo \ + --disable-screen --disable-caca \ + --enable-httpd --enable-vlm \ + --enable-freetype \ + --enable-tremor \ + --enable-v4l2 --disable-aa --disable-faad \ + --enable-dbus \ + --without-contrib \ + --without-kde-solid \ + --enable-realrtsp \ + --disable-libtar \ + ac_cv_path_MOC=${STAGING_BINDIR_NATIVE}/moc4 \ + ac_cv_path_RCC=${STAGING_BINDIR_NATIVE}/rcc4 \ + ac_cv_path_UIC=${STAGING_BINDIR_NATIVE}/uic4 \ +" + +PACKAGECONFIG ?= " live555 dc1394 dv1394 notify fontconfig freetype dvdread png ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 sdl vdpau', '', d)}" +PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad" +PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,virtual/libsdl libsdl-image " +PACKAGECONFIG[a52] = "--enable-a52,--disable-a52,liba52" +PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" +PACKAGECONFIG[live555] = "--enable-live555,--disable-live555,live555" +PACKAGECONFIG[libass] = "--enable-libass,--disable-libass,libass" +PACKAGECONFIG[mkv] = "--enable-mkv,--disable-mkv,libmatroska libebml" +PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc,libpostproc" +PACKAGECONFIG[opencv] = "--enable-opencv,--disable-opencv,opencv" +PACKAGECONFIG[libva] = "--enable-libva --enable-avcodec,--disable-libva --disable-avcodec,libva libav" +PACKAGECONFIG[speex] = "--enable-speex,--disable-speex,speex" +PACKAGECONFIG[gstreamer] = "--enable-gst-decode,--disable-gst-decode,gstreamer1.0 gstreamer1.0-plugins-base gst-plugins-bad" +PACKAGECONFIG[vpx] = "--enable-vpx,--disable-vpx, libvpx" +PACKAGECONFIG[qt4] = "--enable-qt,--disable-qt, qt4-x11-free" +PACKAGECONFIG[freerdp] = "--enable-freerdp,--disable-freerdp, freerdp" +PACKAGECONFIG[dvbpsi] = "--enable-dvbpsi,--disable-dvbpsi, libdvbpsi" +PACKAGECONFIG[samba] = "--enable-smbclient,--disable-smbclient, samba" +PACKAGECONFIG[upnp] = "--enable-upnp,--disable-upnp,libupnp" +PACKAGECONFIG[dvdnav] = "--enable-dvdnav,--disable-dvdnav,libdvdnav libdvdcss" +PACKAGECONFIG[sftp] = "--enable-sftp,--disable-sftp,libssh2" +PACKAGECONFIG[vorbis] = "--enable-vorbis,--disable-vorbis,libvorbis libogg" +PACKAGECONFIG[ogg] = "--enable-ogg,--disable-ogg,libvorbis libogg" +PACKAGECONFIG[dc1394] = "--enable-dc1394,--disable-dc1394,libdc1394" +PACKAGECONFIG[dv1394] = "--enable-dv1394,--disable-dv1394,libraw1394 libavc1394" +PACKAGECONFIG[svg] = "--enable-svg,--disable-svg,librsvg" +PACKAGECONFIG[svgdec] = "--enable-svgdec,--disable-svgdec,librsvg cairo" +PACKAGECONFIG[notify] = "--enable-notify,--disable-notify, libnotify gtk+" +PACKAGECONFIG[fontconfig] = "--enable-fontconfig,--disable-fontconfig, fontconfig" +PACKAGECONFIG[freetype] = "--enable-freetype,--disable-freetype, freetype" +PACKAGECONFIG[dvdread] = "--enable-dvdread,--disable-dvdread, libdvdread libdvdcss" +PACKAGECONFIG[vnc] = "--enable-vnc,--disable-vnc, libvncserver" +PACKAGECONFIG[x11] = "--with-x --enable-xcb,--without-x --disable-xcb, xcb-util-keysyms libxpm libxinerama" +PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng" +PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" + +do_configure_prepend() { + cp ${STAGING_DATADIR}/libtool/config.* ${S}/autotools/ || true +} + +do_configure_append() { + sed -i -e s:'$(MOC) $(DEFS) $(CPPFLAGS)':'$(MOC) $(DEFS)'\ -I${B}/include\ -DSYS_LINUX:g ${B}/modules/gui/qt4/Makefile + sed -i -e s:'${top_builddir_slash}libtool':'${top_builddir_slash}'${TARGET_SYS}-libtool:g ${B}/doltlibtool +} + +# This recipe packages vlc as a library as well, so qt4 dependencies +# can be avoided when only the library is installed. +PACKAGES =+ "libvlc" + +LEAD_SONAME_libvlc = "libvlc.so.5" +FILES_libvlc = "${libdir}/lib*.so.*" + +FILES_${PN} += "\ + ${bindir}/vlc \ + ${datadir}/applications \ + ${datadir}/vlc/ \ + ${datadir}/icons \ + ${lindir}/vlc/vlc/libvlc_vdpau.so \ +" + +FILES_${PN}-dbg += "\ + ${libdir}/vlc/*/.debug \ + ${libdir}/vlc/plugins/*/.debug \ +" + +FILES_${PN}-staticdev += "\ + ${libdir}/vlc/plugins/*/*.a \ +" + +INSANE_SKIP_${PN} = "dev-so" + diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0001-enable-subdir-objects.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0001-enable-subdir-objects.patch new file mode 100644 index 000000000..9f0e708ed --- /dev/null +++ b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0001-enable-subdir-objects.patch @@ -0,0 +1,13 @@ +Index: vlc-2.1.2/configure.ac +=================================================================== +--- vlc-2.1.2.orig/configure.ac ++++ vlc-2.1.2/configure.ac +@@ -24,7 +24,7 @@ AC_CANONICAL_BUILD + AC_CANONICAL_HOST + AC_PRESERVE_HELP_ORDER + +-AM_INIT_AUTOMAKE(tar-ustar color-tests foreign) ++AM_INIT_AUTOMAKE(tar-ustar color-tests foreign subdir-objects) + AC_CONFIG_HEADERS([config.h]) + + # Disable with "./configure --disable-silent-rules" or "make V=1" diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0002-glibc-does-not-provide-strlcpy.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0002-glibc-does-not-provide-strlcpy.patch new file mode 100644 index 000000000..6d2a46fb3 --- /dev/null +++ b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0002-glibc-does-not-provide-strlcpy.patch @@ -0,0 +1,17 @@ +Index: vlc-2.1.2/src/input/subtitles.c +=================================================================== +--- vlc-2.1.2.orig/src/input/subtitles.c ++++ vlc-2.1.2/src/input/subtitles.c +@@ -44,6 +44,12 @@ + #include "input_internal.h" + + /** ++ * Drepper's alternative ++ * http://en.wikibooks.org/wiki/C_Programming/C_Reference/nonstandard/strlcpy ++ */ ++#define strlcpy(dst, src, n) *((char* ) mempcpy(dst, src, n)) = '\0' ++ ++/** + * We are not going to autodetect more subtitle files than this. + */ + #define MAX_SUBTITLE_FILES 128 diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0003-use-am-path-libgcrypt.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0003-use-am-path-libgcrypt.patch new file mode 100644 index 000000000..8e881d093 --- /dev/null +++ b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0003-use-am-path-libgcrypt.patch @@ -0,0 +1,46 @@ +* The upstream tests for libgcrypt are awkward and not working. + - Requires libgcrypt-config, which seems broken? +* AM_PATH_LIBGCRYPT exists for a reason, why not use it? KISS. +* Upstream abandoned AM_PATH_LIBGCRYPT in the past...newer automake ok? + +Upstream status: Pending + +Index: vlc-2.2.1/configure.ac +=================================================================== +--- vlc-2.2.1.orig/configure.ac ++++ vlc-2.2.1/configure.ac +@@ -4017,25 +4017,19 @@ PKG_ENABLE_MODULES_VLC([LIBXML2], [xml], + dnl + dnl libgcrypt + dnl ++GCRYPT_LIBVER=1 ++GCRYPT_REQ=1.1.94 + AC_ARG_ENABLE(libgcrypt, + [ --disable-libgcrypt gcrypt support (default enabled)]) + AS_IF([test "${enable_libgcrypt}" != "no"], [ +- AC_CHECK_DECL([GCRYCTL_SET_THREAD_CBS], [ +- libgcrypt-config --version >/dev/null || \ +- AC_MSG_ERROR([gcrypt.h present but libgcrypt-config could not be found]) +- AC_CHECK_LIB(gcrypt, gcry_control, [ +- have_libgcrypt="yes" +- GCRYPT_CFLAGS="`libgcrypt-config --cflags`" +- GCRYPT_LIBS="`libgcrypt-config --libs`" +- ], [ +- AC_MSG_ERROR([libgcrypt not found. Install libgcrypt or pass --disable-libgcrypt.]) +- ], [`libgcrypt-config --libs`]) +- ], [ +- AC_MSG_ERROR([libgcrypt version 1.1.94 or higher not found. Install libgcrypt or pass --disable-libgcrypt.]) +- ], [#include <gcrypt.h>] +- ) ++ AM_PATH_LIBGCRYPT($GCRYPT_LIBVER:$GCRYPT_REQ, ++ [ ++ GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS" ++ GCRYPT_LIBS="$LIBGCRYPT_LIBS" ++ ],[ ++ AC_MSG_ERROR([libgcrypt version 1.1.94 or higher not found. Install libgcrypt or use --disable-libgcrypt. Have a nice day.]) ++ ]) + ]) +- + AC_SUBST(GCRYPT_CFLAGS) + AC_SUBST(GCRYPT_LIBS) + AM_CONDITIONAL([HAVE_GCRYPT], [test "${have_libgcrypt}" = "yes"]) diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0004-modules-gui-qt4-out-of-tree-build.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0004-modules-gui-qt4-out-of-tree-build.patch new file mode 100644 index 000000000..53df1c6eb --- /dev/null +++ b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0004-modules-gui-qt4-out-of-tree-build.patch @@ -0,0 +1,19 @@ +* modules/gui/qt4/Makefile.am not B!=S friendly +* Simple solution to missing directories in ${B} + +Upstream status: Pending + +Signed-off-by: Tim Orling <TicoTimo@gmail.com> + +Index: vlc-2.2.1/modules/gui/qt4/Makefile.am +=================================================================== +--- vlc-2.2.1.orig/modules/gui/qt4/Makefile.am ++++ vlc-2.2.1/modules/gui/qt4/Makefile.am +@@ -127,6 +127,7 @@ moc_verbose_0 = @echo " MOC " $@; + moc_verbose__0 = $(moc_verbose_0) + + .hpp.moc.cpp: ++ [ -d $(dir $@) ] || mkdir -p $(dir $@) + $(moc_verbose)$(MOC) $(MOC_CPPFLAGS) -o $@ $< + + # These MOC files depend on the configure settings: diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0005-libpostproc-header-check.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0005-libpostproc-header-check.patch new file mode 100644 index 000000000..2d84ffd2f --- /dev/null +++ b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0005-libpostproc-header-check.patch @@ -0,0 +1,17 @@ +* Also look for postprocess.h under libpostproc/ + +Upstream-status: Pending + +Index: vlc-2.1.4/configure.ac +=================================================================== +--- vlc-2.1.4.orig/configure.ac ++++ vlc-2.1.4/configure.ac +@@ -2444,7 +2444,7 @@ then + VLC_SAVE_FLAGS + CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}" + CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}" +- AC_CHECK_HEADERS(postproc/postprocess.h) ++ AC_CHECK_HEADERS(postproc/postprocess.h,[],[AC_CHECK_HEADERS(libpostproc/postprocess.h)]) + VLC_ADD_PLUGIN([postproc]) + VLC_ADD_LIBS([postproc],[$POSTPROC_LIBS $AVUTIL_LIBS]) + VLC_ADD_CFLAGS([postproc],[$POSTPROC_CFLAGS $AVUTIL_CFLAGS]) diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0006-make-opencv-configurable.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0006-make-opencv-configurable.patch new file mode 100644 index 000000000..950c09b8a --- /dev/null +++ b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0006-make-opencv-configurable.patch @@ -0,0 +1,29 @@ +Recent opencv API changes break upstream filter and example. +Make opencv explicitly configurable. + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Tim Orling <TicoTimo@gmail.com> + +Index: vlc-2.1.4/configure.ac +=================================================================== +--- vlc-2.1.4.orig/configure.ac ++++ vlc-2.1.4/configure.ac +@@ -1693,7 +1693,16 @@ PKG_ENABLE_MODULES_VLC([BLURAY], [libblu + dnl + dnl OpenCV wrapper and example filters + dnl +-PKG_ENABLE_MODULES_VLC([OPENCV], [opencv_example opencv_wrapper], [opencv > 2.0], (OpenCV (computer vision) filter), [auto]) ++AC_ARG_ENABLE(opencv, ++ [AS_HELP_STRING([--disable-opencv], ++ [disable OpenCV computer vision filter and example (default auto)])]) ++if test "${enable_opencv}" != "no" ++then ++ PKG_ENABLE_MODULES_VLC([OPENCV], ++ [opencv_example opencv_wrapper], ++ [opencv > 2.0], ++ (OpenCV (computer vision) filter), [auto]) ++fi + + + dnl diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0007-use-vorbisidec.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0007-use-vorbisidec.patch new file mode 100644 index 000000000..d05cf02b7 --- /dev/null +++ b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0007-use-vorbisidec.patch @@ -0,0 +1,19 @@ +* tremor provides libvorbisidec, use it instead of libvorbisdec + +Upstream-status: Pending + +Signed-off-by: Tim Orling <TicoTimo@gmail.com> + +Index: vlc-2.2.1/modules/codec/Makefile.am +=================================================================== +--- vlc-2.2.1.orig/modules/codec/Makefile.am ++++ vlc-2.2.1/modules/codec/Makefile.am +@@ -234,7 +234,7 @@ codec_LTLIBRARIES += $(LTLIBtheora) + libtremor_plugin_la_SOURCES = codec/vorbis.c + libtremor_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DMODULE_NAME_IS_tremor + libtremor_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)' +-libtremor_plugin_la_LIBADD = -lvorbisdec -logg ++libtremor_plugin_la_LIBADD = -lvorbisidec -logg + EXTRA_LTLIBRARIES += libtremor_plugin.la + codec_LTLIBRARIES += $(LTLIBtremor) + diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch new file mode 100644 index 000000000..145e1ab82 --- /dev/null +++ b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch @@ -0,0 +1,279 @@ +* luaL_checkint and luaL_optint were deprecated in lua 5.3 +* replacement functions are luaL_checkinteger and luaL_optinteger + +Upstream-status: Pending + +Signed-off-by: Tim Orling <TicoTimo@gmail.com> + +Index: vlc-2.2.1/modules/lua/demux.c +=================================================================== +--- vlc-2.2.1.orig/modules/lua/demux.c ++++ vlc-2.2.1/modules/lua/demux.c +@@ -52,7 +52,7 @@ struct demux_sys_t + static int vlclua_demux_peek( lua_State *L ) + { + demux_t *p_demux = (demux_t *)vlclua_get_this( L ); +- int n = luaL_checkint( L, 1 ); ++ int n = luaL_checkinteger( L, 1 ); + const uint8_t *p_peek; + + int i_peek = stream_Peek( p_demux->s, &p_peek, n ); +@@ -67,7 +67,7 @@ static int vlclua_demux_read( lua_State + { + demux_t *p_demux = (demux_t *)vlclua_get_this( L ); + const uint8_t *p_read; +- int n = luaL_checkint( L, 1 ); ++ int n = luaL_checkinteger( L, 1 ); + int i_read = stream_Peek( p_demux->s, &p_read, n ); + + if( i_read > 0 ) +Index: vlc-2.2.1/modules/lua/libs/configuration.c +=================================================================== +--- vlc-2.2.1.orig/modules/lua/libs/configuration.c ++++ vlc-2.2.1/modules/lua/libs/configuration.c +@@ -84,7 +84,7 @@ static int vlclua_config_set( lua_State + break; + + case VLC_VAR_INTEGER: +- config_PutInt( p_this, psz_name, luaL_checkint( L, 2 ) ); ++ config_PutInt( p_this, psz_name, luaL_checkinteger( L, 2 ) ); + break; + + case VLC_VAR_BOOL: +Index: vlc-2.2.1/modules/lua/libs/net.c +=================================================================== +--- vlc-2.2.1.orig/modules/lua/libs/net.c ++++ vlc-2.2.1/modules/lua/libs/net.c +@@ -202,7 +202,7 @@ static int vlclua_net_listen_tcp( lua_St + { + vlc_object_t *p_this = vlclua_get_this( L ); + const char *psz_host = luaL_checkstring( L, 1 ); +- int i_port = luaL_checkint( L, 2 ); ++ int i_port = luaL_checkinteger( L, 2 ); + int *pi_fd = net_ListenTCP( p_this, psz_host, i_port ); + if( pi_fd == NULL ) + return luaL_error( L, "Cannot listen on %s:%d", psz_host, i_port ); +@@ -274,7 +274,7 @@ static int vlclua_net_connect_tcp( lua_S + { + vlc_object_t *p_this = vlclua_get_this( L ); + const char *psz_host = luaL_checkstring( L, 1 ); +- int i_port = luaL_checkint( L, 2 ); ++ int i_port = luaL_checkinteger( L, 2 ); + int i_fd = net_Connect( p_this, psz_host, i_port, SOCK_STREAM, IPPROTO_TCP ); + lua_pushinteger( L, vlclua_fd_map_safe( L, i_fd ) ); + return 1; +@@ -282,26 +282,26 @@ static int vlclua_net_connect_tcp( lua_S + + static int vlclua_net_close( lua_State *L ) + { +- int i_fd = luaL_checkint( L, 1 ); ++ int i_fd = luaL_checkinteger( L, 1 ); + vlclua_fd_unmap_safe( L, i_fd ); + return 0; + } + + static int vlclua_net_send( lua_State *L ) + { +- int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); ++ int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); + size_t i_len; + const char *psz_buffer = luaL_checklstring( L, 2, &i_len ); + +- i_len = luaL_optint( L, 3, i_len ); ++ i_len = luaL_optinteger( L, 3, i_len ); + lua_pushinteger( L, (fd != -1) ? send( fd, psz_buffer, i_len, 0 ) : -1 ); + return 1; + } + + static int vlclua_net_recv( lua_State *L ) + { +- int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); +- size_t i_len = luaL_optint( L, 2, 1 ); ++ int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); ++ size_t i_len = luaL_optinteger( L, 2, 1 ); + char psz_buffer[i_len]; + + ssize_t i_ret = (fd != -1) ? recv( fd, psz_buffer, i_len, 0 ) : -1; +@@ -382,19 +382,19 @@ static int vlclua_fd_open( lua_State *L + #ifndef _WIN32 + static int vlclua_fd_write( lua_State *L ) + { +- int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); ++ int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); + size_t i_len; + const char *psz_buffer = luaL_checklstring( L, 2, &i_len ); + +- i_len = luaL_optint( L, 3, i_len ); ++ i_len = luaL_optinteger( L, 3, i_len ); + lua_pushinteger( L, (fd != -1) ? write( fd, psz_buffer, i_len ) : -1 ); + return 1; + } + + static int vlclua_fd_read( lua_State *L ) + { +- int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); +- size_t i_len = luaL_optint( L, 2, 1 ); ++ int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); ++ size_t i_len = luaL_optinteger( L, 2, 1 ); + char psz_buffer[i_len]; + + ssize_t i_ret = (fd != -1) ? read( fd, psz_buffer, i_len ) : -1; +Index: vlc-2.2.1/modules/lua/libs/osd.c +=================================================================== +--- vlc-2.2.1.orig/modules/lua/libs/osd.c ++++ vlc-2.2.1/modules/lua/libs/osd.c +@@ -67,7 +67,7 @@ static int vlclua_osd_icon( lua_State *L + { + const char *psz_icon = luaL_checkstring( L, 1 ); + int i_icon = vlc_osd_icon_from_string( psz_icon ); +- int i_chan = luaL_optint( L, 2, SPU_DEFAULT_CHANNEL ); ++ int i_chan = luaL_optinteger( L, 2, SPU_DEFAULT_CHANNEL ); + if( !i_icon ) + return luaL_error( L, "\"%s\" is not a valid osd icon.", psz_icon ); + +@@ -114,9 +114,9 @@ static int vlc_osd_position_from_string( + static int vlclua_osd_message( lua_State *L ) + { + const char *psz_message = luaL_checkstring( L, 1 ); +- int i_chan = luaL_optint( L, 2, SPU_DEFAULT_CHANNEL ); ++ int i_chan = luaL_optinteger( L, 2, SPU_DEFAULT_CHANNEL ); + const char *psz_position = luaL_optstring( L, 3, "top-right" ); +- mtime_t duration = luaL_optint( L, 4, 1000000 ); ++ mtime_t duration = luaL_optinteger( L, 4, 1000000 ); + + input_thread_t *p_input = vlclua_get_input_internal( L ); + if( p_input ) +@@ -154,10 +154,10 @@ static int vlc_osd_slider_type_from_stri + + static int vlclua_osd_slider( lua_State *L ) + { +- int i_position = luaL_checkint( L, 1 ); ++ int i_position = luaL_checkinteger( L, 1 ); + const char *psz_type = luaL_checkstring( L, 2 ); + int i_type = vlc_osd_slider_type_from_string( psz_type ); +- int i_chan = luaL_optint( L, 3, SPU_DEFAULT_CHANNEL ); ++ int i_chan = luaL_optinteger( L, 3, SPU_DEFAULT_CHANNEL ); + if( !i_type ) + return luaL_error( L, "\"%s\" is not a valid slider type.", + psz_type ); +@@ -198,7 +198,7 @@ static int vlclua_spu_channel_register( + + static int vlclua_spu_channel_clear( lua_State *L ) + { +- int i_chan = luaL_checkint( L, 1 ); ++ int i_chan = luaL_checkinteger( L, 1 ); + input_thread_t *p_input = vlclua_get_input_internal( L ); + if( !p_input ) + return luaL_error( L, "Unable to find input." ); +Index: vlc-2.2.1/modules/lua/libs/playlist.c +=================================================================== +--- vlc-2.2.1.orig/modules/lua/libs/playlist.c ++++ vlc-2.2.1/modules/lua/libs/playlist.c +@@ -69,7 +69,7 @@ static int vlclua_playlist_next( lua_Sta + + static int vlclua_playlist_skip( lua_State * L ) + { +- int i_skip = luaL_checkint( L, 1 ); ++ int i_skip = luaL_checkinteger( L, 1 ); + playlist_t *p_playlist = vlclua_get_playlist_internal( L ); + playlist_Skip( p_playlist, i_skip ); + return 0; +@@ -127,7 +127,7 @@ static int vlclua_playlist_random( lua_S + + static int vlclua_playlist_gotoitem( lua_State * L ) + { +- int i_id = luaL_checkint( L, 1 ); ++ int i_id = luaL_checkinteger( L, 1 ); + playlist_t *p_playlist = vlclua_get_playlist_internal( L ); + PL_LOCK; + int i_ret = playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, +@@ -139,7 +139,7 @@ static int vlclua_playlist_gotoitem( lua + + static int vlclua_playlist_delete( lua_State * L ) + { +- int i_id = luaL_checkint( L, 1 ); ++ int i_id = luaL_checkinteger( L, 1 ); + playlist_t *p_playlist = vlclua_get_playlist_internal( L ); + PL_LOCK; + playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_id ); +@@ -155,8 +155,8 @@ static int vlclua_playlist_delete( lua_S + + static int vlclua_playlist_move( lua_State * L ) + { +- int i_item = luaL_checkint( L, 1 ); +- int i_target = luaL_checkint( L, 2 ); ++ int i_item = luaL_checkinteger( L, 1 ); ++ int i_target = luaL_checkinteger( L, 2 ); + playlist_t *p_playlist = vlclua_get_playlist_internal( L ); + PL_LOCK; + playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_item ); +Index: vlc-2.2.1/modules/lua/libs/stream.c +=================================================================== +--- vlc-2.2.1.orig/modules/lua/libs/stream.c ++++ vlc-2.2.1/modules/lua/libs/stream.c +@@ -101,7 +101,7 @@ static int vlclua_stream_read( lua_State + { + int i_read; + stream_t **pp_stream = (stream_t **)luaL_checkudata( L, 1, "stream" ); +- int n = luaL_checkint( L, 2 ); ++ int n = luaL_checkinteger( L, 2 ); + uint8_t *p_read = malloc( n ); + if( !p_read ) return vlclua_error( L ); + +Index: vlc-2.2.1/modules/lua/libs/variables.c +=================================================================== +--- vlc-2.2.1.orig/modules/lua/libs/variables.c ++++ vlc-2.2.1/modules/lua/libs/variables.c +@@ -103,7 +103,7 @@ static int vlclua_tovalue( lua_State *L, + val->b_bool = luaL_checkboolean( L, -1 ); + break; + case VLC_VAR_INTEGER: +- val->i_int = luaL_checkint( L, -1 ); ++ val->i_int = luaL_checkinteger( L, -1 ); + break; + case VLC_VAR_STRING: + val->psz_string = (char*)luaL_checkstring( L, -1 ); /* XXX: Beware, this only stays valid as long as (L,-1) stays in the stack */ +Index: vlc-2.2.1/modules/lua/libs/volume.c +=================================================================== +--- vlc-2.2.1.orig/modules/lua/libs/volume.c ++++ vlc-2.2.1/modules/lua/libs/volume.c +@@ -48,7 +48,7 @@ + static int vlclua_volume_set( lua_State *L ) + { + playlist_t *p_this = vlclua_get_playlist_internal( L ); +- int i_volume = luaL_checkint( L, 1 ); ++ int i_volume = luaL_checkinteger( L, 1 ); + if( i_volume < 0 ) + i_volume = 0; + int i_ret = playlist_VolumeSet( p_this, i_volume/(float)AOUT_VOLUME_DEFAULT ); +@@ -68,7 +68,7 @@ static int vlclua_volume_up( lua_State * + playlist_t *p_this = vlclua_get_playlist_internal( L ); + float volume; + +- playlist_VolumeUp( p_this, luaL_optint( L, 1, 1 ), &volume ); ++ playlist_VolumeUp( p_this, luaL_optinteger( L, 1, 1 ), &volume ); + lua_pushnumber( L, lroundf(volume * AOUT_VOLUME_DEFAULT) ); + return 1; + } +@@ -78,7 +78,7 @@ static int vlclua_volume_down( lua_State + playlist_t *p_this = vlclua_get_playlist_internal( L ); + float volume; + +- playlist_VolumeDown( p_this, luaL_optint( L, 1, 1 ), &volume ); ++ playlist_VolumeDown( p_this, luaL_optinteger( L, 1, 1 ), &volume ); + lua_pushnumber( L, lroundf(volume * AOUT_VOLUME_DEFAULT) ); + return 1; + } +Index: vlc-2.2.1/modules/lua/libs/win.c +=================================================================== +--- vlc-2.2.1.orig/modules/lua/libs/win.c ++++ vlc-2.2.1/modules/lua/libs/win.c +@@ -123,7 +123,7 @@ static int vlclua_console_init( lua_Stat + + static int vlclua_console_wait( lua_State *L ) + { +- int i_timeout = luaL_optint( L, 1, 0 ); ++ int i_timeout = luaL_optinteger( L, 1, 0 ); + DWORD status = WaitForSingleObject( GetConsole( L ), i_timeout ); + lua_pushboolean( L, status == WAIT_OBJECT_0 ); + return 1; diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0009-Avcodec-swscale-use-AV_PIX_FMT-consistently.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0009-Avcodec-swscale-use-AV_PIX_FMT-consistently.patch new file mode 100644 index 000000000..cb3ba71dd --- /dev/null +++ b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0009-Avcodec-swscale-use-AV_PIX_FMT-consistently.patch @@ -0,0 +1,293 @@ +From 427732a379893491eac27aeadff0e0b3e252d158 Mon Sep 17 00:00:00 2001 +From: Jean-Baptiste Kempf <jb@videolan.org> +Date: Mon, 31 Aug 2015 08:19:00 +0200 +Subject: [PATCH] Avcodec/swscale: use AV_PIX_FMT consistently +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +(cherry picked from commit faa7bd357b1f9e07a6ffbc451a188773fad7a275) +Signed-off-by: Rafaël Carré <funman@videolan.org> + +Conflicts: + modules/codec/avcodec/chroma.c + modules/codec/avcodec/video.c +--- + modules/codec/avcodec/chroma.c | 104 ++++++++++++++++++++--------------------- + modules/codec/avcodec/video.c | 10 ++-- + modules/video_chroma/swscale.c | 28 +++++------ + 3 files changed, 71 insertions(+), 71 deletions(-) + +diff --git a/modules/codec/avcodec/chroma.c b/modules/codec/avcodec/chroma.c +index 393364b..c31f93d 100644 +--- a/modules/codec/avcodec/chroma.c ++++ b/modules/codec/avcodec/chroma.c +@@ -62,77 +62,77 @@ static const struct + } chroma_table[] = + { + /* Planar YUV formats */ +- {VLC_CODEC_I444, PIX_FMT_YUV444P, 0, 0, 0 }, +- {VLC_CODEC_J444, PIX_FMT_YUVJ444P, 0, 0, 0 }, +- +- {VLC_CODEC_I440, PIX_FMT_YUV440P, 0, 0, 0 }, +- {VLC_CODEC_J440, PIX_FMT_YUVJ440P, 0, 0, 0 }, +- +- {VLC_CODEC_I422, PIX_FMT_YUV422P, 0, 0, 0 }, +- {VLC_CODEC_J422, PIX_FMT_YUVJ422P, 0, 0, 0 }, +- +- {VLC_CODEC_I420, PIX_FMT_YUV420P, 0, 0, 0 }, +- {VLC_CODEC_YV12, PIX_FMT_YUV420P, 0, 0, 0 }, +- {VLC_FOURCC('I','Y','U','V'), PIX_FMT_YUV420P, 0, 0, 0 }, +- {VLC_CODEC_J420, PIX_FMT_YUVJ420P, 0, 0, 0 }, +- {VLC_CODEC_I411, PIX_FMT_YUV411P, 0, 0, 0 }, +- {VLC_CODEC_I410, PIX_FMT_YUV410P, 0, 0, 0 }, +- {VLC_FOURCC('Y','V','U','9'), PIX_FMT_YUV410P, 0, 0, 0 }, +- +- {VLC_FOURCC('N','V','1','2'), PIX_FMT_NV12, 0, 0, 0 }, +- {VLC_FOURCC('N','V','2','1'), PIX_FMT_NV21, 0, 0, 0 }, +- +- {VLC_CODEC_I420_9L, PIX_FMT_YUV420P9LE, 0, 0, 0 }, +- {VLC_CODEC_I420_9B, PIX_FMT_YUV420P9BE, 0, 0, 0 }, +- {VLC_CODEC_I420_10L, PIX_FMT_YUV420P10LE, 0, 0, 0 }, +- {VLC_CODEC_I420_10B, PIX_FMT_YUV420P10BE, 0, 0, 0 }, ++ {VLC_CODEC_I444, AV_PIX_FMT_YUV444P, 0, 0, 0 }, ++ {VLC_CODEC_J444, AV_PIX_FMT_YUVJ444P, 0, 0, 0 }, ++ ++ {VLC_CODEC_I440, AV_PIX_FMT_YUV440P, 0, 0, 0 }, ++ {VLC_CODEC_J440, AV_PIX_FMT_YUVJ440P, 0, 0, 0 }, ++ ++ {VLC_CODEC_I422, AV_PIX_FMT_YUV422P, 0, 0, 0 }, ++ {VLC_CODEC_J422, AV_PIX_FMT_YUVJ422P, 0, 0, 0 }, ++ ++ {VLC_CODEC_I420, AV_PIX_FMT_YUV420P, 0, 0, 0 }, ++ {VLC_CODEC_YV12, AV_PIX_FMT_YUV420P, 0, 0, 0 }, ++ {VLC_FOURCC('I','Y','U','V'), AV_PIX_FMT_YUV420P, 0, 0, 0 }, ++ {VLC_CODEC_J420, AV_PIX_FMT_YUVJ420P, 0, 0, 0 }, ++ {VLC_CODEC_I411, AV_PIX_FMT_YUV411P, 0, 0, 0 }, ++ {VLC_CODEC_I410, AV_PIX_FMT_YUV410P, 0, 0, 0 }, ++ {VLC_FOURCC('Y','V','U','9'), AV_PIX_FMT_YUV410P, 0, 0, 0 }, ++ ++ {VLC_FOURCC('N','V','1','2'), AV_PIX_FMT_NV12, 0, 0, 0 }, ++ {VLC_FOURCC('N','V','2','1'), AV_PIX_FMT_NV21, 0, 0, 0 }, ++ ++ {VLC_CODEC_I420_9L, AV_PIX_FMT_YUV420P9LE, 0, 0, 0 }, ++ {VLC_CODEC_I420_9B, AV_PIX_FMT_YUV420P9BE, 0, 0, 0 }, ++ {VLC_CODEC_I420_10L, AV_PIX_FMT_YUV420P10LE, 0, 0, 0 }, ++ {VLC_CODEC_I420_10B, AV_PIX_FMT_YUV420P10BE, 0, 0, 0 }, + #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51,13,0) +- {VLC_CODEC_I422_9L, PIX_FMT_YUV422P9LE, 0, 0, 0 }, +- {VLC_CODEC_I422_9B, PIX_FMT_YUV422P9BE, 0, 0, 0 }, ++ {VLC_CODEC_I422_9L, AV_PIX_FMT_YUV422P9LE, 0, 0, 0 }, ++ {VLC_CODEC_I422_9B, AV_PIX_FMT_YUV422P9BE, 0, 0, 0 }, + #endif +- {VLC_CODEC_I422_10L, PIX_FMT_YUV422P10LE, 0, 0, 0 }, +- {VLC_CODEC_I422_10B, PIX_FMT_YUV422P10BE, 0, 0, 0 }, ++ {VLC_CODEC_I422_10L, AV_PIX_FMT_YUV422P10LE, 0, 0, 0 }, ++ {VLC_CODEC_I422_10B, AV_PIX_FMT_YUV422P10BE, 0, 0, 0 }, + +- {VLC_CODEC_YUV420A, PIX_FMT_YUVA420P, 0, 0, 0 }, ++ {VLC_CODEC_YUV420A, AV_PIX_FMT_YUVA420P, 0, 0, 0 }, + #if LIBAVUTIL_VERSION_CHECK( 51, 45, 0, 74, 100 ) + {VLC_CODEC_YUV422A, AV_PIX_FMT_YUVA422P, 0, 0, 0 }, + #endif + +- {VLC_CODEC_I444_9L, PIX_FMT_YUV444P9LE, 0, 0, 0 }, +- {VLC_CODEC_I444_9B, PIX_FMT_YUV444P9BE, 0, 0, 0 }, +- {VLC_CODEC_I444_10L, PIX_FMT_YUV444P10LE, 0, 0, 0 }, +- {VLC_CODEC_I444_10B, PIX_FMT_YUV444P10BE, 0, 0, 0 }, +- {VLC_CODEC_I444_16L, PIX_FMT_YUV444P16LE, 0, 0, 0 }, +- {VLC_CODEC_I444_16B, PIX_FMT_YUV444P16BE, 0, 0, 0 }, ++ {VLC_CODEC_I444_9L, AV_PIX_FMT_YUV444P9LE, 0, 0, 0 }, ++ {VLC_CODEC_I444_9B, AV_PIX_FMT_YUV444P9BE, 0, 0, 0 }, ++ {VLC_CODEC_I444_10L, AV_PIX_FMT_YUV444P10LE, 0, 0, 0 }, ++ {VLC_CODEC_I444_10B, AV_PIX_FMT_YUV444P10BE, 0, 0, 0 }, ++ {VLC_CODEC_I444_16L, AV_PIX_FMT_YUV444P16LE, 0, 0, 0 }, ++ {VLC_CODEC_I444_16B, AV_PIX_FMT_YUV444P16BE, 0, 0, 0 }, + + /* Packed YUV formats */ +- {VLC_CODEC_YUYV, PIX_FMT_YUYV422, 0, 0, 0 }, +- {VLC_FOURCC('Y','U','Y','V'), PIX_FMT_YUYV422, 0, 0, 0 }, +- {VLC_CODEC_UYVY, PIX_FMT_UYVY422, 0, 0, 0 }, +- {VLC_FOURCC('Y','4','1','1'), PIX_FMT_UYYVYY411, 0, 0, 0 }, ++ {VLC_CODEC_YUYV, AV_PIX_FMT_YUYV422, 0, 0, 0 }, ++ {VLC_FOURCC('Y','U','Y','V'), AV_PIX_FMT_YUYV422, 0, 0, 0 }, ++ {VLC_CODEC_UYVY, AV_PIX_FMT_UYVY422, 0, 0, 0 }, ++ {VLC_FOURCC('Y','4','1','1'), AV_PIX_FMT_UYYVYY411, 0, 0, 0 }, + + /* Packed RGB formats */ +- VLC_RGB( VLC_FOURCC('R','G','B','4'), PIX_FMT_RGB4, PIX_FMT_BGR4, 0x10, 0x06, 0x01 ) +- VLC_RGB( VLC_FOURCC('R','G','B','8'), PIX_FMT_RGB8, PIX_FMT_BGR8, 0xC0, 0x38, 0x07 ) ++ VLC_RGB( VLC_FOURCC('R','G','B','4'), AV_PIX_FMT_RGB4, AV_PIX_FMT_BGR4, 0x10, 0x06, 0x01 ) ++ VLC_RGB( VLC_FOURCC('R','G','B','8'), AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, 0xC0, 0x38, 0x07 ) + +- VLC_RGB( VLC_CODEC_RGB15, PIX_FMT_RGB555, PIX_FMT_BGR555, 0x7c00, 0x03e0, 0x001f ) +- VLC_RGB( VLC_CODEC_RGB16, PIX_FMT_RGB565, PIX_FMT_BGR565, 0xf800, 0x07e0, 0x001f ) +- VLC_RGB( VLC_CODEC_RGB24, PIX_FMT_BGR24, PIX_FMT_RGB24, 0xff0000, 0x00ff00, 0x0000ff ) ++ VLC_RGB( VLC_CODEC_RGB15, AV_PIX_FMT_RGB555, AV_PIX_FMT_BGR555, 0x7c00, 0x03e0, 0x001f ) ++ VLC_RGB( VLC_CODEC_RGB16, AV_PIX_FMT_RGB565, AV_PIX_FMT_BGR565, 0xf800, 0x07e0, 0x001f ) ++ VLC_RGB( VLC_CODEC_RGB24, AV_PIX_FMT_BGR24, AV_PIX_FMT_RGB24, 0xff0000, 0x00ff00, 0x0000ff ) + +- VLC_RGB( VLC_CODEC_RGB32, PIX_FMT_RGB32, PIX_FMT_BGR32, 0x00ff0000, 0x0000ff00, 0x000000ff ) +- VLC_RGB( VLC_CODEC_RGB32, PIX_FMT_RGB32_1, PIX_FMT_BGR32_1, 0xff000000, 0x00ff0000, 0x0000ff00 ) ++ VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_RGB32, AV_PIX_FMT_BGR32, 0x00ff0000, 0x0000ff00, 0x000000ff ) ++ VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_RGB32_1, AV_PIX_FMT_BGR32_1, 0xff000000, 0x00ff0000, 0x0000ff00 ) + + #ifdef AV_PIX_FMT_0BGR32 + VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_0BGR32, AV_PIX_FMT_0RGB32, 0x000000ff, 0x0000ff00, 0x00ff0000 ) + #endif + +- {VLC_CODEC_RGBA, PIX_FMT_RGBA, 0, 0, 0 }, +- {VLC_CODEC_ARGB, PIX_FMT_ARGB, 0, 0, 0 }, +- {VLC_CODEC_BGRA, PIX_FMT_BGRA, 0, 0, 0 }, +- {VLC_CODEC_GREY, PIX_FMT_GRAY8, 0, 0, 0}, ++ {VLC_CODEC_RGBA, AV_PIX_FMT_RGBA, 0, 0, 0 }, ++ {VLC_CODEC_ARGB, AV_PIX_FMT_ARGB, 0, 0, 0 }, ++ {VLC_CODEC_BGRA, AV_PIX_FMT_BGRA, 0, 0, 0 }, ++ {VLC_CODEC_GREY, AV_PIX_FMT_GRAY8, 0, 0, 0}, + + /* Paletized RGB */ +- {VLC_CODEC_RGBP, PIX_FMT_PAL8, 0, 0, 0}, ++ {VLC_CODEC_RGBP, AV_PIX_FMT_PAL8, 0, 0, 0}, + + #if LIBAVUTIL_VERSION_CHECK(51, 42, 0, 74,100) + {VLC_CODEC_GBR_PLANAR, AV_PIX_FMT_GBRP, 0, 0, 0 }, +@@ -201,5 +201,5 @@ int FindFfmpegChroma( vlc_fourcc_t fourcc ) + for( int i = 0; chroma_table[i].i_chroma != 0; i++ ) + if( chroma_table[i].i_chroma == fourcc ) + return chroma_table[i].i_chroma_id; +- return PIX_FMT_NONE; ++ return AV_PIX_FMT_NONE; + } +diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c +index c115db9..ae600e8 100644 +--- a/modules/codec/avcodec/video.c ++++ b/modules/codec/avcodec/video.c +@@ -1004,7 +1004,7 @@ static picture_t *lavc_dr_GetFrame(struct AVCodecContext *ctx, + if (GetVlcChroma(&dec->fmt_out.video, ctx->pix_fmt) != VLC_SUCCESS) + return NULL; + dec->fmt_out.i_codec = dec->fmt_out.video.i_chroma; +- if (ctx->pix_fmt == PIX_FMT_PAL8) ++ if (ctx->pix_fmt == AV_PIX_FMT_PAL8) + return NULL; + + int width = frame->width; +@@ -1180,7 +1180,7 @@ static picture_t *ffmpeg_dr_GetFrameBuf(struct AVCodecContext *p_context) + if (GetVlcChroma(&p_dec->fmt_out.video, p_context->pix_fmt) != VLC_SUCCESS) + goto no_dr; + +- if (p_context->pix_fmt == PIX_FMT_PAL8) ++ if (p_context->pix_fmt == AV_PIX_FMT_PAL8) + goto no_dr; + + p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma; +@@ -1215,7 +1215,7 @@ static picture_t *ffmpeg_dr_GetFrameBuf(struct AVCodecContext *p_context) + goto no_dr; + } + +- if( p_context->pix_fmt == PIX_FMT_YUV422P ) ++ if( p_context->pix_fmt == AV_PIX_FMT_YUV422P ) + { + if( 2 * p_pic->p[1].i_pitch != p_pic->p[0].i_pitch || + 2 * p_pic->p[2].i_pitch != p_pic->p[0].i_pitch ) +@@ -1325,7 +1325,7 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context, + + /* Enumerate available formats */ + bool can_hwaccel = false; +- for( size_t i = 0; pi_fmt[i] != PIX_FMT_NONE; i++ ) ++ for( size_t i = 0; pi_fmt[i] != AV_PIX_FMT_NONE; i++ ) + { + const AVPixFmtDescriptor *dsc = av_pix_fmt_desc_get(pi_fmt[i]); + if (dsc == NULL) +@@ -1352,7 +1352,7 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context, + if( p_va == NULL ) + goto end; + +- for( size_t i = 0; pi_fmt[i] != PIX_FMT_NONE; i++ ) ++ for( size_t i = 0; pi_fmt[i] != AV_PIX_FMT_NONE; i++ ) + { + if( p_va->pix_fmt != pi_fmt[i] ) + continue; +diff --git a/modules/video_chroma/swscale.c b/modules/video_chroma/swscale.c +index 569e0f5..4e0ecf1 100644 +--- a/modules/video_chroma/swscale.c ++++ b/modules/video_chroma/swscale.c +@@ -257,35 +257,35 @@ static void FixParameters( int *pi_fmt, bool *pb_has_a, bool *pb_swap_uv, vlc_fo + switch( fmt ) + { + case VLC_CODEC_YUV422A: +- *pi_fmt = PIX_FMT_YUV422P; ++ *pi_fmt = AV_PIX_FMT_YUV422P; + *pb_has_a = true; + break; + case VLC_CODEC_YUV420A: +- *pi_fmt = PIX_FMT_YUV420P; ++ *pi_fmt = AV_PIX_FMT_YUV420P; + *pb_has_a = true; + break; + case VLC_CODEC_YUVA: +- *pi_fmt = PIX_FMT_YUV444P; ++ *pi_fmt = AV_PIX_FMT_YUV444P; + *pb_has_a = true; + break; + case VLC_CODEC_RGBA: +- *pi_fmt = PIX_FMT_BGR32; ++ *pi_fmt = AV_PIX_FMT_BGR32; + *pb_has_a = true; + break; + case VLC_CODEC_ARGB: +- *pi_fmt = PIX_FMT_BGR32_1; ++ *pi_fmt = AV_PIX_FMT_BGR32_1; + *pb_has_a = true; + break; + case VLC_CODEC_BGRA: +- *pi_fmt = PIX_FMT_RGB32; ++ *pi_fmt = AV_PIX_FMT_RGB32; + *pb_has_a = true; + break; + case VLC_CODEC_YV12: +- *pi_fmt = PIX_FMT_YUV420P; ++ *pi_fmt = AV_PIX_FMT_YUV420P; + *pb_swap_uv = true; + break; + case VLC_CODEC_YV9: +- *pi_fmt = PIX_FMT_YUV410P; ++ *pi_fmt = AV_PIX_FMT_YUV410P; + *pb_swap_uv = true; + break; + default: +@@ -314,7 +314,7 @@ static int GetParameters( ScalerConfiguration *p_cfg, + { + if( p_fmti->i_chroma == VLC_CODEC_YUVP && ALLOW_YUVP ) + { +- i_fmti = i_fmto = PIX_FMT_GRAY8; ++ i_fmti = i_fmto = AV_PIX_FMT_GRAY8; + i_sws_flags = SWS_POINT; + } + } +@@ -327,9 +327,9 @@ static int GetParameters( ScalerConfiguration *p_cfg, + * Without SWS_ACCURATE_RND the quality is really bad for some conversions */ + switch( i_fmto ) + { +- case PIX_FMT_ARGB: +- case PIX_FMT_RGBA: +- case PIX_FMT_ABGR: ++ case AV_PIX_FMT_ARGB: ++ case AV_PIX_FMT_RGBA: ++ case AV_PIX_FMT_ABGR: + i_sws_flags |= SWS_ACCURATE_RND; + break; + } +@@ -403,8 +403,8 @@ static int Init( filter_t *p_filter ) + const unsigned i_fmto_visible_width = p_fmto->i_visible_width * p_sys->i_extend_factor; + for( int n = 0; n < (cfg.b_has_a ? 2 : 1); n++ ) + { +- const int i_fmti = n == 0 ? cfg.i_fmti : PIX_FMT_GRAY8; +- const int i_fmto = n == 0 ? cfg.i_fmto : PIX_FMT_GRAY8; ++ const int i_fmti = n == 0 ? cfg.i_fmti : AV_PIX_FMT_GRAY8; ++ const int i_fmto = n == 0 ? cfg.i_fmto : AV_PIX_FMT_GRAY8; + struct SwsContext *ctx; + + ctx = sws_getContext( i_fmti_visible_width, p_fmti->i_visible_height, i_fmti, +-- +2.5.0 + diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0010-SWSCALE-fix-compilation-with-4.x.patch b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0010-SWSCALE-fix-compilation-with-4.x.patch new file mode 100644 index 000000000..56744e7de --- /dev/null +++ b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0010-SWSCALE-fix-compilation-with-4.x.patch @@ -0,0 +1,45 @@ +From 6fa8a4a9bb64ff34328aae46acd600f8502b2c05 Mon Sep 17 00:00:00 2001 +From: Jean-Baptiste Kempf <jb@videolan.org> +Date: Mon, 31 Aug 2015 09:07:39 +0200 +Subject: [PATCH] SWSCALE: fix compilation with 4.x +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +(cherry picked from commit 2b23857c68622edda76b72b74aeb3d943ee277c9) +Signed-off-by: Rafaël Carré <funman@videolan.org> +--- + modules/video_chroma/swscale.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/modules/video_chroma/swscale.c b/modules/video_chroma/swscale.c +index 4e0ecf1..26d0d6f 100644 +--- a/modules/video_chroma/swscale.c ++++ b/modules/video_chroma/swscale.c +@@ -36,6 +36,7 @@ + #include <vlc_cpu.h> + + #include <libswscale/swscale.h> ++#include <libswscale/version.h> + + #ifdef __APPLE__ + # include <TargetConditionals.h> +@@ -235,6 +236,7 @@ static int GetSwsCpuMask(void) + { + int i_sws_cpu = 0; + ++#if LIBSWSCALE_VERSION_MAJOR < 4 + #if defined(__i386__) || defined(__x86_64__) + if( vlc_CPU_MMX() ) + i_sws_cpu |= SWS_CPU_CAPS_MMX; +@@ -248,6 +250,7 @@ static int GetSwsCpuMask(void) + if( vlc_CPU_ALTIVEC() ) + i_sws_cpu |= SWS_CPU_CAPS_ALTIVEC; + #endif ++#endif + + return i_sws_cpu; + } +-- +2.5.0 + diff --git a/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc_2.2.2.bb b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc_2.2.2.bb new file mode 100644 index 000000000..b5be04cb9 --- /dev/null +++ b/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc_2.2.2.bb @@ -0,0 +1,19 @@ +require ${BPN}.inc + +# work around build failure +EXTRA_OECONF += " --enable-libxml2=no" + +SRC_URI += "file://0001-enable-subdir-objects.patch \ + file://0002-glibc-does-not-provide-strlcpy.patch \ + file://0003-use-am-path-libgcrypt.patch \ + file://0004-modules-gui-qt4-out-of-tree-build.patch \ + file://0005-libpostproc-header-check.patch \ + file://0006-make-opencv-configurable.patch \ + file://0007-use-vorbisidec.patch \ + file://0008-fix-luaL-checkint.patch \ + file://0009-Avcodec-swscale-use-AV_PIX_FMT-consistently.patch \ + file://0010-SWSCALE-fix-compilation-with-4.x.patch \ +" + +SRC_URI[md5sum] = "f98d60f0f59ef72b6e3407f2ff09bda6" +SRC_URI[sha256sum] = "9ad23128be16f9b40ed772961272cb0748ed8e4aa1bc79c129e589feebea5fb5" |