BUILD.gn (10773B)
1 # Copyright (c) 2018 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 9 import("../../webrtc.gni") 10 if (is_android) { 11 import("//chromium/build/config/android/config.gni") 12 import("//chromium/build/config/android/rules.gni") 13 } 14 15 rtc_library("video_rtp_headers") { 16 visibility = [ "*" ] 17 sources = [ 18 "color_space.cc", 19 "color_space.h", 20 "hdr_metadata.cc", 21 "hdr_metadata.h", 22 "video_content_type.cc", 23 "video_content_type.h", 24 "video_rotation.h", 25 "video_timing.cc", 26 "video_timing.h", 27 ] 28 29 deps = [ 30 "..:array_view", 31 "../../rtc_base:checks", 32 "../../rtc_base:logging", 33 "../../rtc_base:safe_conversions", 34 "../../rtc_base:stringutils", 35 "../../rtc_base/system:rtc_export", 36 "../units:data_rate", 37 "../units:time_delta", 38 ] 39 } 40 41 rtc_library("video_frame") { 42 visibility = [ "*" ] 43 sources = [ 44 "i420_buffer.cc", 45 "i420_buffer.h", 46 "i422_buffer.cc", 47 "i422_buffer.h", 48 "i444_buffer.cc", 49 "i444_buffer.h", 50 "nv12_buffer.cc", 51 "nv12_buffer.h", 52 "video_codec_type.h", 53 "video_frame.cc", 54 "video_frame.h", 55 "video_frame_buffer.cc", 56 "video_frame_buffer.h", 57 "video_sink_interface.h", 58 "video_source_interface.cc", 59 "video_source_interface.h", 60 ] 61 62 deps = [ 63 ":video_rtp_headers", 64 "..:array_view", 65 "..:make_ref_counted", 66 "..:ref_count", 67 "..:rtp_packet_info", 68 "..:scoped_refptr", 69 "..:video_track_source_constraints", 70 "../../rtc_base:checks", 71 "../../rtc_base:refcount", 72 "../../rtc_base:safe_conversions", 73 "../../rtc_base:timeutils", 74 "../../rtc_base/memory:aligned_malloc", 75 "../../rtc_base/system:rtc_export", 76 "../units:time_delta", 77 "../units:timestamp", 78 "//third_party/libyuv", 79 ] 80 } 81 82 if (is_android) { 83 java_cpp_enum("video_frame_enums") { 84 sources = [ "video_frame_buffer.h" ] 85 } 86 } 87 88 rtc_library("video_frame_i010") { 89 visibility = [ "*" ] 90 sources = [ 91 "i010_buffer.cc", 92 "i010_buffer.h", 93 "i210_buffer.cc", 94 "i210_buffer.h", 95 "i410_buffer.cc", 96 "i410_buffer.h", 97 ] 98 deps = [ 99 ":video_frame", 100 ":video_rtp_headers", 101 "..:make_ref_counted", 102 "..:scoped_refptr", 103 "../../rtc_base:checks", 104 "../../rtc_base:refcount", 105 "../../rtc_base:safe_conversions", 106 "../../rtc_base/memory:aligned_malloc", 107 "../../rtc_base/system:rtc_export", 108 "//third_party/libyuv", 109 ] 110 } 111 112 rtc_source_set("recordable_encoded_frame") { 113 visibility = [ "*" ] 114 sources = [ "recordable_encoded_frame.h" ] 115 116 deps = [ 117 ":encoded_image", 118 ":video_frame", 119 ":video_rtp_headers", 120 "..:array_view", 121 "..:make_ref_counted", 122 "..:scoped_refptr", 123 "../units:timestamp", 124 ] 125 } 126 127 rtc_source_set("video_frame_type") { 128 visibility = [ "*" ] 129 sources = [ "video_frame_type.h" ] 130 deps = [ 131 "../../rtc_base:checks", 132 "//third_party/abseil-cpp/absl/strings:string_view", 133 ] 134 } 135 136 rtc_source_set("render_resolution") { 137 visibility = [ "*" ] 138 sources = [ "render_resolution.h" ] 139 } 140 141 rtc_source_set("resolution") { 142 visibility = [ "*" ] 143 sources = [ "resolution.h" ] 144 deps = [ "../../rtc_base/system:rtc_export" ] 145 } 146 147 # TODO: bugs.webrtc.org/358039777 - Remove when safe. 148 rtc_source_set("corruption_detection_filter_settings") { 149 visibility = [ "*" ] 150 sources = [ "corruption_detection_filter_settings.h" ] 151 deps = [ "corruption_detection:filter_settings" ] 152 } 153 154 rtc_library("encoded_image") { 155 visibility = [ "*" ] 156 sources = [ 157 "encoded_image.cc", 158 "encoded_image.h", 159 ] 160 deps = [ 161 ":video_codec_constants", 162 ":video_frame", 163 ":video_frame_type", 164 ":video_rtp_headers", 165 "..:make_ref_counted", 166 "..:ref_count", 167 "..:refcountedbase", 168 "..:rtp_packet_info", 169 "..:scoped_refptr", 170 "../../rtc_base:buffer", 171 "../../rtc_base:checks", 172 "../../rtc_base:refcount", 173 "../../rtc_base/system:rtc_export", 174 "../units:timestamp", 175 "corruption_detection:filter_settings", 176 ] 177 } 178 179 rtc_library("encoded_frame") { 180 visibility = [ "*" ] 181 sources = [ 182 "encoded_frame.cc", 183 "encoded_frame.h", 184 ] 185 186 deps = [ 187 ":encoded_image", 188 ":video_frame", 189 "../../modules/rtp_rtcp:rtp_video_header", 190 "../../modules/video_coding:codec_globals_headers", 191 "../../modules/video_coding:video_codec_interface", 192 "../units:timestamp", 193 "corruption_detection:frame_instrumentation_data", 194 ] 195 } 196 197 rtc_library("rtp_video_frame_assembler") { 198 visibility = [ "*" ] 199 sources = [ 200 "rtp_video_frame_assembler.cc", 201 "rtp_video_frame_assembler.h", 202 ] 203 204 deps = [ 205 ":encoded_frame", 206 ":encoded_image", 207 ":video_frame_type", 208 ":video_rtp_headers", 209 "..:array_view", 210 "..:rtp_packet_info", 211 "..:scoped_refptr", 212 "../../modules/rtp_rtcp", 213 "../../modules/rtp_rtcp:rtp_rtcp_format", 214 "../../modules/rtp_rtcp:rtp_video_header", 215 "../../modules/video_coding", 216 "../../modules/video_coding:packet_buffer", 217 "../../rtc_base:checks", 218 "../../rtc_base:logging", 219 "../../rtc_base:rtc_numerics", 220 "../transport/rtp:dependency_descriptor", 221 "//third_party/abseil-cpp/absl/container:inlined_vector", 222 ] 223 } 224 225 rtc_library("rtp_video_frame_assembler_unittests") { 226 testonly = true 227 sources = [ "rtp_video_frame_assembler_unittests.cc" ] 228 229 deps = [ 230 ":encoded_frame", 231 ":rtp_video_frame_assembler", 232 ":video_frame", 233 ":video_frame_type", 234 "..:array_view", 235 "../../modules/rtp_rtcp", 236 "../../modules/rtp_rtcp:rtp_packetizer_av1_test_helper", 237 "../../modules/rtp_rtcp:rtp_rtcp_format", 238 "../../modules/rtp_rtcp:rtp_video_header", 239 "../../modules/video_coding:codec_globals_headers", 240 "../../rtc_base:checks", 241 "../../test:test_support", 242 "../transport/rtp:dependency_descriptor", 243 ] 244 } 245 246 if (rtc_use_h265) { 247 rtc_library("rtp_video_frame_h265_assembler_unittests") { 248 testonly = true 249 sources = [ "rtp_video_frame_h265_assembler_unittests.cc" ] 250 251 deps = [ 252 ":encoded_frame", 253 ":rtp_video_frame_assembler", 254 ":video_frame", 255 ":video_frame_type", 256 "..:array_view", 257 "../../modules/rtp_rtcp", 258 "../../modules/rtp_rtcp:rtp_rtcp_format", 259 "../../modules/rtp_rtcp:rtp_video_header", 260 "../../modules/video_coding:codec_globals_headers", 261 "../../rtc_base:checks", 262 "../../test:test_support", 263 ] 264 } 265 } 266 267 rtc_source_set("video_codec_constants") { 268 visibility = [ "*" ] 269 sources = [ "video_codec_constants.h" ] 270 deps = [] 271 } 272 273 rtc_library("video_bitrate_allocation") { 274 visibility = [ "*" ] 275 sources = [ 276 "video_bitrate_allocation.cc", 277 "video_bitrate_allocation.h", 278 ] 279 deps = [ 280 ":video_codec_constants", 281 "../../rtc_base:checks", 282 "../../rtc_base:safe_conversions", 283 "../../rtc_base:stringutils", 284 "../../rtc_base/system:rtc_export", 285 ] 286 } 287 288 rtc_source_set("video_layers_allocation") { 289 visibility = [ "*" ] 290 sources = [ "video_layers_allocation.h" ] 291 deps = [ 292 "../units:data_rate", 293 "//third_party/abseil-cpp/absl/container:inlined_vector", 294 ] 295 } 296 297 rtc_library("video_bitrate_allocator") { 298 visibility = [ "*" ] 299 sources = [ 300 "video_bitrate_allocator.cc", 301 "video_bitrate_allocator.h", 302 ] 303 deps = [ 304 ":video_bitrate_allocation", 305 "../units:data_rate", 306 ] 307 } 308 309 rtc_source_set("video_bitrate_allocator_factory") { 310 visibility = [ "*" ] 311 sources = [ "video_bitrate_allocator_factory.h" ] 312 deps = [ 313 ":video_bitrate_allocator", 314 "../environment", 315 "../video_codecs:video_codecs_api", 316 ] 317 } 318 319 rtc_library("video_adaptation") { 320 visibility = [ "*" ] 321 sources = [ 322 "video_adaptation_counters.cc", 323 "video_adaptation_counters.h", 324 "video_adaptation_reason.h", 325 ] 326 327 deps = [ 328 "../../rtc_base:checks", 329 "../../rtc_base:stringutils", 330 ] 331 } 332 333 rtc_source_set("video_stream_encoder") { 334 visibility = [ "*" ] 335 sources = [ "video_stream_encoder_settings.h" ] 336 337 deps = [ 338 ":video_adaptation", 339 ":video_bitrate_allocation", 340 ":video_bitrate_allocator", 341 ":video_bitrate_allocator_factory", 342 ":video_codec_constants", 343 ":video_frame", 344 ":video_layers_allocation", 345 "..:rtp_parameters", 346 "..:scoped_refptr", 347 "../:fec_controller_api", 348 "../:rtp_parameters", 349 "../adaptation:resource_adaptation_api", 350 "../units:data_rate", 351 "../video_codecs:video_codecs_api", 352 ] 353 } 354 355 rtc_library("video_frame_metadata") { 356 visibility = [ "*" ] 357 sources = [ 358 "video_frame_metadata.cc", 359 "video_frame_metadata.h", 360 ] 361 deps = [ 362 ":video_frame", 363 ":video_frame_type", 364 ":video_rtp_headers", 365 "..:array_view", 366 "../../modules/video_coding:codec_globals_headers", 367 "../../rtc_base/system:rtc_export", 368 "../transport/rtp:dependency_descriptor", 369 "//third_party/abseil-cpp/absl/container:inlined_vector", 370 ] 371 } 372 373 rtc_library("builtin_video_bitrate_allocator_factory") { 374 visibility = [ "*" ] 375 sources = [ 376 "builtin_video_bitrate_allocator_factory.cc", 377 "builtin_video_bitrate_allocator_factory.h", 378 ] 379 380 deps = [ 381 ":video_bitrate_allocation", 382 ":video_bitrate_allocator", 383 ":video_bitrate_allocator_factory", 384 ":video_frame", 385 "../../api:scoped_refptr", 386 "../../media:rtc_media_base", 387 "../../modules/video_coding:video_coding_utility", 388 "../../modules/video_coding/svc:svc_rate_allocator", 389 "../environment", 390 "../video_codecs:video_codecs_api", 391 "//third_party/abseil-cpp/absl/base:core_headers", 392 ] 393 } 394 395 rtc_library("frame_buffer") { 396 visibility = [ "*" ] 397 sources = [ 398 "frame_buffer.cc", 399 "frame_buffer.h", 400 ] 401 deps = [ 402 "..:array_view", 403 "../../api:field_trials_view", 404 "../../api/units:timestamp", 405 "../../api/video:encoded_frame", 406 "../../modules/video_coding:video_coding_utility", 407 "../../rtc_base:logging", 408 "../../rtc_base:rtc_numerics", 409 "//third_party/abseil-cpp/absl/algorithm:container", 410 "//third_party/abseil-cpp/absl/container:inlined_vector", 411 ] 412 } 413 414 rtc_library("frame_buffer_unittest") { 415 testonly = true 416 sources = [ "frame_buffer_unittest.cc" ] 417 418 deps = [ 419 ":frame_buffer", 420 "..:field_trials", 421 "../../api/video:encoded_frame", 422 "../../test:create_test_field_trials", 423 "../../test:fake_encoded_frame", 424 "../../test:test_support", 425 ] 426 } 427 428 rtc_library("video_frame_metadata_unittest") { 429 testonly = true 430 sources = [ "video_frame_metadata_unittest.cc" ] 431 432 deps = [ 433 ":video_frame_metadata", 434 "../../api/video:video_frame", 435 "../../modules/video_coding:codec_globals_headers", 436 "../../test:test_support", 437 "../../video", 438 ] 439 }