OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/buildflag_header.gni") | 5 import("//build/buildflag_header.gni") |
6 import("//build/config/android/config.gni") | 6 import("//build/config/android/config.gni") |
7 import("//build/config/arm.gni") | 7 import("//build/config/arm.gni") |
8 import("//build/config/features.gni") | 8 import("//build/config/features.gni") |
9 import("//build/config/linux/pkg_config.gni") | 9 import("//build/config/linux/pkg_config.gni") |
10 import("//build/config/ui.gni") | 10 import("//build/config/ui.gni") |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 defines += [ "DISABLE_FFMPEG_VIDEO_DECODERS" ] | 84 defines += [ "DISABLE_FFMPEG_VIDEO_DECODERS" ] |
85 } | 85 } |
86 } | 86 } |
87 | 87 |
88 source_set("cdm_api") { | 88 source_set("cdm_api") { |
89 sources = [ | 89 sources = [ |
90 "cdm/api/content_decryption_module.h", | 90 "cdm/api/content_decryption_module.h", |
91 ] | 91 ] |
92 } | 92 } |
93 | 93 |
| 94 # TODO(jrummell): This should be in media/filters/BUILD.gn (which doesn't |
| 95 # currently exist). http://crbug.com/613033 |
| 96 source_set("filters_common") { |
| 97 sources = [ |
| 98 "filters/file_data_source.h", |
| 99 ] |
| 100 if (media_use_ffmpeg) { |
| 101 sources += [ |
| 102 "filters/blocking_url_protocol.h", |
| 103 "filters/ffmpeg_glue.h", |
| 104 ] |
| 105 } |
| 106 } |
| 107 |
94 # TODO(jrummell): Each subdirectory should have it's own BUILD.gn, and then | 108 # TODO(jrummell): Each subdirectory should have it's own BUILD.gn, and then |
95 # this component can depend on them. http://crbug.com/613033 | 109 # this component can depend on them. http://crbug.com/613033 |
96 component("media") { | 110 component("media") { |
97 sources = [ | 111 sources = [ |
| 112 "cdm/aes_decryptor.cc", |
| 113 "cdm/aes_decryptor.h", |
| 114 "cdm/cdm_adapter.cc", |
| 115 "cdm/cdm_adapter.h", |
| 116 "cdm/cdm_allocator.cc", |
| 117 "cdm/cdm_allocator.h", |
| 118 "cdm/cdm_file_io.cc", |
| 119 "cdm/cdm_file_io.h", |
| 120 "cdm/cdm_helpers.cc", |
| 121 "cdm/cdm_helpers.h", |
| 122 "cdm/cdm_wrapper.h", |
| 123 "cdm/default_cdm_factory.cc", |
| 124 "cdm/default_cdm_factory.h", |
| 125 "cdm/json_web_key.cc", |
| 126 "cdm/json_web_key.h", |
| 127 "cdm/player_tracker_impl.cc", |
| 128 "cdm/player_tracker_impl.h", |
| 129 "cdm/supported_cdm_versions.cc", |
| 130 "cdm/supported_cdm_versions.h", |
98 "device_monitors/device_monitor_mac.h", | 131 "device_monitors/device_monitor_mac.h", |
99 "device_monitors/device_monitor_mac.mm", | 132 "device_monitors/device_monitor_mac.mm", |
100 "device_monitors/system_message_window_win.cc", | 133 "device_monitors/system_message_window_win.cc", |
101 "device_monitors/system_message_window_win.h", | 134 "device_monitors/system_message_window_win.h", |
| 135 "filters/audio_clock.cc", |
| 136 "filters/audio_clock.h", |
| 137 "filters/audio_renderer_algorithm.cc", |
| 138 "filters/audio_renderer_algorithm.h", |
| 139 "filters/audio_timestamp_validator.cc", |
| 140 "filters/audio_timestamp_validator.h", |
| 141 "filters/chunk_demuxer.cc", |
| 142 "filters/chunk_demuxer.h", |
| 143 "filters/context_3d.h", |
| 144 "filters/decoder_selector.cc", |
| 145 "filters/decoder_selector.h", |
| 146 "filters/decoder_stream.cc", |
| 147 "filters/decoder_stream.h", |
| 148 "filters/decoder_stream_traits.cc", |
| 149 "filters/decoder_stream_traits.h", |
| 150 "filters/decrypting_audio_decoder.cc", |
| 151 "filters/decrypting_audio_decoder.h", |
| 152 "filters/decrypting_demuxer_stream.cc", |
| 153 "filters/decrypting_demuxer_stream.h", |
| 154 "filters/decrypting_video_decoder.cc", |
| 155 "filters/decrypting_video_decoder.h", |
| 156 "filters/file_data_source.cc", |
| 157 "filters/frame_processor.cc", |
| 158 "filters/frame_processor.h", |
| 159 "filters/gpu_video_decoder.cc", |
| 160 "filters/gpu_video_decoder.h", |
| 161 "filters/h264_bit_reader.cc", |
| 162 "filters/h264_bit_reader.h", |
| 163 "filters/h264_parser.cc", |
| 164 "filters/h264_parser.h", |
| 165 "filters/ivf_parser.cc", |
| 166 "filters/ivf_parser.h", |
| 167 "filters/jpeg_parser.cc", |
| 168 "filters/jpeg_parser.h", |
| 169 "filters/memory_data_source.cc", |
| 170 "filters/memory_data_source.h", |
| 171 "filters/opus_constants.cc", |
| 172 "filters/opus_constants.h", |
| 173 "filters/pipeline_controller.cc", |
| 174 "filters/pipeline_controller.h", |
| 175 "filters/source_buffer_range.cc", |
| 176 "filters/source_buffer_range.h", |
| 177 "filters/source_buffer_state.cc", |
| 178 "filters/source_buffer_state.h", |
| 179 "filters/source_buffer_stream.cc", |
| 180 "filters/source_buffer_stream.h", |
| 181 "filters/stream_parser_factory.cc", |
| 182 "filters/stream_parser_factory.h", |
| 183 "filters/video_cadence_estimator.cc", |
| 184 "filters/video_cadence_estimator.h", |
| 185 "filters/video_renderer_algorithm.cc", |
| 186 "filters/video_renderer_algorithm.h", |
| 187 "filters/vp8_bool_decoder.cc", |
| 188 "filters/vp8_bool_decoder.h", |
| 189 "filters/vp8_parser.cc", |
| 190 "filters/vp8_parser.h", |
| 191 "filters/vp9_bool_decoder.cc", |
| 192 "filters/vp9_bool_decoder.h", |
| 193 "filters/vp9_compressed_header_parser.cc", |
| 194 "filters/vp9_compressed_header_parser.h", |
| 195 "filters/vp9_parser.cc", |
| 196 "filters/vp9_parser.h", |
| 197 "filters/vp9_raw_bits_reader.cc", |
| 198 "filters/vp9_raw_bits_reader.h", |
| 199 "filters/vp9_uncompressed_header_parser.cc", |
| 200 "filters/vp9_uncompressed_header_parser.h", |
| 201 "filters/webvtt_util.h", |
| 202 "filters/wsola_internals.cc", |
| 203 "filters/wsola_internals.h", |
| 204 "muxers/webm_muxer.cc", |
| 205 "muxers/webm_muxer.h", |
102 "renderers/audio_renderer_impl.cc", | 206 "renderers/audio_renderer_impl.cc", |
103 "renderers/audio_renderer_impl.h", | 207 "renderers/audio_renderer_impl.h", |
104 "renderers/default_renderer_factory.cc", | 208 "renderers/default_renderer_factory.cc", |
105 "renderers/default_renderer_factory.h", | 209 "renderers/default_renderer_factory.h", |
106 "renderers/gpu_video_accelerator_factories.h", | 210 "renderers/gpu_video_accelerator_factories.h", |
107 "renderers/renderer_impl.cc", | 211 "renderers/renderer_impl.cc", |
108 "renderers/renderer_impl.h", | 212 "renderers/renderer_impl.h", |
109 "renderers/skcanvas_video_renderer.cc", | 213 "renderers/skcanvas_video_renderer.cc", |
110 "renderers/skcanvas_video_renderer.h", | 214 "renderers/skcanvas_video_renderer.h", |
111 "renderers/video_overlay_factory.cc", | 215 "renderers/video_overlay_factory.cc", |
112 "renderers/video_overlay_factory.h", | 216 "renderers/video_overlay_factory.h", |
113 "renderers/video_renderer_impl.cc", | 217 "renderers/video_renderer_impl.cc", |
114 "renderers/video_renderer_impl.h", | 218 "renderers/video_renderer_impl.h", |
| 219 "video/fake_video_encode_accelerator.cc", |
| 220 "video/fake_video_encode_accelerator.h", |
| 221 "video/gpu_memory_buffer_video_frame_pool.cc", |
| 222 "video/gpu_memory_buffer_video_frame_pool.h", |
| 223 "video/h264_poc.cc", |
| 224 "video/h264_poc.h", |
| 225 "video/half_float_maker.cc", |
| 226 "video/half_float_maker.h", |
| 227 "video/jpeg_decode_accelerator.cc", |
| 228 "video/jpeg_decode_accelerator.h", |
| 229 "video/picture.cc", |
| 230 "video/picture.h", |
| 231 "video/video_decode_accelerator.cc", |
| 232 "video/video_decode_accelerator.h", |
| 233 "video/video_encode_accelerator.cc", |
| 234 "video/video_encode_accelerator.h", |
115 ] | 235 ] |
116 | 236 |
117 configs += [ | 237 configs += [ |
118 ":media_config", | 238 ":media_config", |
119 ":media_implementation", | 239 ":media_implementation", |
120 "//build/config:precompiled_headers", | 240 "//build/config:precompiled_headers", |
121 | 241 |
122 # TODO(wolenetz): Fix size_t to int trunctaion in win64. | 242 # TODO(wolenetz): Fix size_t to int trunctaion in win64. |
123 # See http://crbug.com/171009 | 243 # See http://crbug.com/171009 |
124 "//build/config/compiler:no_size_t_to_int_warning", | 244 "//build/config/compiler:no_size_t_to_int_warning", |
125 ] | 245 ] |
126 all_dependent_configs = [ ":media_dependent_config" ] | 246 all_dependent_configs = [ ":media_dependent_config" ] |
127 | 247 |
128 allow_circular_includes_from = [] | 248 allow_circular_includes_from = [] |
129 cflags = [] | 249 cflags = [] |
130 libs = [] | 250 libs = [] |
131 defines = [] | 251 defines = [] |
132 deps = [ | 252 deps = [ |
133 ":cdm_api", | 253 ":cdm_api", |
134 "//base", | 254 "//base", |
135 "//base:i18n", | 255 "//base:i18n", |
136 "//base/third_party/dynamic_annotations", | 256 "//base/third_party/dynamic_annotations", |
137 "//cc/paint", | 257 "//cc/paint", |
| 258 "//crypto", |
138 "//crypto:platform", | 259 "//crypto:platform", |
139 "//gpu/command_buffer/client:gles2_interface", | 260 "//gpu/command_buffer/client:gles2_interface", |
140 "//gpu/command_buffer/common", | 261 "//gpu/command_buffer/common", |
| 262 "//skia", |
| 263 "//third_party/libwebm", |
141 "//third_party/libyuv", | 264 "//third_party/libyuv", |
142 "//ui/events:events_base", | 265 "//ui/events:events_base", |
143 "//ui/gfx", | 266 "//ui/gfx", |
144 "//ui/gfx/geometry", | 267 "//ui/gfx/geometry", |
145 "//ui/gl:gl", | 268 "//ui/gl:gl", |
146 "//url", | 269 "//url", |
147 ] | 270 ] |
148 | 271 |
149 public_configs = [ "//third_party/libwebm:libwebm_config" ] | 272 public_configs = [ "//third_party/libwebm:libwebm_config" ] |
150 public_deps = [ | 273 public_deps = [ |
| 274 ":filters_common", |
151 ":media_features", | 275 ":media_features", |
152 ":shared_memory_support", | 276 ":shared_memory_support", |
153 "//media/filters", | 277 "//media/audio", |
154 "//media/formats", | 278 "//media/formats", |
155 "//ui/gfx:color_space", | 279 "//ui/gfx:color_space", |
156 ] | 280 ] |
157 | 281 |
158 include_dirs = [ "." ] | 282 include_dirs = [ "." ] |
| 283 if (media_use_ffmpeg) { |
| 284 public_deps += [ "//media/ffmpeg" ] |
| 285 deps += [ |
| 286 "//third_party/ffmpeg", |
| 287 "//third_party/ffmpeg:ffmpeg_features", |
| 288 "//third_party/opus", |
| 289 ] |
| 290 sources += [ |
| 291 "filters/audio_file_reader.cc", |
| 292 "filters/audio_file_reader.h", |
| 293 "filters/blocking_url_protocol.cc", |
| 294 "filters/ffmpeg_audio_decoder.cc", |
| 295 "filters/ffmpeg_audio_decoder.h", |
| 296 "filters/ffmpeg_bitstream_converter.h", |
| 297 "filters/ffmpeg_demuxer.cc", |
| 298 "filters/ffmpeg_demuxer.h", |
| 299 "filters/ffmpeg_glue.cc", |
| 300 "filters/in_memory_url_protocol.cc", |
| 301 "filters/in_memory_url_protocol.h", |
| 302 ] |
| 303 if (!disable_ffmpeg_video_decoders) { |
| 304 sources += [ |
| 305 "filters/ffmpeg_video_decoder.cc", |
| 306 "filters/ffmpeg_video_decoder.h", |
| 307 ] |
| 308 } |
| 309 if (proprietary_codecs) { |
| 310 sources += [ |
| 311 "filters/ffmpeg_aac_bitstream_converter.cc", |
| 312 "filters/ffmpeg_aac_bitstream_converter.h", |
| 313 "filters/ffmpeg_h264_to_annex_b_bitstream_converter.cc", |
| 314 "filters/ffmpeg_h264_to_annex_b_bitstream_converter.h", |
| 315 ] |
| 316 } |
| 317 } |
| 318 |
| 319 if (proprietary_codecs && enable_hevc_demuxing) { |
| 320 sources += [ |
| 321 "filters/h265_parser.cc", |
| 322 "filters/h265_parser.h", |
| 323 ] |
| 324 if (media_use_ffmpeg) { |
| 325 sources += [ |
| 326 "filters/ffmpeg_h265_to_annex_b_bitstream_converter.cc", |
| 327 "filters/ffmpeg_h265_to_annex_b_bitstream_converter.h", |
| 328 ] |
| 329 } |
| 330 } |
159 | 331 |
160 if (current_cpu == "arm" && arm_use_neon) { | 332 if (current_cpu == "arm" && arm_use_neon) { |
161 defines += [ "USE_NEON" ] | 333 defines += [ "USE_NEON" ] |
162 } | 334 } |
163 | 335 |
| 336 if (media_use_libvpx) { |
| 337 sources += [ |
| 338 "filters/vpx_video_decoder.cc", |
| 339 "filters/vpx_video_decoder.h", |
| 340 ] |
| 341 deps += [ "//third_party/libvpx" ] |
| 342 } |
| 343 |
| 344 if (is_android) { |
| 345 sources -= [ |
| 346 "filters/decrypting_audio_decoder.cc", |
| 347 "filters/decrypting_audio_decoder.h", |
| 348 "filters/decrypting_video_decoder.cc", |
| 349 "filters/decrypting_video_decoder.h", |
| 350 ] |
| 351 sources += [ |
| 352 "filters/android/media_codec_audio_decoder.cc", |
| 353 "filters/android/media_codec_audio_decoder.h", |
| 354 ] |
| 355 } |
| 356 |
| 357 if (current_cpu != "arm" && is_chromeos) { |
| 358 sources += [ |
| 359 "filters/h264_bitstream_buffer.cc", |
| 360 "filters/h264_bitstream_buffer.h", |
| 361 ] |
| 362 } |
| 363 |
164 if (is_mac) { | 364 if (is_mac) { |
165 public_deps += [ "//media/base/mac" ] | 365 public_deps += [ "//media/base/mac" ] |
166 libs += [ | 366 libs += [ |
167 "CoreFoundation.framework", | 367 "CoreFoundation.framework", |
168 "CoreGraphics.framework", | 368 "CoreGraphics.framework", |
169 "Foundation.framework", | 369 "Foundation.framework", |
170 ] | 370 ] |
171 } | 371 } |
172 | 372 |
173 if (is_ios) { | 373 if (is_ios) { |
174 deps += [ "//media/base/mac" ] | 374 deps += [ "//media/base/mac" ] |
175 } | 375 } |
176 | 376 |
177 if (is_win) { | 377 if (is_win) { |
178 deps += [ "//media/base/win" ] | 378 deps += [ "//media/base/win" ] |
179 } | 379 } |
180 | 380 |
| 381 if (proprietary_codecs) { |
| 382 sources += [ |
| 383 "cdm/cenc_utils.cc", |
| 384 "cdm/cenc_utils.h", |
| 385 "filters/h264_to_annex_b_bitstream_converter.cc", |
| 386 "filters/h264_to_annex_b_bitstream_converter.h", |
| 387 ] |
| 388 } |
| 389 |
| 390 if (use_low_memory_buffer) { |
| 391 sources += [ |
| 392 "filters/source_buffer_platform.h", |
| 393 "filters/source_buffer_platform_lowmem.cc", |
| 394 ] |
| 395 } else { |
| 396 sources += [ |
| 397 "filters/source_buffer_platform.cc", |
| 398 "filters/source_buffer_platform.h", |
| 399 ] |
| 400 } |
| 401 |
181 if (use_udev) { | 402 if (use_udev) { |
182 deps += [ "//device/udev_linux" ] | 403 deps += [ "//device/udev_linux" ] |
183 sources += [ | 404 sources += [ |
184 "device_monitors/device_monitor_udev.cc", | 405 "device_monitors/device_monitor_udev.cc", |
185 "device_monitors/device_monitor_udev.h", | 406 "device_monitors/device_monitor_udev.h", |
186 ] | 407 ] |
187 } | 408 } |
188 | 409 |
189 # TODO(xhwang): Move other library CDM related files to this block as well. | 410 # TODO(xhwang): Move other library CDM related files to this block as well. |
190 if (enable_pepper_cdms) { | 411 if (enable_pepper_cdms) { |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 fuzzer_test("media_mp4_avcc_parser_fuzzer") { | 865 fuzzer_test("media_mp4_avcc_parser_fuzzer") { |
645 sources = [ | 866 sources = [ |
646 "formats/mp4/mp4_avcc_parser_fuzzer.cc", | 867 "formats/mp4/mp4_avcc_parser_fuzzer.cc", |
647 ] | 868 ] |
648 deps = [ | 869 deps = [ |
649 ":media", | 870 ":media", |
650 "//base", | 871 "//base", |
651 ] | 872 ] |
652 } | 873 } |
653 } | 874 } |
OLD | NEW |