kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 1 | # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license |
| 4 | # that can be found in the LICENSE file in the root of the source |
| 5 | # tree. An additional intellectual property rights grant can be found |
| 6 | # in the file PATENTS. All contributing project authors may |
| 7 | # be found in the AUTHORS file in the root of the source tree. |
| 8 | |
mbonadei | 9aa3f0a | 2017-01-24 06:58:22 -0800 | [diff] [blame] | 9 | import("../webrtc.gni") |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 10 | |
kjellander@webrtc.org | 11bea89 | 2014-07-03 17:04:12 +0000 | [diff] [blame] | 11 | config("common_video_config") { |
Mirko Bonadei | 0250be5 | 2017-12-01 13:53:04 +0100 | [diff] [blame] | 12 | include_dirs = [ "include" ] |
kjellander@webrtc.org | 11bea89 | 2014-07-03 17:04:12 +0000 | [diff] [blame] | 13 | } |
| 14 | |
kjellander | b62dbbe | 2016-09-23 00:38:52 -0700 | [diff] [blame] | 15 | rtc_static_library("common_video") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 16 | visibility = [ "*" ] |
| 17 | |
kjellander@webrtc.org | 11bea89 | 2014-07-03 17:04:12 +0000 | [diff] [blame] | 18 | sources = [ |
emircan | 55a401e | 2016-04-26 12:55:07 -0700 | [diff] [blame] | 19 | "bitrate_adjuster.cc", |
kthelgason | b906172 | 2016-10-26 02:48:16 -0700 | [diff] [blame] | 20 | "h264/h264_bitstream_parser.cc", |
| 21 | "h264/h264_bitstream_parser.h", |
sprang | 52033d6 | 2016-06-02 02:43:32 -0700 | [diff] [blame] | 22 | "h264/h264_common.cc", |
| 23 | "h264/h264_common.h", |
| 24 | "h264/pps_parser.cc", |
| 25 | "h264/pps_parser.h", |
magjed | fffc1e5 | 2016-10-31 05:55:57 -0700 | [diff] [blame] | 26 | "h264/profile_level_id.h", |
sprang | 52033d6 | 2016-06-02 02:43:32 -0700 | [diff] [blame] | 27 | "h264/sps_parser.cc", |
| 28 | "h264/sps_parser.h", |
| 29 | "h264/sps_vui_rewriter.cc", |
| 30 | "h264/sps_vui_rewriter.h", |
magjed@webrtc.org | 73d763e | 2015-03-17 11:40:45 +0000 | [diff] [blame] | 31 | "i420_buffer_pool.cc", |
emircan | 55a401e | 2016-04-26 12:55:07 -0700 | [diff] [blame] | 32 | "include/bitrate_adjuster.h", |
pbos | a96b60b | 2016-04-18 21:12:48 -0700 | [diff] [blame] | 33 | "include/frame_callback.h", |
kjellander | 6f8ce06 | 2015-11-16 13:52:24 -0800 | [diff] [blame] | 34 | "include/i420_buffer_pool.h", |
| 35 | "include/incoming_video_stream.h", |
Erik Språng | 08127a9 | 2016-11-16 16:41:30 +0100 | [diff] [blame] | 36 | "include/video_bitrate_allocator.h", |
nisse | ea3a798 | 2017-05-15 02:42:11 -0700 | [diff] [blame] | 37 | "include/video_frame.h", |
kjellander | 6f8ce06 | 2015-11-16 13:52:24 -0800 | [diff] [blame] | 38 | "include/video_frame_buffer.h", |
Peter Boström | 9a63866 | 2015-05-13 13:28:11 +0200 | [diff] [blame] | 39 | "incoming_video_stream.cc", |
kjellander@webrtc.org | 11bea89 | 2014-07-03 17:04:12 +0000 | [diff] [blame] | 40 | "libyuv/include/webrtc_libyuv.h", |
kjellander@webrtc.org | 11bea89 | 2014-07-03 17:04:12 +0000 | [diff] [blame] | 41 | "libyuv/webrtc_libyuv.cc", |
Miguel Casas-Sanchez | 4765070 | 2015-05-29 17:21:40 -0700 | [diff] [blame] | 42 | "video_frame.cc", |
magjed@webrtc.org | 2386d6d | 2015-03-05 14:03:08 +0000 | [diff] [blame] | 43 | "video_frame_buffer.cc", |
Peter Boström | 9a63866 | 2015-05-13 13:28:11 +0200 | [diff] [blame] | 44 | "video_render_frames.cc", |
| 45 | "video_render_frames.h", |
kjellander@webrtc.org | 11bea89 | 2014-07-03 17:04:12 +0000 | [diff] [blame] | 46 | ] |
| 47 | |
| 48 | include_dirs = [ "../modules/interface" ] |
| 49 | |
ehmaldonado | e9cc686 | 2016-09-05 06:10:18 -0700 | [diff] [blame] | 50 | public_configs = [ ":common_video_config" ] |
kjellander@webrtc.org | 11bea89 | 2014-07-03 17:04:12 +0000 | [diff] [blame] | 51 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 52 | if (!build_with_chromium && is_clang) { |
| 53 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 54 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander@webrtc.org | 42ee5b5 | 2014-08-25 14:15:35 +0000 | [diff] [blame] | 55 | } |
| 56 | |
kwiberg@webrtc.org | ac2d27d | 2015-02-26 13:59:22 +0000 | [diff] [blame] | 57 | deps = [ |
| 58 | "..:webrtc_common", |
Patrik Höglund | be214a2 | 2018-01-04 12:14:35 +0100 | [diff] [blame] | 59 | "../:typedefs", |
kwiberg | 84f6a3f | 2017-09-05 08:43:13 -0700 | [diff] [blame] | 60 | "../api:optional", |
Mirko Bonadei | 0594a7c | 2017-12-18 11:42:48 +0100 | [diff] [blame] | 61 | "../api:video_frame_api", |
Patrik Höglund | b5b5bce | 2017-11-13 10:19:58 +0100 | [diff] [blame] | 62 | "../api:video_frame_api_i420", |
zhihuang | 130ca7e | 2017-06-21 01:02:59 -0700 | [diff] [blame] | 63 | "../media:rtc_h264_profile_id", |
mbonadei | 1140f97 | 2017-04-26 03:38:35 -0700 | [diff] [blame] | 64 | "../modules:module_api", |
Patrik Höglund | be214a2 | 2018-01-04 12:14:35 +0100 | [diff] [blame] | 65 | "../rtc_base:checks", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 66 | "../rtc_base:rtc_base", |
| 67 | "../rtc_base:rtc_task_queue", |
Karl Wiberg | 12edf4c | 2018-03-07 14:18:56 +0100 | [diff] [blame] | 68 | "../rtc_base:safe_minmax", |
kwiberg@webrtc.org | ac2d27d | 2015-02-26 13:59:22 +0000 | [diff] [blame] | 69 | "../system_wrappers", |
Patrik Höglund | be214a2 | 2018-01-04 12:14:35 +0100 | [diff] [blame] | 70 | "//third_party/libyuv", |
kwiberg@webrtc.org | ac2d27d | 2015-02-26 13:59:22 +0000 | [diff] [blame] | 71 | ] |
kjellander@webrtc.org | 1227ab8 | 2014-06-23 19:21:07 +0000 | [diff] [blame] | 72 | } |
kjellander | 2a3892a | 2016-06-08 01:27:52 -0700 | [diff] [blame] | 73 | |
| 74 | if (rtc_include_tests) { |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 75 | common_video_resources = [ "../resources/foreman_cif.yuv" ] |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 76 | |
| 77 | if (is_ios) { |
| 78 | bundle_data("common_video_unittests_bundle_data") { |
| 79 | testonly = true |
| 80 | sources = common_video_resources |
| 81 | outputs = [ |
| 82 | "{{bundle_resources_dir}}/{{source_file_part}}", |
| 83 | ] |
| 84 | } |
| 85 | } |
| 86 | |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 87 | rtc_test("common_video_unittests") { |
kjellander | 2a3892a | 2016-06-08 01:27:52 -0700 | [diff] [blame] | 88 | testonly = true |
| 89 | |
| 90 | sources = [ |
| 91 | "bitrate_adjuster_unittest.cc", |
kthelgason | b906172 | 2016-10-26 02:48:16 -0700 | [diff] [blame] | 92 | "h264/h264_bitstream_parser_unittest.cc", |
kjellander | 2a3892a | 2016-06-08 01:27:52 -0700 | [diff] [blame] | 93 | "h264/pps_parser_unittest.cc", |
magjed | fffc1e5 | 2016-10-31 05:55:57 -0700 | [diff] [blame] | 94 | "h264/profile_level_id_unittest.cc", |
kjellander | 2a3892a | 2016-06-08 01:27:52 -0700 | [diff] [blame] | 95 | "h264/sps_parser_unittest.cc", |
| 96 | "h264/sps_vui_rewriter_unittest.cc", |
| 97 | "i420_buffer_pool_unittest.cc", |
| 98 | "i420_video_frame_unittest.cc", |
| 99 | "libyuv/libyuv_unittest.cc", |
kjellander | 2a3892a | 2016-06-08 01:27:52 -0700 | [diff] [blame] | 100 | ] |
| 101 | |
kjellander | 2a3892a | 2016-06-08 01:27:52 -0700 | [diff] [blame] | 102 | # TODO(jschuh): Bug 1348: fix this warning. |
| 103 | configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 104 | |
kjellander | e40a7ee | 2016-10-16 23:56:12 -0700 | [diff] [blame] | 105 | if (!build_with_chromium && is_clang) { |
| 106 | # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
ehmaldonado | 38a2132 | 2016-09-02 04:10:34 -0700 | [diff] [blame] | 107 | suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
kjellander | 2a3892a | 2016-06-08 01:27:52 -0700 | [diff] [blame] | 108 | } |
| 109 | |
| 110 | deps = [ |
| 111 | ":common_video", |
Mirko Bonadei | 0594a7c | 2017-12-18 11:42:48 +0100 | [diff] [blame] | 112 | "../api:video_frame_api", |
Patrik Höglund | b5b5bce | 2017-11-13 10:19:58 +0100 | [diff] [blame] | 113 | "../api:video_frame_api_i420", |
ehmaldonado | 656610f | 2017-02-06 02:21:11 -0800 | [diff] [blame] | 114 | "../modules/video_capture:video_capture", |
ehmaldonado | f6a861a | 2017-07-19 10:40:47 -0700 | [diff] [blame] | 115 | "../rtc_base:rtc_base", |
| 116 | "../rtc_base:rtc_base_approved", |
kjellander | 2a3892a | 2016-06-08 01:27:52 -0700 | [diff] [blame] | 117 | "../system_wrappers:system_wrappers", |
Patrik Höglund | 7696bef | 2018-03-15 15:05:39 +0100 | [diff] [blame] | 118 | "../test:fileutils", |
ehmaldonado | 26bddb9 | 2016-11-30 06:12:01 -0800 | [diff] [blame] | 119 | "../test:test_main", |
kjellander | 2a3892a | 2016-06-08 01:27:52 -0700 | [diff] [blame] | 120 | "../test:video_test_common", |
kjellander | 2a3892a | 2016-06-08 01:27:52 -0700 | [diff] [blame] | 121 | "//testing/gtest", |
Mirko Bonadei | 401d056 | 2017-12-14 11:24:00 +0100 | [diff] [blame] | 122 | "//third_party/libyuv", |
kjellander | 2a3892a | 2016-06-08 01:27:52 -0700 | [diff] [blame] | 123 | ] |
| 124 | |
ehmaldonado | 3a7f35b | 2016-09-14 05:10:01 -0700 | [diff] [blame] | 125 | data = common_video_resources |
kjellander | 2a3892a | 2016-06-08 01:27:52 -0700 | [diff] [blame] | 126 | if (is_android) { |
| 127 | deps += [ "//testing/android/native_test:native_test_support" ] |
kjellander | 28a0ffd | 2016-08-24 07:48:42 -0700 | [diff] [blame] | 128 | shard_timeout = 900 |
| 129 | } |
kjellander | 2a3892a | 2016-06-08 01:27:52 -0700 | [diff] [blame] | 130 | |
kjellander | 32c4a20 | 2016-08-30 02:53:49 -0700 | [diff] [blame] | 131 | if (is_ios) { |
| 132 | deps += [ ":common_video_unittests_bundle_data" ] |
kjellander | 2a3892a | 2016-06-08 01:27:52 -0700 | [diff] [blame] | 133 | } |
| 134 | } |
| 135 | } |