| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/buildflag_header.gni") |
| 5 import("//build/config/linux/pkg_config.gni") | 6 import("//build/config/linux/pkg_config.gni") |
| 6 import("//build/shim_headers.gni") | 7 import("//build/shim_headers.gni") |
| 7 | 8 |
| 8 pkg_config("system_ffmpeg") { | 9 pkg_config("system_ffmpeg") { |
| 9 packages = [ | 10 packages = [ |
| 10 "libavcodec", | 11 "libavcodec", |
| 11 "libavformat", | 12 "libavformat", |
| 12 "libavutil", | 13 "libavutil", |
| 13 ] | 14 ] |
| 14 } | 15 } |
| 15 | 16 |
| 16 config("using_system_ffmpeg") { | 17 buildflag_header("ffmpeg_features") { |
| 17 defines = [ "USE_SYSTEM_FFMPEG=1" ] | 18 header = "ffmpeg_features.h" |
| 19 flags = [ "USE_SYSTEM_FFMPEG=true" ] |
| 18 } | 20 } |
| 19 | 21 |
| 20 shim_headers("ffmpeg_shim") { | 22 shim_headers("ffmpeg_shim") { |
| 21 root_path = "." | 23 root_path = "." |
| 22 headers = [ | 24 headers = [ |
| 23 "libavcodec/avcodec.h", | 25 "libavcodec/avcodec.h", |
| 24 "libavformat/avformat.h", | 26 "libavformat/avformat.h", |
| 25 "libavutil/imgutils.h", | 27 "libavutil/imgutils.h", |
| 26 ] | 28 ] |
| 27 } | 29 } |
| 28 | 30 |
| 29 source_set("ffmpeg") { | 31 source_set("ffmpeg") { |
| 30 deps = [ | 32 deps = [ |
| 33 ":ffmpeg_features", |
| 31 ":ffmpeg_shim", | 34 ":ffmpeg_shim", |
| 32 ] | 35 ] |
| 33 public_configs = [ | 36 public_configs = [ ":system_ffmpeg" ] |
| 34 ":system_ffmpeg", | |
| 35 ":using_system_ffmpeg", | |
| 36 ] | |
| 37 } | 37 } |
| OLD | NEW |