From 7b84a4d9196b67d0167b0a53b3c4bf96cbeb3f92 Mon Sep 17 00:00:00 2001 From: Memphiz Date: Tue, 11 Feb 2014 18:34:50 +0100 Subject: Revert "[ios7/ios/atv2] - link statically against libmpeg2 - since ios7 we crash and burn when we load libmpeg2 as dylib - closes #14813" This reverts commit 0e53fea3bbf092cccad9f5ade492754ee2a22ead. Conflicts: XBMC.xcodeproj/project.pbxproj --- XBMC.xcodeproj/project.pbxproj | 2 -- configure.in | 7 +---- tools/darwin/Configurations/App-iOS.xcconfig | 2 +- tools/depends/target/libmpeg2/Makefile | 5 ---- xbmc/cores/dvdplayer/DVDCodecs/Video/DllLibMpeg2.h | 31 ---------------------- 5 files changed, 2 insertions(+), 45 deletions(-) diff --git a/XBMC.xcodeproj/project.pbxproj b/XBMC.xcodeproj/project.pbxproj index 9b3bb5d7aa..698f6b9cb4 100644 --- a/XBMC.xcodeproj/project.pbxproj +++ b/XBMC.xcodeproj/project.pbxproj @@ -13299,7 +13299,6 @@ "-ltag", "-lxslt", "-lxml2", - "-lmpeg2", "-L$XBMC_DEPENDS/lib/mysql", "-lmysqlclient", ); @@ -13416,7 +13415,6 @@ "-ltag", "-lxslt", "-lxml2", - "-lmpeg2", "-L$XBMC_DEPENDS/lib/mysql", "-lmysqlclient", ); diff --git a/configure.in b/configure.in index bb2ff0488d..8ebe6f0110 100644 --- a/configure.in +++ b/configure.in @@ -1257,12 +1257,7 @@ XB_FIND_SONAME([VORBIS], [vorbis]) XB_FIND_SONAME([VORBISFILE], [vorbisfile]) XB_FIND_SONAME([MODPLUG], [modplug]) XB_FIND_SONAME([ASS], [ass]) - -#link statically against mpeg2 on ios because of ios7 -#crash & burn if dyloaded -if test "$ARCH" != "arm-osx" ; then - XB_FIND_SONAME([MPEG2], [mpeg2]) -fi +XB_FIND_SONAME([MPEG2], [mpeg2]) # Audio encoders if test "x$use_libmp3lame" != "xno"; then diff --git a/tools/darwin/Configurations/App-iOS.xcconfig b/tools/darwin/Configurations/App-iOS.xcconfig index e6e42026f9..47ae4d60b2 100644 --- a/tools/darwin/Configurations/App-iOS.xcconfig +++ b/tools/darwin/Configurations/App-iOS.xcconfig @@ -40,6 +40,6 @@ COPY_PHASE_STRIP = NO DEAD_CODE_STRIPPING = NO OTHER_CPLUSPLUSFLAGS = $(inherited) $(OTHER_CFLAGS) -Wreorder -OTHER_LDFLAGS = $(XBMC_OTHER_LDFLAGS_COMMON) -lmpeg2 -weak_framework VideoToolbox +OTHER_LDFLAGS = $(XBMC_OTHER_LDFLAGS_COMMON) -weak_framework VideoToolbox GCC_PREPROCESSOR_DEFINITIONS = TARGET_DARWIN_IOS $(XBMC_GCC_PREPROCESSOR_DEFINITIONS_COMMON) diff --git a/tools/depends/target/libmpeg2/Makefile b/tools/depends/target/libmpeg2/Makefile index bdefc337ef..15dbd8cbe8 100644 --- a/tools/depends/target/libmpeg2/Makefile +++ b/tools/depends/target/libmpeg2/Makefile @@ -50,11 +50,6 @@ ifeq ($(OS),android) $(RPL) -e "libmpeg2convert.so.0" "libxbmpeg2convert.so" $(PREFIX)/lib/libxbmpeg2convert.so -$(READELF) --dynamic $(PREFIX)/lib/libxbmpeg2convert.so | grep ibrary # -endif -#on ios we link statically against libmpeg2 because of crash&burn since ios7 - -#so remove the dylib so the linker doesn't see it -ifeq ($(OS),ios) - rm -f $(PREFIX)/lib/libmpeg2.la $(PREFIX)/lib/libmpeg2.dylib $(PREFIX)/lib/libmpeg2.0.dylib endif touch $@ diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DllLibMpeg2.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DllLibMpeg2.h index 02952a24fd..becd55b0ee 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DllLibMpeg2.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DllLibMpeg2.h @@ -23,11 +23,6 @@ #if (defined HAVE_CONFIG_H) && (!defined TARGET_WINDOWS) #include "config.h" #endif - -#if defined(TARGET_DARWIN_IOS) -#define STATIC_LINK 1 -#endif//TARGET_DARWIN_IOS - extern "C" { #if defined(TARGET_WINDOWS) #include "libmpeg2/mpeg2.h" @@ -58,31 +53,6 @@ public: virtual void mpeg2_skip(mpeg2dec_t * mpeg2dec, int skip)=0; }; -#if defined(STATIC_LINK) -//use direct mapping -class DllLibMpeg2 : public DllDynamic, DllLibMpeg2Interface -{ -public: - virtual ~DllLibMpeg2() {} - virtual uint32_t mpeg2_accel (uint32_t accel) { return ::mpeg2_accel(accel); } - virtual mpeg2dec_t * mpeg2_init (void) { return ::mpeg2_init(); } - virtual const mpeg2_info_t * mpeg2_info (mpeg2dec_t * mpeg2dec) { return ::mpeg2_info(mpeg2dec); } - virtual void mpeg2_close (mpeg2dec_t * mpeg2dec) { ::mpeg2_close(mpeg2dec); } - virtual void mpeg2_buffer (mpeg2dec_t * mpeg2dec, uint8_t * start, uint8_t * end) { ::mpeg2_buffer(mpeg2dec, start, end); } - virtual void mpeg2_tag_picture (mpeg2dec_t * mpeg2dec, uint32_t tag, uint32_t tag2){ ::mpeg2_tag_picture(mpeg2dec, tag, tag2); } - virtual mpeg2_state_t mpeg2_parse (mpeg2dec_t * mpeg2dec) { return ::mpeg2_parse(mpeg2dec); } - virtual void mpeg2_reset (mpeg2dec_t * mpeg2dec, int full_reset) { return ::mpeg2_reset(mpeg2dec, full_reset); } - virtual void mpeg2_set_buf (mpeg2dec_t * mpeg2dec, uint8_t * buf[3], void * id) { ::mpeg2_set_buf(mpeg2dec, buf, id); } - virtual void mpeg2_custom_fbuf (mpeg2dec_t * mpeg2dec, int custom_fbuf) { ::mpeg2_custom_fbuf(mpeg2dec, custom_fbuf); } - virtual int mpeg2_convert (mpeg2dec_t * mpeg2dec, mpeg2_convert_t convert, void * arg) { return ::mpeg2_convert(mpeg2dec, convert, arg); } - virtual void mpeg2_skip(mpeg2dec_t * mpeg2dec, int skip) { ::mpeg2_skip(mpeg2dec, skip); } - - // DLL faking. - virtual bool ResolveExports() { return true; } - virtual bool Load() { return true; } - virtual void Unload() { } -}; -#else class DllLibMpeg2 : public DllDynamic, DllLibMpeg2Interface { DECLARE_DLL_WRAPPER(DllLibMpeg2, DLL_PATH_LIBMPEG2) @@ -113,4 +83,3 @@ class DllLibMpeg2 : public DllDynamic, DllLibMpeg2Interface RESOLVE_METHOD(mpeg2_skip) END_METHOD_RESOLVE() }; -#endif//STATIC_LINK -- cgit v1.2.3