blob: 5312e050549497b8dbc59c8203dd2e0663ae90da [file] [log] [blame]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +00001# 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("../../build/webrtc.gni")
10
11source_set("video_coding") {
12 sources = [
Henrik Kjellander2557b862015-11-18 22:00:21 +010013 "codec_database.cc",
14 "codec_database.h",
15 "codec_timer.cc",
16 "codec_timer.h",
17 "content_metrics_processing.cc",
18 "content_metrics_processing.h",
19 "decoding_state.cc",
20 "decoding_state.h",
21 "encoded_frame.cc",
22 "encoded_frame.h",
23 "fec_tables_xor.h",
24 "frame_buffer.cc",
25 "frame_buffer.h",
26 "generic_decoder.cc",
27 "generic_decoder.h",
28 "generic_encoder.cc",
29 "generic_encoder.h",
30 "include/video_coding.h",
31 "include/video_coding_defines.h",
32 "inter_frame_delay.cc",
33 "inter_frame_delay.h",
34 "internal_defines.h",
35 "jitter_buffer.cc",
36 "jitter_buffer.h",
37 "jitter_buffer_common.h",
38 "jitter_estimator.cc",
39 "jitter_estimator.h",
40 "media_opt_util.cc",
41 "media_opt_util.h",
42 "media_optimization.cc",
43 "media_optimization.h",
44 "nack_fec_tables.h",
45 "packet.cc",
46 "packet.h",
47 "qm_select.cc",
48 "qm_select.h",
49 "qm_select_data.h",
50 "receiver.cc",
51 "receiver.h",
52 "rtt_filter.cc",
53 "rtt_filter.h",
54 "session_info.cc",
55 "session_info.h",
56 "timestamp_map.cc",
57 "timestamp_map.h",
58 "timing.cc",
59 "timing.h",
60 "video_coding_impl.cc",
61 "video_coding_impl.h",
62 "video_receiver.cc",
63 "video_sender.cc",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000064 ]
65
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +000066 configs += [ "../..:common_config" ]
67 public_configs = [ "../..:common_inherited_config" ]
68
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +000069 if (is_win) {
70 cflags = [
71 # TODO(jschuh): Bug 1348: fix this warning.
72 "/wd4267", # size_t to int truncation.
73 ]
74 }
75
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +000076 if (is_clang) {
77 # Suppress warnings from Chrome's Clang plugins.
78 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
79 configs -= [ "//build/config/clang:find_bad_constructs" ]
80 }
81
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000082 deps = [
83 ":video_coding_utility",
Zeke Chin71f6f442015-06-29 14:34:58 -070084 ":webrtc_h264",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000085 ":webrtc_i420",
86 ":webrtc_vp8",
marpan@webrtc.org5b883172014-11-01 06:10:48 +000087 ":webrtc_vp9",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000088 "../..:webrtc_common",
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +000089 "../../common_video",
90 "../../system_wrappers",
91 ]
92}
93
94source_set("video_coding_utility") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +000095 sources = [
stefan@webrtc.org73823ca2014-07-07 11:46:43 +000096 "utility/frame_dropper.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +010097 "utility/frame_dropper.h",
98 "utility/moving_average.h",
asapersson86b01602015-10-20 23:55:26 -070099 "utility/qp_parser.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100100 "utility/qp_parser.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000101 "utility/quality_scaler.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100102 "utility/quality_scaler.h",
jackychen98d8cf52015-05-21 11:12:02 -0700103 "utility/vp8_header_parser.cc",
kjellander@webrtc.orgb7ce9642015-11-18 23:04:10 +0100104 "utility/vp8_header_parser.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000105 ]
106
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000107 configs += [ "../..:common_config" ]
108 public_configs = [ "../..:common_inherited_config" ]
109
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000110 if (is_clang) {
111 # Suppress warnings from Chrome's Clang plugins.
112 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
113 configs -= [ "//build/config/clang:find_bad_constructs" ]
114 }
115
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200116 deps = [
117 "../../system_wrappers",
118 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000119}
120
Zeke Chin71f6f442015-06-29 14:34:58 -0700121source_set("webrtc_h264") {
122 sources = [
123 "codecs/h264/h264.cc",
124 "codecs/h264/include/h264.h",
125 ]
126
127 configs += [ "../..:common_config" ]
128 public_configs = [ "../..:common_inherited_config" ]
129
130 if (is_clang) {
131 # Suppress warnings from Chrome's Clang plugins.
132 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
133 configs -= [ "//build/config/clang:find_bad_constructs" ]
134 }
135
hbosbab934b2016-01-27 01:36:03 -0800136 defines = []
Zeke Chin71f6f442015-06-29 14:34:58 -0700137 deps = [
138 "../../system_wrappers",
139 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800140
hbos902c03e2016-01-21 03:34:40 -0800141 if (rtc_use_h264) {
hbos9dc59282016-02-03 05:09:37 -0800142 defines += [ "WEBRTC_USE_H264" ]
hbosc5a39c22016-02-02 02:26:05 -0800143 if (rtc_initialize_ffmpeg) {
144 defines += [ "WEBRTC_INITIALIZE_FFMPEG" ]
145 }
hbosbab934b2016-01-27 01:36:03 -0800146 sources += [
147 "codecs/h264/h264_decoder_impl.cc",
148 "codecs/h264/h264_decoder_impl.h",
149 "codecs/h264/h264_encoder_impl.cc",
150 "codecs/h264/h264_encoder_impl.h",
151 ]
hbosa9a1d2a2016-01-11 10:19:02 -0800152 deps += [
153 "//third_party/ffmpeg:ffmpeg",
154 "//third_party/openh264:encoder",
155 ]
156 }
Zeke Chin71f6f442015-06-29 14:34:58 -0700157}
158
159# TODO(tkchin): Source set for webrtc_h264_video_toolbox. Currently not
160# possible to add, see https://crbug.com/297668.
161
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000162source_set("webrtc_i420") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000163 sources = [
Henrik Kjellandera74c08d2015-10-22 12:23:11 +0200164 "codecs/i420/i420.cc",
165 "codecs/i420/include/i420.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000166 ]
167
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000168 configs += [ "../..:common_config" ]
169 public_configs = [ "../..:common_inherited_config" ]
170
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000171 if (is_clang) {
172 # Suppress warnings from Chrome's Clang plugins.
173 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
174 configs -= [ "//build/config/clang:find_bad_constructs" ]
175 }
176
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200177 deps = [
178 "../../system_wrappers",
179 ]
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000180}
181
182source_set("webrtc_vp8") {
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000183 sources = [
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000184 "codecs/vp8/default_temporal_layers.cc",
185 "codecs/vp8/default_temporal_layers.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000186 "codecs/vp8/include/vp8.h",
187 "codecs/vp8/include/vp8_common_types.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000188 "codecs/vp8/realtime_temporal_layers.cc",
189 "codecs/vp8/reference_picture_selection.cc",
190 "codecs/vp8/reference_picture_selection.h",
pbos@webrtc.org9115cde2014-12-09 10:36:40 +0000191 "codecs/vp8/screenshare_layers.cc",
192 "codecs/vp8/screenshare_layers.h",
193 "codecs/vp8/simulcast_encoder_adapter.cc",
194 "codecs/vp8/simulcast_encoder_adapter.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000195 "codecs/vp8/temporal_layers.h",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000196 "codecs/vp8/vp8_impl.cc",
197 "codecs/vp8/vp8_impl.h",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000198 ]
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000199
kjellander@webrtc.orgf21ea912014-09-28 17:37:22 +0000200 configs += [ "../..:common_config" ]
201 public_configs = [ "../..:common_inherited_config" ]
202
kjellander@webrtc.org42ee5b52014-08-25 14:15:35 +0000203 if (is_clang) {
204 # Suppress warnings from Chrome's Clang plugins.
205 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
206 configs -= [ "//build/config/clang:find_bad_constructs" ]
207 }
208
kjellander@webrtc.org8649fed2015-01-08 21:22:01 +0000209 if (is_win) {
210 cflags = [
211 # TODO(jschuh): Bug 1348: fix this warning.
212 "/wd4267", # size_t to int truncation.
213 ]
214 }
215
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000216 deps = [
217 ":video_coding_utility",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000218 "../..:webrtc_common",
stefan@webrtc.org73823ca2014-07-07 11:46:43 +0000219 "../../common_video",
220 "../../system_wrappers",
221 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000222 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200223 deps += [ rtc_libvpx_dir ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000224 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07 +0000225}
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000226
227source_set("webrtc_vp9") {
Peter Boströmbd05f0b2015-11-17 15:27:32 +0100228 sources = [
229 "codecs/vp9/include/vp9.h",
230 "codecs/vp9/screenshare_layers.cc",
231 "codecs/vp9/screenshare_layers.h",
232 "codecs/vp9/vp9_frame_buffer_pool.cc",
233 "codecs/vp9/vp9_frame_buffer_pool.h",
234 "codecs/vp9/vp9_impl.cc",
235 "codecs/vp9/vp9_impl.h",
236 ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000237
238 configs += [ "../..:common_config" ]
239 public_configs = [ "../..:common_inherited_config" ]
240
241 if (is_clang) {
242 # Suppress warnings from Chrome's Clang plugins.
243 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
244 configs -= [ "//build/config/clang:find_bad_constructs" ]
245 }
246
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000247 deps = [
248 ":video_coding_utility",
249 "../../common_video",
250 "../../system_wrappers",
251 ]
252 if (rtc_build_libvpx) {
Henrik Kjellander57e5fd22015-05-25 12:55:39 +0200253 deps += [ rtc_libvpx_dir ]
marpan@webrtc.org5b883172014-11-01 06:10:48 +0000254 }
255}