blob: ccb93ee62755bcc9beb73825d24dc869008d778a [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001# 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
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../webrtc.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000010
kjellanderb62dbbe2016-09-23 00:38:52 -070011rtc_static_library("common_video") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000012 visibility = [ "*" ]
13
kjellander@webrtc.org11bea892014-07-03 17:04:12 +000014 sources = [
emircan55a401e2016-04-26 12:55:07 -070015 "bitrate_adjuster.cc",
kthelgasonb9061722016-10-26 02:48:16 -070016 "h264/h264_bitstream_parser.cc",
17 "h264/h264_bitstream_parser.h",
sprang52033d62016-06-02 02:43:32 -070018 "h264/h264_common.cc",
19 "h264/h264_common.h",
20 "h264/pps_parser.cc",
21 "h264/pps_parser.h",
magjedfffc1e52016-10-31 05:55:57 -070022 "h264/profile_level_id.h",
sprang52033d62016-06-02 02:43:32 -070023 "h264/sps_parser.cc",
24 "h264/sps_parser.h",
25 "h264/sps_vui_rewriter.cc",
26 "h264/sps_vui_rewriter.h",
magjed@webrtc.org73d763e2015-03-17 11:40:45 +000027 "i420_buffer_pool.cc",
emircan55a401e2016-04-26 12:55:07 -070028 "include/bitrate_adjuster.h",
kjellander6f8ce062015-11-16 13:52:24 -080029 "include/i420_buffer_pool.h",
30 "include/incoming_video_stream.h",
Henrik Boströmce33b6a2019-05-28 17:42:38 +020031 "include/quality_limitation_reason.h",
nisseea3a7982017-05-15 02:42:11 -070032 "include/video_frame.h",
kjellander6f8ce062015-11-16 13:52:24 -080033 "include/video_frame_buffer.h",
Peter Boström9a638662015-05-13 13:28:11 +020034 "incoming_video_stream.cc",
kjellander@webrtc.org11bea892014-07-03 17:04:12 +000035 "libyuv/include/webrtc_libyuv.h",
kjellander@webrtc.org11bea892014-07-03 17:04:12 +000036 "libyuv/webrtc_libyuv.cc",
magjed@webrtc.org2386d6d2015-03-05 14:03:08 +000037 "video_frame_buffer.cc",
Peter Boström9a638662015-05-13 13:28:11 +020038 "video_render_frames.cc",
39 "video_render_frames.h",
kjellander@webrtc.org11bea892014-07-03 17:04:12 +000040 ]
41
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000042 deps = [
Mirko Bonadeid9708072019-01-25 20:26:48 +010043 "../api:scoped_refptr",
Sebastian Jansson74682c12019-03-01 11:50:20 +010044 "../api/task_queue",
Niels Möller4dc66c52018-10-05 14:17:58 +020045 "../api/video:encoded_image",
Erik Språngc8caaec2018-05-23 15:20:31 +020046 "../api/video:video_bitrate_allocation",
Jiawei Ou4206a0a2018-07-20 15:49:43 -070047 "../api/video:video_bitrate_allocator",
Niels Möllerc6ce9c52018-05-11 11:15:30 +020048 "../api/video:video_frame",
49 "../api/video:video_frame_i420",
Chen Xing5d24b162019-06-10 12:59:38 +020050 "../api/video:video_rtp_headers",
Kári Tristan Helgasonb1633592019-03-22 11:19:08 +010051 "../api/video_codecs:bitstream_parser_api",
zhihuang130ca7e2017-06-21 01:02:59 -070052 "../media:rtc_h264_profile_id",
Artem Titov94b57c02019-03-21 13:35:10 +010053 "../rtc_base",
Patrik Höglundbe214a22018-01-04 12:14:35 +010054 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -070055 "../rtc_base:rtc_task_queue",
Karl Wiberg12edf4c2018-03-07 14:18:56 +010056 "../rtc_base:safe_minmax",
Stefan Holmer0a5792e2018-10-05 13:47:12 +020057 "../system_wrappers:metrics",
Danil Chapovalov196100e2018-06-21 10:17:24 +020058 "//third_party/abseil-cpp/absl/types:optional",
Patrik Höglundbe214a22018-01-04 12:14:35 +010059 "//third_party/libyuv",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000060 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000061}
kjellander2a3892a2016-06-08 01:27:52 -070062
63if (rtc_include_tests) {
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020064 common_video_resources = [ "../resources/foreman_cif.yuv" ]
kjellander32c4a202016-08-30 02:53:49 -070065
66 if (is_ios) {
67 bundle_data("common_video_unittests_bundle_data") {
68 testonly = true
69 sources = common_video_resources
70 outputs = [
71 "{{bundle_resources_dir}}/{{source_file_part}}",
72 ]
73 }
74 }
75
ehmaldonado38a21322016-09-02 04:10:34 -070076 rtc_test("common_video_unittests") {
kjellander2a3892a2016-06-08 01:27:52 -070077 testonly = true
78
79 sources = [
80 "bitrate_adjuster_unittest.cc",
kthelgasonb9061722016-10-26 02:48:16 -070081 "h264/h264_bitstream_parser_unittest.cc",
kjellander2a3892a2016-06-08 01:27:52 -070082 "h264/pps_parser_unittest.cc",
magjedfffc1e52016-10-31 05:55:57 -070083 "h264/profile_level_id_unittest.cc",
kjellander2a3892a2016-06-08 01:27:52 -070084 "h264/sps_parser_unittest.cc",
85 "h264/sps_vui_rewriter_unittest.cc",
86 "i420_buffer_pool_unittest.cc",
kjellander2a3892a2016-06-08 01:27:52 -070087 "libyuv/libyuv_unittest.cc",
Emircan Uysaler901e0ff2018-06-26 12:22:38 -070088 "video_frame_unittest.cc",
kjellander2a3892a2016-06-08 01:27:52 -070089 ]
90
kjellander2a3892a2016-06-08 01:27:52 -070091 deps = [
92 ":common_video",
Yves Gerey3e707812018-11-28 16:47:49 +010093 "../:webrtc_common",
Mirko Bonadeid9708072019-01-25 20:26:48 +010094 "../api:scoped_refptr",
Yves Gerey3e707812018-11-28 16:47:49 +010095 "../api/units:time_delta",
Niels Möllerc6ce9c52018-05-11 11:15:30 +020096 "../api/video:video_frame",
Emircan Uysaler901e0ff2018-06-26 12:22:38 -070097 "../api/video:video_frame_i010",
Niels Möllerc6ce9c52018-05-11 11:15:30 +020098 "../api/video:video_frame_i420",
Chen Xing5d24b162019-06-10 12:59:38 +020099 "../api/video:video_rtp_headers",
Yves Gerey3e707812018-11-28 16:47:49 +0100100 "../media:rtc_h264_profile_id",
Artem Titov94b57c02019-03-21 13:35:10 +0100101 "../rtc_base",
Yves Gerey3e707812018-11-28 16:47:49 +0100102 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700103 "../rtc_base:rtc_base_approved",
Niels Möller2cb7b5e2018-04-19 10:02:26 +0200104 "../rtc_base:rtc_base_tests_utils",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100105 "../test:fileutils",
ehmaldonado26bddb92016-11-30 06:12:01 -0800106 "../test:test_main",
Yves Gerey21cddff2018-10-30 21:12:42 +0100107 "../test:test_support",
kjellander2a3892a2016-06-08 01:27:52 -0700108 "../test:video_test_common",
kjellander2a3892a2016-06-08 01:27:52 -0700109 "//testing/gtest",
Artem Titov533a9fe2019-03-21 12:18:05 +0100110 "//third_party/abseil-cpp/absl/memory",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100111 "//third_party/libyuv",
kjellander2a3892a2016-06-08 01:27:52 -0700112 ]
113
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700114 data = common_video_resources
kjellander2a3892a2016-06-08 01:27:52 -0700115 if (is_android) {
116 deps += [ "//testing/android/native_test:native_test_support" ]
kjellander28a0ffd2016-08-24 07:48:42 -0700117 shard_timeout = 900
118 }
kjellander2a3892a2016-06-08 01:27:52 -0700119
kjellander32c4a202016-08-30 02:53:49 -0700120 if (is_ios) {
121 deps += [ ":common_video_unittests_bundle_data" ]
kjellander2a3892a2016-06-08 01:27:52 -0700122 }
123 }
124}