Skip to content

Commit 3201695

Browse files
Memphizelupus
authored and
elupus
committed
[osx/ios/atv2] - build and link static libs for ffmpeg because of build issues on ios
1 parent 525834b commit 3201695

12 files changed

+151
-103
lines changed

XBMC-ATV2.xcodeproj/project.pbxproj

+32
Original file line numberDiff line numberDiff line change
@@ -7134,6 +7134,14 @@
71347134
"\"$(SRCROOT)/lib/SlingboxLib\"",
71357135
"\"$(SRCROOT)/xbmc/interfaces/json-rpc\"",
71367136
"\"$(SRCROOT)/xbmc/interfaces/http-api\"",
7137+
"\"$(SRCROOT)/lib/ffmpeg/libavcodec\"",
7138+
"\"$(SRCROOT)/lib/ffmpeg/libavutil\"",
7139+
"\"$(SRCROOT)/lib/ffmpeg/libavformat\"",
7140+
"\"$(SRCROOT)/lib/ffmpeg/libavfilter\"",
7141+
"\"$(SRCROOT)/lib/ffmpeg/libavdevice\"",
7142+
"\"$(SRCROOT)/lib/ffmpeg/libswresample\"",
7143+
"\"$(SRCROOT)/lib/ffmpeg/libpostproc\"",
7144+
"\"$(SRCROOT)/lib/ffmpeg/libswscale\"",
71377145
);
71387146
OTHER_LDFLAGS = (
71397147
"-Wl,-headerpad_max_install_names",
@@ -7157,6 +7165,14 @@
71577165
"-lyajl",
71587166
"-ljpeg",
71597167
"-lgcrypt",
7168+
"-lavdevice",
7169+
"-lavfilter",
7170+
"-lavcodec",
7171+
"-lavformat",
7172+
"-lpostproc",
7173+
"-lavutil",
7174+
"-lswresample",
7175+
"-lswscale",
71607176
"-lcrypto",
71617177
"-L$XBMC_DEPENDS/lib/mysql",
71627178
"-lmysqlclient",
@@ -7231,6 +7247,14 @@
72317247
"\"$(SRCROOT)/lib/SlingboxLib\"",
72327248
"\"$(SRCROOT)/xbmc/interfaces/json-rpc\"",
72337249
"\"$(SRCROOT)/xbmc/interfaces/http-api\"",
7250+
"\"$(SRCROOT)/lib/ffmpeg/libavcodec\"",
7251+
"\"$(SRCROOT)/lib/ffmpeg/libavutil\"",
7252+
"\"$(SRCROOT)/lib/ffmpeg/libavformat\"",
7253+
"\"$(SRCROOT)/lib/ffmpeg/libavfilter\"",
7254+
"\"$(SRCROOT)/lib/ffmpeg/libavdevice\"",
7255+
"\"$(SRCROOT)/lib/ffmpeg/libswresample\"",
7256+
"\"$(SRCROOT)/lib/ffmpeg/libpostproc\"",
7257+
"\"$(SRCROOT)/lib/ffmpeg/libswscale\"",
72347258
);
72357259
OTHER_LDFLAGS = (
72367260
"-Wl,-headerpad_max_install_names",
@@ -7255,6 +7279,14 @@
72557279
"-ljpeg",
72567280
"-lgcrypt",
72577281
"-lcrypto",
7282+
"-lavdevice",
7283+
"-lavfilter",
7284+
"-lavcodec",
7285+
"-lavformat",
7286+
"-lpostproc",
7287+
"-lavutil",
7288+
"-lswresample",
7289+
"-lswscale",
72587290
"-L$XBMC_DEPENDS/lib/mysql",
72597291
"-lmysqlclient",
72607292
);

XBMC-IOS.xcodeproj/project.pbxproj

+32
Original file line numberDiff line numberDiff line change
@@ -7146,6 +7146,14 @@
71467146
"\"$(SRCROOT)/lib/SlingboxLib\"",
71477147
"\"$(SRCROOT)/xbmc/interfaces/http-api\"",
71487148
"\"$(SRCROOT)/xbmc/interfaces/json-rpc\"",
7149+
"\"$(SRCROOT)/lib/ffmpeg/libavcodec\"",
7150+
"\"$(SRCROOT)/lib/ffmpeg/libavutil\"",
7151+
"\"$(SRCROOT)/lib/ffmpeg/libavformat\"",
7152+
"\"$(SRCROOT)/lib/ffmpeg/libavfilter\"",
7153+
"\"$(SRCROOT)/lib/ffmpeg/libavdevice\"",
7154+
"\"$(SRCROOT)/lib/ffmpeg/libswresample\"",
7155+
"\"$(SRCROOT)/lib/ffmpeg/libpostproc\"",
7156+
"\"$(SRCROOT)/lib/ffmpeg/libswscale\"",
71497157
);
71507158
OTHER_LDFLAGS = (
71517159
"-Wl,-headerpad_max_install_names",
@@ -7168,6 +7176,14 @@
71687176
"-ljpeg",
71697177
"-lcrypto",
71707178
"-lgcrypt",
7179+
"-lavdevice",
7180+
"-lavfilter",
7181+
"-lavcodec",
7182+
"-lavformat",
7183+
"-lpostproc",
7184+
"-lavutil",
7185+
"-lswresample",
7186+
"-lswscale",
71717187
"-L$XBMC_DEPENDS/lib/mysql",
71727188
"-lmysqlclient",
71737189
);
@@ -7242,6 +7258,14 @@
72427258
"\"$(SRCROOT)/lib/SlingboxLib\"",
72437259
"\"$(SRCROOT)/xbmc/interfaces/http-api\"",
72447260
"\"$(SRCROOT)/xbmc/interfaces/json-rpc\"",
7261+
"\"$(SRCROOT)/lib/ffmpeg/libavcodec\"",
7262+
"\"$(SRCROOT)/lib/ffmpeg/libavutil\"",
7263+
"\"$(SRCROOT)/lib/ffmpeg/libavformat\"",
7264+
"\"$(SRCROOT)/lib/ffmpeg/libavfilter\"",
7265+
"\"$(SRCROOT)/lib/ffmpeg/libavdevice\"",
7266+
"\"$(SRCROOT)/lib/ffmpeg/libswresample\"",
7267+
"\"$(SRCROOT)/lib/ffmpeg/libpostproc\"",
7268+
"\"$(SRCROOT)/lib/ffmpeg/libswscale\"",
72457269
);
72467270
OTHER_LDFLAGS = (
72477271
"-Wl,-headerpad_max_install_names",
@@ -7264,6 +7288,14 @@
72647288
"-ljpeg",
72657289
"-lcrypto",
72667290
"-lgcrypt",
7291+
"-lavdevice",
7292+
"-lavfilter",
7293+
"-lavcodec",
7294+
"-lavformat",
7295+
"-lpostproc",
7296+
"-lavutil",
7297+
"-lswresample",
7298+
"-lswscale",
72677299
"-L$XBMC_DEPENDS/lib/mysql",
72687300
"-lmysqlclient",
72697301
);

XBMC.xcodeproj/project.pbxproj

+64
Original file line numberDiff line numberDiff line change
@@ -9202,6 +9202,14 @@
92029202
"$(SRCROOT)/lib/SlingboxLib",
92039203
"$(SRCROOT)/xbmc/interfaces/http-api",
92049204
"$(SRCROOT)/xbmc/interfaces/json-rpc",
9205+
"\"$(SRCROOT)/lib/ffmpeg/libavcodec\"",
9206+
"\"$(SRCROOT)/lib/ffmpeg/libavutil\"",
9207+
"\"$(SRCROOT)/lib/ffmpeg/libavformat\"",
9208+
"\"$(SRCROOT)/lib/ffmpeg/libavfilter\"",
9209+
"\"$(SRCROOT)/lib/ffmpeg/libavdevice\"",
9210+
"\"$(SRCROOT)/lib/ffmpeg/libswresample\"",
9211+
"\"$(SRCROOT)/lib/ffmpeg/libpostproc\"",
9212+
"\"$(SRCROOT)/lib/ffmpeg/libswscale\"",
92059213
);
92069214
LINK_WITH_STANDARD_LIBRARIES = YES;
92079215
OTHER_LDFLAGS = (
@@ -9223,6 +9231,14 @@
92239231
"-ljpeg",
92249232
"-lcrypto",
92259233
"-lgcrypt",
9234+
"-lavdevice",
9235+
"-lavfilter",
9236+
"-lavcodec",
9237+
"-lavformat",
9238+
"-lpostproc",
9239+
"-lavutil",
9240+
"-lswresample",
9241+
"-lswscale",
92269242
"-lGLEW",
92279243
"-lSDL",
92289244
"-lSDL_mixer",
@@ -9300,6 +9316,14 @@
93009316
"$(SRCROOT)/lib/SlingboxLib",
93019317
"$(SRCROOT)/xbmc/interfaces/http-api",
93029318
"$(SRCROOT)/xbmc/interfaces/json-rpc",
9319+
"\"$(SRCROOT)/lib/ffmpeg/libavcodec\"",
9320+
"\"$(SRCROOT)/lib/ffmpeg/libavutil\"",
9321+
"\"$(SRCROOT)/lib/ffmpeg/libavformat\"",
9322+
"\"$(SRCROOT)/lib/ffmpeg/libavfilter\"",
9323+
"\"$(SRCROOT)/lib/ffmpeg/libavdevice\"",
9324+
"\"$(SRCROOT)/lib/ffmpeg/libswresample\"",
9325+
"\"$(SRCROOT)/lib/ffmpeg/libpostproc\"",
9326+
"\"$(SRCROOT)/lib/ffmpeg/libswscale\"",
93039327
);
93049328
LINK_WITH_STANDARD_LIBRARIES = YES;
93059329
OTHER_LDFLAGS = (
@@ -9321,6 +9345,14 @@
93219345
"-ljpeg",
93229346
"-lcrypto",
93239347
"-lgcrypt",
9348+
"-lavdevice",
9349+
"-lavfilter",
9350+
"-lavcodec",
9351+
"-lavformat",
9352+
"-lpostproc",
9353+
"-lavutil",
9354+
"-lswresample",
9355+
"-lswscale",
93249356
"-lGLEW",
93259357
"-lSDL",
93269358
"-lSDL_mixer",
@@ -9460,6 +9492,14 @@
94609492
"$(SRCROOT)/xbmc/interfaces/json-rpc",
94619493
"$(SRCROOT)/lib/SlingboxLib",
94629494
"\"$(SRCROOT)/lib/shairport\"",
9495+
"\"$(SRCROOT)/lib/ffmpeg/libavcodec\"",
9496+
"\"$(SRCROOT)/lib/ffmpeg/libavutil\"",
9497+
"\"$(SRCROOT)/lib/ffmpeg/libavformat\"",
9498+
"\"$(SRCROOT)/lib/ffmpeg/libavfilter\"",
9499+
"\"$(SRCROOT)/lib/ffmpeg/libavdevice\"",
9500+
"\"$(SRCROOT)/lib/ffmpeg/libswresample\"",
9501+
"\"$(SRCROOT)/lib/ffmpeg/libpostproc\"",
9502+
"\"$(SRCROOT)/lib/ffmpeg/libswscale\"",
94639503
);
94649504
LINK_WITH_STANDARD_LIBRARIES = YES;
94659505
OTHER_LDFLAGS = (
@@ -9481,6 +9521,14 @@
94819521
"-ljpeg",
94829522
"-lcrypto",
94839523
"-lgcrypt",
9524+
"-lavdevice",
9525+
"-lavfilter",
9526+
"-lavcodec",
9527+
"-lavformat",
9528+
"-lpostproc",
9529+
"-lavutil",
9530+
"-lswresample",
9531+
"-lswscale",
94849532
"-lGLEW",
94859533
"-lSDL",
94869534
"-lSDL_mixer",
@@ -9561,6 +9609,14 @@
95619609
"$(SRCROOT)/xbmc/interfaces/json-rpc",
95629610
"$(SRCROOT)/lib/SlingboxLib",
95639611
"\"$(SRCROOT)/lib/shairport\"",
9612+
"\"$(SRCROOT)/lib/ffmpeg/libavcodec\"",
9613+
"\"$(SRCROOT)/lib/ffmpeg/libavutil\"",
9614+
"\"$(SRCROOT)/lib/ffmpeg/libavformat\"",
9615+
"\"$(SRCROOT)/lib/ffmpeg/libavfilter\"",
9616+
"\"$(SRCROOT)/lib/ffmpeg/libavdevice\"",
9617+
"\"$(SRCROOT)/lib/ffmpeg/libswresample\"",
9618+
"\"$(SRCROOT)/lib/ffmpeg/libpostproc\"",
9619+
"\"$(SRCROOT)/lib/ffmpeg/libswscale\"",
95649620
);
95659621
LINK_WITH_STANDARD_LIBRARIES = YES;
95669622
OTHER_LDFLAGS = (
@@ -9582,6 +9638,14 @@
95829638
"-ljpeg",
95839639
"-lcrypto",
95849640
"-lgcrypt",
9641+
"-lavdevice",
9642+
"-lavfilter",
9643+
"-lavcodec",
9644+
"-lavformat",
9645+
"-lpostproc",
9646+
"-lavutil",
9647+
"-lswresample",
9648+
"-lswscale",
95859649
"-lGLEW",
95869650
"-lSDL",
95879651
"-lSDL_mixer",

configure.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -2023,7 +2023,7 @@ XB_CONFIG_MODULE([lib/ffmpeg], [
20232023
--disable-amd3dnow \
20242024
--disable-armv5te \
20252025
--disable-armv6t2 \
2026-
--disable-static \
2026+
--enable-static \
20272027
`if test "$use_debug" = "no"; then echo --disable-debug; fi` \
20282028
--disable-muxers \
20292029
--enable-muxer=spdif \
@@ -2037,14 +2037,14 @@ XB_CONFIG_MODULE([lib/ffmpeg], [
20372037
--disable-ffplay \
20382038
--disable-ffserver \
20392039
--disable-ffmpeg \
2040-
--enable-shared \
20412040
--disable-doc \
20422041
--disable-decoder=mpeg_xvmc \
20432042
--enable-postproc \
20442043
--enable-gpl \
20452044
--enable-protocol=http \
20462045
--enable-pthreads \
20472046
--enable-runtime-cpudetect \
2047+
--disable-openmp \
20482048
--cc="$CC" &&
20492049
sed -ie "s#YASM=yasm#YASM=${prefix}/bin/yasm#" config.mak &&
20502050
sed -ie "s#YASMDEP=yasm#YASMDEP=${prefix}/bin/yasm#" config.mak &&

lib/DllAvCodec.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class DllAvCodecInterface
128128
virtual int64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name)=0;
129129
};
130130

131-
#if (defined USE_EXTERNAL_FFMPEG)
131+
#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
132132

133133
// Use direct layer
134134
class DllAvCodec : public DllDynamic, DllAvCodecInterface

lib/DllAvFilter.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class DllAvFilterInterface
8484
virtual int av_buffersink_poll_frame(AVFilterContext *ctx)=0;
8585
};
8686

87-
#if (defined USE_EXTERNAL_FFMPEG)
87+
#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
8888
// Use direct mapping
8989
class DllAvFilter : public DllDynamic, DllAvFilterInterface
9090
{

lib/DllAvFormat.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class DllAvFormatInterface
6969
virtual int av_read_play(AVFormatContext *s)=0;
7070
virtual int av_read_pause(AVFormatContext *s)=0;
7171
virtual int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)=0;
72-
#if (!defined USE_EXTERNAL_FFMPEG)
72+
#if (!defined USE_EXTERNAL_FFMPEG) && (!defined TARGET_DARWIN)
7373
virtual int avformat_find_stream_info_dont_call(AVFormatContext *ic, AVDictionary **options)=0;
7474
#endif
7575
virtual int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options)=0;
@@ -100,7 +100,7 @@ class DllAvFormatInterface
100100
virtual int av_write_frame (AVFormatContext *s, AVPacket *pkt)=0;
101101
};
102102

103-
#if (defined USE_EXTERNAL_FFMPEG)
103+
#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
104104

105105
// Use direct mapping
106106
class DllAvFormat : public DllDynamic, DllAvFormatInterface

lib/DllAvUtil.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ class DllAvUtilInterface
104104
virtual int av_samples_get_buffer_size (int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align) = 0;
105105
};
106106

107-
#if (defined USE_EXTERNAL_FFMPEG)
108-
107+
#if defined (USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
109108
// Use direct layer
110109
class DllAvUtilBase : public DllDynamic, DllAvUtilInterface
111110
{

lib/DllPostProc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class DllPostProcInterface
8787
virtual void pp_free_context(pp_context *ppContext)=0;
8888
};
8989

90-
#if (defined USE_EXTERNAL_FFMPEG)
90+
#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
9191

9292
// We call directly.
9393
class DllPostProc : public DllDynamic, DllPostProcInterface

lib/DllSwResample.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extern "C" {
4343
}
4444

4545

46-
#if (defined USE_EXTERNAL_FFMPEG)
46+
#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
4747

4848
// Use direct mapping
4949
class DllSwResample : public DllDynamic

lib/DllSwScale.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class DllSwScaleInterface
9292
virtual void sws_freeContext(struct SwsContext *context)=0;
9393
};
9494

95-
#if (defined USE_EXTERNAL_FFMPEG)
95+
#if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN)
9696

9797
// We call into this library directly.
9898
class DllSwScale : public DllDynamic, public DllSwScaleInterface

0 commit comments

Comments
 (0)