aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--XBMC.xcodeproj/project.pbxproj2
-rw-r--r--configure.in7
-rw-r--r--tools/darwin/Configurations/App-iOS.xcconfig2
-rw-r--r--tools/depends/target/libmpeg2/Makefile5
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DllLibMpeg2.h31
5 files changed, 45 insertions, 2 deletions
diff --git a/XBMC.xcodeproj/project.pbxproj b/XBMC.xcodeproj/project.pbxproj
index e0a5c27880..40db28dccd 100644
--- a/XBMC.xcodeproj/project.pbxproj
+++ b/XBMC.xcodeproj/project.pbxproj
@@ -13294,6 +13294,7 @@
"-L$XBMC_DEPENDS/lib/mysql",
"-lmysqlclient",
"-lxslt",
+ "-lmpeg2",
);
PLIST_FILE_OUTPUT_FORMAT = xml;
PREBINDING = NO;
@@ -13409,6 +13410,7 @@
"-L$XBMC_DEPENDS/lib/mysql",
"-lmysqlclient",
"-lxslt",
+ "-lmpeg2",
);
PLIST_FILE_OUTPUT_FORMAT = xml;
PREBINDING = NO;
diff --git a/configure.in b/configure.in
index 7231ff80c9..73923e7908 100644
--- a/configure.in
+++ b/configure.in
@@ -1250,7 +1250,12 @@ XB_FIND_SONAME([VORBIS], [vorbis])
XB_FIND_SONAME([VORBISFILE], [vorbisfile])
XB_FIND_SONAME([MODPLUG], [modplug])
XB_FIND_SONAME([ASS], [ass])
-XB_FIND_SONAME([MPEG2], [mpeg2])
+
+#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
# 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 47ae4d60b2..e6e42026f9 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) -weak_framework VideoToolbox
+OTHER_LDFLAGS = $(XBMC_OTHER_LDFLAGS_COMMON) -lmpeg2 -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 15dbd8cbe8..bdefc337ef 100644
--- a/tools/depends/target/libmpeg2/Makefile
+++ b/tools/depends/target/libmpeg2/Makefile
@@ -51,6 +51,11 @@ ifeq ($(OS),android)
-$(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 $@
clean:
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DllLibMpeg2.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DllLibMpeg2.h
index becd55b0ee..02952a24fd 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DllLibMpeg2.h
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DllLibMpeg2.h
@@ -23,6 +23,11 @@
#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"
@@ -53,6 +58,31 @@ 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)
@@ -83,3 +113,4 @@ class DllLibMpeg2 : public DllDynamic, DllLibMpeg2Interface
RESOLVE_METHOD(mpeg2_skip)
END_METHOD_RESOLVE()
};
+#endif//STATIC_LINK