blob: 2ee08cc97ec38c8440f075b3d5d2eb9e1eb4f5be [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:071# 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 14:58:229import("../webrtc.gni")
kjellander@webrtc.org1227ab82014-06-23 19:21:0710
Mirko Bonadei86d053c2019-10-17 19:32:0411rtc_library("common_video") {
Per Kjellandera7f2d842018-01-10 15:54:5312 visibility = [ "*" ]
13
kjellander@webrtc.org11bea892014-07-03 17:04:1214 sources = [
emircan55a401e2016-04-26 19:55:0715 "bitrate_adjuster.cc",
Erik Språng7daf5502019-08-14 09:04:4016 "frame_rate_estimator.cc",
17 "frame_rate_estimator.h",
Åsa Persson062acd92021-08-16 07:33:1318 "framerate_controller.cc",
19 "framerate_controller.h",
kthelgasonb9061722016-10-26 09:48:1620 "h264/h264_bitstream_parser.cc",
21 "h264/h264_bitstream_parser.h",
sprang52033d62016-06-02 09:43:3222 "h264/h264_common.cc",
23 "h264/h264_common.h",
24 "h264/pps_parser.cc",
25 "h264/pps_parser.h",
26 "h264/sps_parser.cc",
27 "h264/sps_parser.h",
28 "h264/sps_vui_rewriter.cc",
29 "h264/sps_vui_rewriter.h",
emircan55a401e2016-04-26 19:55:0730 "include/bitrate_adjuster.h",
Henrik Boströmce33b6a2019-05-28 15:42:3831 "include/quality_limitation_reason.h",
kjellander6f8ce062015-11-16 21:52:2432 "include/video_frame_buffer.h",
Ilya Nikolaevskiy4c87d832020-09-18 13:18:5433 "include/video_frame_buffer_pool.h",
kjellander@webrtc.org11bea892014-07-03 17:04:1234 "libyuv/include/webrtc_libyuv.h",
kjellander@webrtc.org11bea892014-07-03 17:04:1235 "libyuv/webrtc_libyuv.cc",
magjed@webrtc.org2386d6d2015-03-05 14:03:0836 "video_frame_buffer.cc",
Ilya Nikolaevskiy4c87d832020-09-18 13:18:5437 "video_frame_buffer_pool.cc",
kjellander@webrtc.org11bea892014-07-03 17:04:1238 ]
39
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:2240 deps = [
Danil Chapovalov9a45e892021-09-13 13:55:0341 "../api:array_view",
Niels Möller105711e2022-06-14 13:48:2642 "../api:make_ref_counted",
Mirko Bonadeid9708072019-01-25 19:26:4843 "../api:scoped_refptr",
Artem Titovd15a5752021-02-10 13:31:2444 "../api:sequence_checker",
Sebastian Jansson74682c12019-03-01 10:50:2045 "../api/task_queue",
Erik Språng7daf5502019-08-14 09:04:4046 "../api/units:time_delta",
47 "../api/units:timestamp",
Niels Möller4dc66c52018-10-05 12:17:5848 "../api/video:encoded_image",
Erik Språngc8caaec2018-05-23 13:20:3149 "../api/video:video_bitrate_allocation",
Jiawei Ou4206a0a2018-07-20 22:49:4350 "../api/video:video_bitrate_allocator",
Niels Möllerc6ce9c52018-05-11 09:15:3051 "../api/video:video_frame",
Sergio Garcia Murillo8545eba2022-06-17 09:48:1452 "../api/video:video_frame_i010",
Chen Xing5d24b162019-06-10 10:59:3853 "../api/video:video_rtp_headers",
Kári Tristan Helgasonb1633592019-03-22 10:19:0854 "../api/video_codecs:bitstream_parser_api",
Johannes Kronc3fcee72021-04-19 07:09:2655 "../api/video_codecs:video_codecs_api",
Florent Castelli7f623b02022-04-14 11:34:5656 "../rtc_base:bit_buffer",
Danil Chapovalov9a45e892021-09-13 13:55:0357 "../rtc_base:bitstream_reader",
Florent Castellif9c59842022-04-19 15:07:2358 "../rtc_base:buffer",
Patrik Höglundbe214a22018-01-04 11:14:3559 "../rtc_base:checks",
Florent Castellia30aef32022-04-19 15:47:1360 "../rtc_base:event_tracer",
Florent Castelli0af55ba2022-04-04 13:06:3061 "../rtc_base:logging",
Florent Castelli4467ad72022-04-04 13:18:4662 "../rtc_base:macromagic",
Florent Castellif4db3512022-04-14 11:38:0563 "../rtc_base:race_checker",
Florent Castelli6bb1fd32022-04-19 13:58:3964 "../rtc_base:rate_statistics",
Florent Castellif86f6f92022-04-05 00:54:1265 "../rtc_base:refcount",
ehmaldonadof6a861a2017-07-19 17:40:4766 "../rtc_base:rtc_task_queue",
Karl Wiberg12edf4c2018-03-07 13:18:5667 "../rtc_base:safe_minmax",
Florent Castellidd837e22022-04-04 15:16:1568 "../rtc_base:timeutils",
Markus Handell06d034f2020-07-07 07:17:5669 "../rtc_base/synchronization:mutex",
Mirko Bonadeic66e0042019-10-18 07:52:2270 "../rtc_base/system:rtc_export",
Stefan Holmer0a5792e2018-10-05 11:47:1271 "../system_wrappers:metrics",
Patrik Höglundbe214a22018-01-04 11:14:3572 "//third_party/libyuv",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:2273 ]
Danil Chapovalov9a45e892021-09-13 13:55:0374 absl_deps = [
75 "//third_party/abseil-cpp/absl/numeric:bits",
76 "//third_party/abseil-cpp/absl/types:optional",
77 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:0778}
kjellander2a3892a2016-06-08 08:27:5279
Niels Möllera8327d42020-08-25 08:28:5080rtc_source_set("frame_counts") {
81 visibility = [ "*" ]
82
83 sources = [ "frame_counts.h" ]
84}
85
Andrey Logvine7c79fd2021-02-01 09:56:3786if (rtc_include_tests && !build_with_chromium) {
Mirko Bonadei92ea95e2017-09-15 04:47:3187 common_video_resources = [ "../resources/foreman_cif.yuv" ]
kjellander32c4a202016-08-30 09:53:4988
89 if (is_ios) {
90 bundle_data("common_video_unittests_bundle_data") {
91 testonly = true
92 sources = common_video_resources
Mirko Bonadeiccbe95f2020-01-21 11:10:1093 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
kjellander32c4a202016-08-30 09:53:4994 }
95 }
96
ehmaldonado38a21322016-09-02 11:10:3497 rtc_test("common_video_unittests") {
kjellander2a3892a2016-06-08 08:27:5298 testonly = true
99
100 sources = [
101 "bitrate_adjuster_unittest.cc",
Erik Språng7daf5502019-08-14 09:04:40102 "frame_rate_estimator_unittest.cc",
Åsa Persson062acd92021-08-16 07:33:13103 "framerate_controller_unittest.cc",
kthelgasonb9061722016-10-26 09:48:16104 "h264/h264_bitstream_parser_unittest.cc",
kjellander2a3892a2016-06-08 08:27:52105 "h264/pps_parser_unittest.cc",
106 "h264/sps_parser_unittest.cc",
107 "h264/sps_vui_rewriter_unittest.cc",
kjellander2a3892a2016-06-08 08:27:52108 "libyuv/libyuv_unittest.cc",
Ilya Nikolaevskiy4c87d832020-09-18 13:18:54109 "video_frame_buffer_pool_unittest.cc",
Emircan Uysaler901e0ff2018-06-26 19:22:38110 "video_frame_unittest.cc",
kjellander2a3892a2016-06-08 08:27:52111 ]
112
kjellander2a3892a2016-06-08 08:27:52113 deps = [
114 ":common_video",
Mirko Bonadeid9708072019-01-25 19:26:48115 "../api:scoped_refptr",
Yves Gerey3e707812018-11-28 15:47:49116 "../api/units:time_delta",
Niels Möllerc6ce9c52018-05-11 09:15:30117 "../api/video:video_frame",
Emircan Uysaler901e0ff2018-06-26 19:22:38118 "../api/video:video_frame_i010",
Chen Xing5d24b162019-06-10 10:59:38119 "../api/video:video_rtp_headers",
Johannes Kronc3fcee72021-04-19 07:09:26120 "../api/video_codecs:video_codecs_api",
Florent Castelli7f623b02022-04-14 11:34:56121 "../rtc_base:bit_buffer",
Florent Castellif9c59842022-04-19 15:07:23122 "../rtc_base:buffer",
Yves Gerey3e707812018-11-28 15:47:49123 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 13:06:30124 "../rtc_base:logging",
Florent Castelli4467ad72022-04-04 13:18:46125 "../rtc_base:macromagic",
Niels Möller2cb7b5e2018-04-19 08:02:26126 "../rtc_base:rtc_base_tests_utils",
Florent Castellidd837e22022-04-04 15:16:15127 "../rtc_base:timeutils",
Erik Språng7daf5502019-08-14 09:04:40128 "../system_wrappers:system_wrappers",
Patrik Höglund7696bef2018-03-15 14:05:39129 "../test:fileutils",
Artem Titov33f9d2b2019-12-05 14:59:00130 "../test:frame_utils",
ehmaldonado26bddb92016-11-30 14:12:01131 "../test:test_main",
Yves Gerey21cddff2018-10-30 20:12:42132 "../test:test_support",
kjellander2a3892a2016-06-08 08:27:52133 "../test:video_test_common",
kjellander2a3892a2016-06-08 08:27:52134 "//testing/gtest",
Mirko Bonadei401d0562017-12-14 10:24:00135 "//third_party/libyuv",
kjellander2a3892a2016-06-08 08:27:52136 ]
137
Andrey Logvin78646002021-01-29 10:50:19138 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
139
ehmaldonado3a7f35b2016-09-14 12:10:01140 data = common_video_resources
kjellander2a3892a2016-06-08 08:27:52141 if (is_android) {
142 deps += [ "//testing/android/native_test:native_test_support" ]
kjellander28a0ffd2016-08-24 14:48:42143 shard_timeout = 900
144 }
kjellander2a3892a2016-06-08 08:27:52145
kjellander32c4a202016-08-30 09:53:49146 if (is_ios) {
147 deps += [ ":common_video_unittests_bundle_data" ]
kjellander2a3892a2016-06-08 08:27:52148 }
149 }
150}