Skip to content

Commit 431ec83

Browse files
committed
Add ffmpeg n3.4.4 dependency
Signed-off-by: Yong Tang <[email protected]>
1 parent 631b919 commit 431ec83

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed

WORKSPACE

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,14 @@ http_archive(
6161
strip_prefix = "aws-sdk-cpp-1.3.15",
6262
build_file = "//third_party:aws.BUILD",
6363
)
64+
65+
http_archive(
66+
name = "ffmpeg",
67+
urls = [
68+
"https://mirror.bazel.build/github.com/FFmpeg/FFmpeg/archive/n3.4.4.tar.gz",
69+
"https://github.com/FFmpeg/FFmpeg/archive/n3.4.4.tar.gz",
70+
],
71+
sha256 = "bbccc87cd031498728bcc2dba5596a47e6fd92b2cec060a71feef65617a261fe",
72+
strip_prefix = "FFmpeg-n3.4.4",
73+
build_file = "//third_party:ffmpeg.BUILD",
74+
)

third_party/ffmpeg.BUILD

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Description:
2+
# FFmpeg
3+
4+
licenses(["notice"]) # LGPL v2.1+ license
5+
6+
exports_files(["LICENSE.md"])
7+
8+
cc_library(
9+
name = "ffmpeg",
10+
srcs = [
11+
],
12+
hdrs = [
13+
"libavformat/avformat.h",
14+
"libavformat/avio.h",
15+
"libavformat/version.h",
16+
"libavcodec/version.h",
17+
"libavcodec/avcodec.h",
18+
"libavutil/avconfig.h",
19+
"libavutil/samplefmt.h",
20+
"libavutil/avutil.h",
21+
"libavutil/common.h",
22+
"libavutil/attributes.h",
23+
"libavutil/macros.h",
24+
"libavutil/version.h",
25+
"libavutil/mem.h",
26+
"libavutil/error.h",
27+
"libavutil/rational.h",
28+
"libavutil/mathematics.h",
29+
"libavutil/intfloat.h",
30+
"libavutil/log.h",
31+
"libavutil/pixfmt.h",
32+
"libavutil/buffer.h",
33+
"libavutil/cpu.h",
34+
"libavutil/channel_layout.h",
35+
"libavutil/dict.h",
36+
"libavutil/frame.h",
37+
"libavutil/imgutils.h",
38+
"libavutil/pixdesc.h",
39+
"libswscale/swscale.h",
40+
"libswscale/version.h",
41+
],
42+
copts = [],
43+
defines = [],
44+
includes = [],
45+
linkopts = [
46+
"-l:libavformat.so.57",
47+
"-l:libavcodec.so.57",
48+
"-l:libavutil.so.55",
49+
"-l:libswscale.so.4",
50+
],
51+
visibility = ["//visibility:public"],
52+
deps = [],
53+
)
54+
55+
genrule(
56+
name = "libavutil_avconfig_h",
57+
outs = ["libavutil/avconfig.h"],
58+
cmd = "\n".join([
59+
"cat <<'EOF' >$@",
60+
"#ifndef AVUTIL_AVCONFIG_H",
61+
"#define AVUTIL_AVCONFIG_H",
62+
"#define AV_HAVE_BIGENDIAN 0",
63+
"#define AV_HAVE_FAST_UNALIGNED 1",
64+
"#endif /* AVUTIL_AVCONFIG_H */",
65+
"EOF",
66+
]),
67+
)

0 commit comments

Comments
 (0)