mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-16 16:21:11 +00:00
181 lines
4.9 KiB
Python
Vendored
181 lines
4.9 KiB
Python
Vendored
load("//Config:buck_rule_macros.bzl", "static_library", "gen_header_targets", "merge_maps")
|
|
|
|
ffmpeg_header_paths = [
|
|
"libavutil/hwcontext.h",
|
|
"libavutil/time.h",
|
|
"libavutil/hwcontext_cuda.h",
|
|
"libavutil/intfloat.h",
|
|
"libavutil/error.h",
|
|
"libavutil/fifo.h",
|
|
"libavutil/blowfish.h",
|
|
"libavutil/hwcontext_mediacodec.h",
|
|
"libavutil/replaygain.h",
|
|
"libavutil/version.h",
|
|
"libavutil/murmur3.h",
|
|
"libavutil/stereo3d.h",
|
|
"libavutil/samplefmt.h",
|
|
"libavutil/pixdesc.h",
|
|
"libavutil/base64.h",
|
|
"libavutil/rational.h",
|
|
"libavutil/sha.h",
|
|
"libavutil/motion_vector.h",
|
|
"libavutil/avconfig.h",
|
|
"libavutil/lfg.h",
|
|
"libavutil/avutil.h",
|
|
"libavutil/xtea.h",
|
|
"libavutil/crc.h",
|
|
"libavutil/hwcontext_vdpau.h",
|
|
"libavutil/frame.h",
|
|
"libavutil/file.h",
|
|
"libavutil/md5.h",
|
|
"libavutil/cast5.h",
|
|
"libavutil/hwcontext_vaapi.h",
|
|
"libavutil/spherical.h",
|
|
"libavutil/ffversion.h",
|
|
"libavutil/audio_fifo.h",
|
|
"libavutil/tree.h",
|
|
"libavutil/threadmessage.h",
|
|
"libavutil/attributes.h",
|
|
"libavutil/adler32.h",
|
|
"libavutil/hwcontext_d3d11va.h",
|
|
"libavutil/timecode.h",
|
|
"libavutil/sha512.h",
|
|
"libavutil/hwcontext_dxva2.h",
|
|
"libavutil/display.h",
|
|
"libavutil/buffer.h",
|
|
"libavutil/camellia.h",
|
|
"libavutil/pixelutils.h",
|
|
"libavutil/hwcontext_drm.h",
|
|
"libavutil/common.h",
|
|
"libavutil/hmac.h",
|
|
"libavutil/eval.h",
|
|
"libavutil/dict.h",
|
|
"libavutil/random_seed.h",
|
|
"libavutil/opt.h",
|
|
"libavutil/mastering_display_metadata.h",
|
|
"libavutil/log.h",
|
|
"libavutil/aes.h",
|
|
"libavutil/macros.h",
|
|
"libavutil/bswap.h",
|
|
"libavutil/rc4.h",
|
|
"libavutil/tea.h",
|
|
"libavutil/cpu.h",
|
|
"libavutil/lzo.h",
|
|
"libavutil/des.h",
|
|
"libavutil/channel_layout.h",
|
|
"libavutil/encryption_info.h",
|
|
"libavutil/twofish.h",
|
|
"libavutil/imgutils.h",
|
|
"libavutil/hwcontext_videotoolbox.h",
|
|
"libavutil/mem.h",
|
|
"libavutil/parseutils.h",
|
|
"libavutil/ripemd.h",
|
|
"libavutil/bprint.h",
|
|
"libavutil/hwcontext_qsv.h",
|
|
"libavutil/pixfmt.h",
|
|
"libavutil/aes_ctr.h",
|
|
"libavutil/timestamp.h",
|
|
"libavutil/downmix_info.h",
|
|
"libavutil/avassert.h",
|
|
"libavutil/hash.h",
|
|
"libavutil/mathematics.h",
|
|
"libavutil/intreadwrite.h",
|
|
"libavutil/avstring.h",
|
|
"libavformat/version.h",
|
|
"libavformat/avio.h",
|
|
"libavformat/avformat.h",
|
|
"libavcodec/adts_parser.h",
|
|
"libavcodec/avcodec.h",
|
|
"libavcodec/version.h",
|
|
"libavcodec/vdpau.h",
|
|
"libavcodec/qsv.h",
|
|
"libavcodec/vaapi.h",
|
|
"libavcodec/videotoolbox.h",
|
|
"libavcodec/xvmc.h",
|
|
"libavcodec/mediacodec.h",
|
|
"libavcodec/d3d11va.h",
|
|
"libavcodec/avfft.h",
|
|
"libavcodec/jni.h",
|
|
"libavcodec/dirac.h",
|
|
"libavcodec/avdct.h",
|
|
"libavcodec/ac3_parser.h",
|
|
"libavcodec/vorbis_parser.h",
|
|
"libavcodec/dxva2.h",
|
|
"libavcodec/dv_profile.h",
|
|
"libswresample/version.h",
|
|
"libswresample/swresample.h",
|
|
]
|
|
|
|
library_archs = "arm64 armv7 x86_64"
|
|
|
|
genrule(
|
|
name = "libffmpeg_build",
|
|
srcs = glob([
|
|
"Sources/FFMpeg/**/*",
|
|
], exclude = ["Sources/FFMpeg/**/.*"]),
|
|
bash =
|
|
"PATH=\"$PATH:$(location //third-party/yasm:yasm)/yasm-1.3.0/build\" " +
|
|
"$SRCDIR/Sources/FFMpeg/build-ffmpeg-buck.sh release \"" + library_archs + "\" $OUT $SRCDIR/Sources/FFMpeg",
|
|
out = "libffmpeg",
|
|
visibility = [
|
|
"//submodules/ffmpeg:FFMpeg",
|
|
"//submodules/ffmpeg:libffmpeg",
|
|
]
|
|
)
|
|
|
|
ffmpeg_header_targets = gen_header_targets(ffmpeg_header_paths, "ffmpeg_header_", "", "libffmpeg_build", "FFmpeg-iOS/include")
|
|
|
|
apple_library(
|
|
name = "libffmpeg",
|
|
visibility = [
|
|
"//submodules/ffmpeg:FFMpeg"
|
|
],
|
|
header_namespace = "ffmpeg",
|
|
exported_headers = ffmpeg_header_targets,
|
|
linker_flags = [
|
|
"-L$(location :libffmpeg_build)/FFmpeg-iOS/lib",
|
|
"-lavutil",
|
|
"-lavcodec",
|
|
"-lavformat",
|
|
"-lswresample",
|
|
"-lbz2",
|
|
"-liconv",
|
|
"-lz",
|
|
],
|
|
exported_linker_flags = [
|
|
"-L$(location :libffmpeg_build)/FFmpeg-iOS/lib",
|
|
"-lavutil",
|
|
"-lavcodec",
|
|
"-lavformat",
|
|
"-lswresample",
|
|
"-lbz2",
|
|
"-liconv",
|
|
"-lz",
|
|
],
|
|
deps = [
|
|
":libffmpeg_build",
|
|
"//submodules/Opus:opus",
|
|
],
|
|
)
|
|
|
|
static_library(
|
|
name = "ffmpeg",
|
|
exported_headers = merge_maps([
|
|
{
|
|
"ffmpeg/ffmpeg.h": "PublicHeaders/ffmpeg/ffmpeg.h",
|
|
},
|
|
ffmpeg_header_targets,
|
|
]),
|
|
deps = [
|
|
":libffmpeg_build",
|
|
":libffmpeg",
|
|
"//submodules/Opus:opus",
|
|
],
|
|
frameworks = [
|
|
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
|
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
|
"$SDKROOT/System/Library/Frameworks/CoreMedia.framework",
|
|
"$SDKROOT/System/Library/Frameworks/AVFoundation.framework",
|
|
],
|
|
)
|