blob: 4736aa5fb6136511e4d4d98d7e4e69480b2d9dcf [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
qwu16972f2832023-08-15 09:16:5440 if (rtc_use_h265) {
41 sources += [
42 "h265/h265_bitstream_parser.cc",
43 "h265/h265_bitstream_parser.h",
44 "h265/h265_common.cc",
45 "h265/h265_common.h",
46 "h265/h265_inline.cc",
47 "h265/h265_inline.h",
48 "h265/h265_pps_parser.cc",
49 "h265/h265_pps_parser.h",
50 "h265/h265_sps_parser.cc",
51 "h265/h265_sps_parser.h",
52 "h265/h265_vps_parser.cc",
53 "h265/h265_vps_parser.h",
54 ]
55 }
56
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:2257 deps = [
Danil Chapovalov9a45e892021-09-13 13:55:0358 "../api:array_view",
Niels Möller105711e2022-06-14 13:48:2659 "../api:make_ref_counted",
Mirko Bonadeid9708072019-01-25 19:26:4860 "../api:scoped_refptr",
Artem Titovd15a5752021-02-10 13:31:2461 "../api:sequence_checker",
Sebastian Jansson74682c12019-03-01 10:50:2062 "../api/task_queue",
Erik Språng7daf5502019-08-14 09:04:4063 "../api/units:time_delta",
64 "../api/units:timestamp",
Niels Möller4dc66c52018-10-05 12:17:5865 "../api/video:encoded_image",
Erik Språngc8caaec2018-05-23 13:20:3166 "../api/video:video_bitrate_allocation",
Jiawei Ou4206a0a2018-07-20 22:49:4367 "../api/video:video_bitrate_allocator",
Niels Möllerc6ce9c52018-05-11 09:15:3068 "../api/video:video_frame",
Sergio Garcia Murillo8545eba2022-06-17 09:48:1469 "../api/video:video_frame_i010",
Chen Xing5d24b162019-06-10 10:59:3870 "../api/video:video_rtp_headers",
Kári Tristan Helgasonb1633592019-03-22 10:19:0871 "../api/video_codecs:bitstream_parser_api",
Johannes Kronc3fcee72021-04-19 07:09:2672 "../api/video_codecs:video_codecs_api",
Florent Castelli7f623b02022-04-14 11:34:5673 "../rtc_base:bit_buffer",
Danil Chapovalov9a45e892021-09-13 13:55:0374 "../rtc_base:bitstream_reader",
Florent Castellif9c59842022-04-19 15:07:2375 "../rtc_base:buffer",
Patrik Höglundbe214a22018-01-04 11:14:3576 "../rtc_base:checks",
Florent Castellia30aef32022-04-19 15:47:1377 "../rtc_base:event_tracer",
Florent Castelli0af55ba2022-04-04 13:06:3078 "../rtc_base:logging",
Florent Castelli4467ad72022-04-04 13:18:4679 "../rtc_base:macromagic",
Florent Castellif4db3512022-04-14 11:38:0580 "../rtc_base:race_checker",
Florent Castelli6bb1fd32022-04-19 13:58:3981 "../rtc_base:rate_statistics",
Florent Castellif86f6f92022-04-05 00:54:1282 "../rtc_base:refcount",
ehmaldonadof6a861a2017-07-19 17:40:4783 "../rtc_base:rtc_task_queue",
Karl Wiberg12edf4c2018-03-07 13:18:5684 "../rtc_base:safe_minmax",
Florent Castellidd837e22022-04-04 15:16:1585 "../rtc_base:timeutils",
Markus Handell06d034f2020-07-07 07:17:5686 "../rtc_base/synchronization:mutex",
Mirko Bonadeic66e0042019-10-18 07:52:2287 "../rtc_base/system:rtc_export",
Stefan Holmer0a5792e2018-10-05 11:47:1288 "../system_wrappers:metrics",
Patrik Höglundbe214a22018-01-04 11:14:3589 "//third_party/libyuv",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:2290 ]
qwu16972f2832023-08-15 09:16:5491 if (rtc_use_h265) {
92 deps += [
93 "../rtc_base:compile_assert_c",
94 "../rtc_base/containers:flat_map",
95 ]
96 }
Danil Chapovalov9a45e892021-09-13 13:55:0397 absl_deps = [
98 "//third_party/abseil-cpp/absl/numeric:bits",
99 "//third_party/abseil-cpp/absl/types:optional",
100 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07101}
kjellander2a3892a2016-06-08 08:27:52102
Niels Möllera8327d42020-08-25 08:28:50103rtc_source_set("frame_counts") {
104 visibility = [ "*" ]
105
106 sources = [ "frame_counts.h" ]
107}
108
Andrey Logvine7c79fd2021-02-01 09:56:37109if (rtc_include_tests && !build_with_chromium) {
Mirko Bonadei92ea95e2017-09-15 04:47:31110 common_video_resources = [ "../resources/foreman_cif.yuv" ]
kjellander32c4a202016-08-30 09:53:49111
112 if (is_ios) {
113 bundle_data("common_video_unittests_bundle_data") {
114 testonly = true
115 sources = common_video_resources
Mirko Bonadeiccbe95f2020-01-21 11:10:10116 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
kjellander32c4a202016-08-30 09:53:49117 }
118 }
119
ehmaldonado38a21322016-09-02 11:10:34120 rtc_test("common_video_unittests") {
kjellander2a3892a2016-06-08 08:27:52121 testonly = true
122
123 sources = [
124 "bitrate_adjuster_unittest.cc",
Erik Språng7daf5502019-08-14 09:04:40125 "frame_rate_estimator_unittest.cc",
Åsa Persson062acd92021-08-16 07:33:13126 "framerate_controller_unittest.cc",
kthelgasonb9061722016-10-26 09:48:16127 "h264/h264_bitstream_parser_unittest.cc",
kjellander2a3892a2016-06-08 08:27:52128 "h264/pps_parser_unittest.cc",
129 "h264/sps_parser_unittest.cc",
130 "h264/sps_vui_rewriter_unittest.cc",
kjellander2a3892a2016-06-08 08:27:52131 "libyuv/libyuv_unittest.cc",
Ilya Nikolaevskiy4c87d832020-09-18 13:18:54132 "video_frame_buffer_pool_unittest.cc",
Emircan Uysaler901e0ff2018-06-26 19:22:38133 "video_frame_unittest.cc",
kjellander2a3892a2016-06-08 08:27:52134 ]
135
qwu16972f2832023-08-15 09:16:54136 if (rtc_use_h265) {
137 sources += [
138 "h265/h265_bitstream_parser_unittest.cc",
139 "h265/h265_pps_parser_unittest.cc",
140 "h265/h265_sps_parser_unittest.cc",
141 "h265/h265_vps_parser_unittest.cc",
142 ]
143 }
144
kjellander2a3892a2016-06-08 08:27:52145 deps = [
146 ":common_video",
Mirko Bonadeid9708072019-01-25 19:26:48147 "../api:scoped_refptr",
Yves Gerey3e707812018-11-28 15:47:49148 "../api/units:time_delta",
Niels Möllerc6ce9c52018-05-11 09:15:30149 "../api/video:video_frame",
Emircan Uysaler901e0ff2018-06-26 19:22:38150 "../api/video:video_frame_i010",
Chen Xing5d24b162019-06-10 10:59:38151 "../api/video:video_rtp_headers",
Johannes Kronc3fcee72021-04-19 07:09:26152 "../api/video_codecs:video_codecs_api",
Florent Castelli7f623b02022-04-14 11:34:56153 "../rtc_base:bit_buffer",
Florent Castellif9c59842022-04-19 15:07:23154 "../rtc_base:buffer",
Yves Gerey3e707812018-11-28 15:47:49155 "../rtc_base:checks",
Florent Castelli0af55ba2022-04-04 13:06:30156 "../rtc_base:logging",
Florent Castelli4467ad72022-04-04 13:18:46157 "../rtc_base:macromagic",
Niels Möller2cb7b5e2018-04-19 08:02:26158 "../rtc_base:rtc_base_tests_utils",
Florent Castellidd837e22022-04-04 15:16:15159 "../rtc_base:timeutils",
Erik Språng7daf5502019-08-14 09:04:40160 "../system_wrappers:system_wrappers",
Patrik Höglund7696bef2018-03-15 14:05:39161 "../test:fileutils",
Artem Titov33f9d2b2019-12-05 14:59:00162 "../test:frame_utils",
ehmaldonado26bddb92016-11-30 14:12:01163 "../test:test_main",
Yves Gerey21cddff2018-10-30 20:12:42164 "../test:test_support",
kjellander2a3892a2016-06-08 08:27:52165 "../test:video_test_common",
kjellander2a3892a2016-06-08 08:27:52166 "//testing/gtest",
Mirko Bonadei401d0562017-12-14 10:24:00167 "//third_party/libyuv",
kjellander2a3892a2016-06-08 08:27:52168 ]
169
Andrey Logvin78646002021-01-29 10:50:19170 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
171
ehmaldonado3a7f35b2016-09-14 12:10:01172 data = common_video_resources
kjellander2a3892a2016-06-08 08:27:52173 if (is_android) {
174 deps += [ "//testing/android/native_test:native_test_support" ]
kjellander28a0ffd2016-08-24 14:48:42175 shard_timeout = 900
176 }
kjellander2a3892a2016-06-08 08:27:52177
kjellander32c4a202016-08-30 09:53:49178 if (is_ios) {
179 deps += [ ":common_video_unittests_bundle_data" ]
kjellander2a3892a2016-06-08 08:27:52180 }
181 }
182}