• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    "h264/h264_bitstream_parser.cc",
19    "h264/h264_bitstream_parser.h",
20    "h264/h264_common.cc",
21    "h264/h264_common.h",
22    "h264/pps_parser.cc",
23    "h264/pps_parser.h",
24    "h264/profile_level_id.h",
25    "h264/sps_parser.cc",
26    "h264/sps_parser.h",
27    "h264/sps_vui_rewriter.cc",
28    "h264/sps_vui_rewriter.h",
29    "i420_buffer_pool.cc",
30    "include/bitrate_adjuster.h",
31    "include/i420_buffer_pool.h",
32    "include/incoming_video_stream.h",
33    "include/quality_limitation_reason.h",
34    "include/video_frame.h",
35    "include/video_frame_buffer.h",
36    "incoming_video_stream.cc",
37    "libyuv/include/webrtc_libyuv.h",
38    "libyuv/webrtc_libyuv.cc",
39    "video_frame_buffer.cc",
40    "video_render_frames.cc",
41    "video_render_frames.h",
42  ]
43
44  deps = [
45    "../api:scoped_refptr",
46    "../api/task_queue",
47    "../api/units:time_delta",
48    "../api/units:timestamp",
49    "../api/video:encoded_image",
50    "../api/video:video_bitrate_allocation",
51    "../api/video:video_bitrate_allocator",
52    "../api/video:video_frame",
53    "../api/video:video_frame_i420",
54    "../api/video:video_rtp_headers",
55    "../api/video_codecs:bitstream_parser_api",
56    "../media:rtc_h264_profile_id",
57    "../rtc_base",
58    "../rtc_base:checks",
59    "../rtc_base:rtc_task_queue",
60    "../rtc_base:safe_minmax",
61    "../rtc_base/synchronization:mutex",
62    "../rtc_base/system:rtc_export",
63    "../system_wrappers:metrics",
64    "//third_party/libyuv",
65  ]
66  absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
67}
68
69if (rtc_include_tests) {
70  common_video_resources = [ "../resources/foreman_cif.yuv" ]
71
72  if (is_ios) {
73    bundle_data("common_video_unittests_bundle_data") {
74      testonly = true
75      sources = common_video_resources
76      outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
77    }
78  }
79
80  rtc_test("common_video_unittests") {
81    testonly = true
82
83    sources = [
84      "bitrate_adjuster_unittest.cc",
85      "frame_rate_estimator_unittest.cc",
86      "h264/h264_bitstream_parser_unittest.cc",
87      "h264/pps_parser_unittest.cc",
88      "h264/profile_level_id_unittest.cc",
89      "h264/sps_parser_unittest.cc",
90      "h264/sps_vui_rewriter_unittest.cc",
91      "i420_buffer_pool_unittest.cc",
92      "libyuv/libyuv_unittest.cc",
93      "video_frame_unittest.cc",
94    ]
95
96    deps = [
97      ":common_video",
98      "../:webrtc_common",
99      "../api:scoped_refptr",
100      "../api/units:time_delta",
101      "../api/video:video_frame",
102      "../api/video:video_frame_i010",
103      "../api/video:video_frame_i420",
104      "../api/video:video_rtp_headers",
105      "../media:rtc_h264_profile_id",
106      "../rtc_base",
107      "../rtc_base:checks",
108      "../rtc_base:rtc_base_approved",
109      "../rtc_base:rtc_base_tests_utils",
110      "../system_wrappers:system_wrappers",
111      "../test:fileutils",
112      "../test:frame_utils",
113      "../test:test_main",
114      "../test:test_support",
115      "../test:video_test_common",
116      "//testing/gtest",
117      "//third_party/abseil-cpp/absl/types:optional",
118      "//third_party/libyuv",
119    ]
120
121    data = common_video_resources
122    if (is_android) {
123      deps += [ "//testing/android/native_test:native_test_support" ]
124      shard_timeout = 900
125    }
126
127    if (is_ios) {
128      deps += [ ":common_video_unittests_bundle_data" ]
129    }
130  }
131}
132