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 9import("../webrtc.gni") 10 11rtc_library("common_video") { 12 visibility = [ "*" ] 13 14 sources = [ 15 "bitrate_adjuster.cc", 16 "frame_rate_estimator.cc", 17 "frame_rate_estimator.h", 18 "framerate_controller.cc", 19 "framerate_controller.h", 20 "h264/h264_bitstream_parser.cc", 21 "h264/h264_bitstream_parser.h", 22 "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", 30 "include/bitrate_adjuster.h", 31 "include/quality_limitation_reason.h", 32 "include/video_frame_buffer.h", 33 "include/video_frame_buffer_pool.h", 34 "libyuv/include/webrtc_libyuv.h", 35 "libyuv/webrtc_libyuv.cc", 36 "video_frame_buffer.cc", 37 "video_frame_buffer_pool.cc", 38 ] 39 40 deps = [ 41 "../api:array_view", 42 "../api:make_ref_counted", 43 "../api:scoped_refptr", 44 "../api:sequence_checker", 45 "../api/task_queue", 46 "../api/units:time_delta", 47 "../api/units:timestamp", 48 "../api/video:encoded_image", 49 "../api/video:video_bitrate_allocation", 50 "../api/video:video_bitrate_allocator", 51 "../api/video:video_frame", 52 "../api/video:video_frame_i010", 53 "../api/video:video_rtp_headers", 54 "../api/video_codecs:bitstream_parser_api", 55 "../api/video_codecs:video_codecs_api", 56 "../rtc_base", 57 "../rtc_base:bit_buffer", 58 "../rtc_base:bitstream_reader", 59 "../rtc_base:buffer", 60 "../rtc_base:checks", 61 "../rtc_base:event_tracer", 62 "../rtc_base:logging", 63 "../rtc_base:macromagic", 64 "../rtc_base:race_checker", 65 "../rtc_base:rate_statistics", 66 "../rtc_base:refcount", 67 "../rtc_base:rtc_task_queue", 68 "../rtc_base:safe_minmax", 69 "../rtc_base:timeutils", 70 "../rtc_base/synchronization:mutex", 71 "../rtc_base/system:rtc_export", 72 "../system_wrappers:metrics", 73 "//third_party/libyuv", 74 ] 75 absl_deps = [ 76 "//third_party/abseil-cpp/absl/numeric:bits", 77 "//third_party/abseil-cpp/absl/types:optional", 78 ] 79} 80 81rtc_source_set("frame_counts") { 82 visibility = [ "*" ] 83 84 sources = [ "frame_counts.h" ] 85} 86 87if (rtc_include_tests && !build_with_chromium) { 88 common_video_resources = [ "../resources/foreman_cif.yuv" ] 89 90 if (is_ios) { 91 bundle_data("common_video_unittests_bundle_data") { 92 testonly = true 93 sources = common_video_resources 94 outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ] 95 } 96 } 97 98 rtc_test("common_video_unittests") { 99 testonly = true 100 101 sources = [ 102 "bitrate_adjuster_unittest.cc", 103 "frame_rate_estimator_unittest.cc", 104 "framerate_controller_unittest.cc", 105 "h264/h264_bitstream_parser_unittest.cc", 106 "h264/pps_parser_unittest.cc", 107 "h264/sps_parser_unittest.cc", 108 "h264/sps_vui_rewriter_unittest.cc", 109 "libyuv/libyuv_unittest.cc", 110 "video_frame_buffer_pool_unittest.cc", 111 "video_frame_unittest.cc", 112 ] 113 114 deps = [ 115 ":common_video", 116 "../api:scoped_refptr", 117 "../api/units:time_delta", 118 "../api/video:video_frame", 119 "../api/video:video_frame_i010", 120 "../api/video:video_rtp_headers", 121 "../api/video_codecs:video_codecs_api", 122 "../rtc_base", 123 "../rtc_base:bit_buffer", 124 "../rtc_base:buffer", 125 "../rtc_base:checks", 126 "../rtc_base:logging", 127 "../rtc_base:macromagic", 128 "../rtc_base:rtc_base_tests_utils", 129 "../rtc_base:timeutils", 130 "../system_wrappers:system_wrappers", 131 "../test:fileutils", 132 "../test:frame_utils", 133 "../test:test_main", 134 "../test:test_support", 135 "../test:video_test_common", 136 "//testing/gtest", 137 "//third_party/libyuv", 138 ] 139 140 absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] 141 142 data = common_video_resources 143 if (is_android) { 144 deps += [ "//testing/android/native_test:native_test_support" ] 145 shard_timeout = 900 146 } 147 148 if (is_ios) { 149 deps += [ ":common_video_unittests_bundle_data" ] 150 } 151 } 152} 153