Skip to content

Commit

Permalink
Add ffmpeg n3.4.4 dependency
Browse files Browse the repository at this point in the history
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
  • Loading branch information
yongtang committed Dec 17, 2018
1 parent 8056c4d commit 7037934
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
11 changes: 11 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,14 @@ http_archive(
strip_prefix = "aws-sdk-cpp-1.3.15",
build_file = "//third_party:aws.BUILD",
)

http_archive(
name = "ffmpeg",
urls = [
"https://mirror.bazel.build/github.com/FFmpeg/FFmpeg/archive/n3.4.4.tar.gz",
"https://github.com/FFmpeg/FFmpeg/archive/n3.4.4.tar.gz",
],
sha256 = "bbccc87cd031498728bcc2dba5596a47e6fd92b2cec060a71feef65617a261fe",
strip_prefix = "FFmpeg-n3.4.4",
build_file = "//third_party:ffmpeg.BUILD",
)
67 changes: 67 additions & 0 deletions third_party/ffmpeg.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Description:
# FFmpeg

licenses(["notice"]) # LGPL v2.1+ license

exports_files(["LICENSE.md"])

cc_library(
name = "ffmpeg",
srcs = [
],
hdrs = [
"libavformat/avformat.h",
"libavformat/avio.h",
"libavformat/version.h",
"libavcodec/version.h",
"libavcodec/avcodec.h",
"libavutil/avconfig.h",
"libavutil/samplefmt.h",
"libavutil/avutil.h",
"libavutil/common.h",
"libavutil/attributes.h",
"libavutil/macros.h",
"libavutil/version.h",
"libavutil/mem.h",
"libavutil/error.h",
"libavutil/rational.h",
"libavutil/mathematics.h",
"libavutil/intfloat.h",
"libavutil/log.h",
"libavutil/pixfmt.h",
"libavutil/buffer.h",
"libavutil/cpu.h",
"libavutil/channel_layout.h",
"libavutil/dict.h",
"libavutil/frame.h",
"libavutil/imgutils.h",
"libavutil/pixdesc.h",
"libswscale/swscale.h",
"libswscale/version.h",
],
copts = [],
defines = [],
includes = [],
linkopts = [
"-l:libavformat.so.57",
"-l:libavcodec.so.57",
"-l:libavutil.so.55",
"-l:libswscale.so.4",
],
visibility = ["//visibility:public"],
deps = [],
)

genrule(
name = "libavutil_avconfig_h",
outs = ["libavutil/avconfig.h"],
cmd = "\n".join([
"cat <<'EOF' >$@",
"#ifndef AVUTIL_AVCONFIG_H",
"#define AVUTIL_AVCONFIG_H",
"#define AV_HAVE_BIGENDIAN 0",
"#define AV_HAVE_FAST_UNALIGNED 1",
"#endif /* AVUTIL_AVCONFIG_H */",
"EOF",
]),
)

0 comments on commit 7037934

Please sign in to comment.