blob: 1b27130484fc234948c308936a5f7255b75bdde6 [file] [log] [blame]
# Copyright 2021 The Cobalt Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
config("media_config") {
if (!is_win) {
cflags_cc = [
"-Wno-conversion",
"-Wno-unused-parameter",
"-Wno-unused-variable",
]
}
defines = [ "MEDIA_IMPLEMENTATION" ]
}
component("media") {
sources = [
"base/audio_bus.cc",
"base/audio_bus.h",
"base/data_source.cc",
"base/data_source.h",
"base/decode_target_provider.h",
"base/decoder_buffer_cache.cc",
"base/decoder_buffer_cache.h",
"base/drm_system.cc",
"base/drm_system.h",
"base/format_support_query_metrics.cc",
"base/format_support_query_metrics.h",
"base/interleaved_sinc_resampler.cc",
"base/interleaved_sinc_resampler.h",
"base/playback_statistics.cc",
"base/playback_statistics.h",
"base/sbplayer_bridge.cc",
"base/sbplayer_bridge.h",
"base/sbplayer_interface.cc",
"base/sbplayer_interface.h",
"base/sbplayer_pipeline.cc",
"base/sbplayer_set_bounds_helper.cc",
"base/sbplayer_set_bounds_helper.h",
"decoder_buffer_allocator.cc",
"decoder_buffer_allocator.h",
"decoder_buffer_memory_info.h",
"file_data_source.cc",
"file_data_source.h",
"media_module.cc",
"media_module.h",
"player/web_media_player_impl.cc",
"player/web_media_player_impl.h",
"player/web_media_player_proxy.cc",
"player/web_media_player_proxy.h",
"progressive/avc_access_unit.cc",
"progressive/avc_access_unit.h",
"progressive/avc_parser.cc",
"progressive/avc_parser.h",
"progressive/data_source_reader.cc",
"progressive/data_source_reader.h",
"progressive/demuxer_extension_wrapper.cc",
"progressive/demuxer_extension_wrapper.h",
"progressive/mp4_map.cc",
"progressive/mp4_map.h",
"progressive/mp4_parser.cc",
"progressive/mp4_parser.h",
"progressive/progressive_demuxer.cc",
"progressive/progressive_demuxer.h",
"progressive/progressive_parser.cc",
"progressive/progressive_parser.h",
"progressive/rbsp_stream.cc",
"progressive/rbsp_stream.h",
"url_fetcher_data_source.cc",
"url_fetcher_data_source.h",
]
configs -= [ "//starboard/build/config:size" ]
configs += [
"//starboard/build/config:speed",
":media_config",
]
deps = [
"//base",
"//cobalt/base",
"//cobalt/browser:browser_switches",
"//cobalt/csp",
"//cobalt/loader",
"//cobalt/loader:origin",
"//cobalt/math",
"//cobalt/network",
"//cobalt/render_tree:render_tree",
"//cobalt/system_window:system_window",
"//nb",
"//net",
"//starboard",
"//third_party/chromium/media",
"//third_party/protobuf:protobuf_lite",
"//url",
]
}
target(gtest_target_type, "media_test") {
testonly = true
sources = [
"file_data_source_test.cc",
"progressive/demuxer_extension_wrapper_test.cc",
"progressive/mock_data_source_reader.h",
"progressive/mp4_map_unittest.cc",
"progressive/rbsp_stream_unittest.cc",
]
configs -= [ "//starboard/build/config:size" ]
configs += [ "//starboard/build/config:speed" ]
deps = [
":media",
"//base/test:test_support",
"//cobalt/base",
"//cobalt/test:run_all_unittests",
"//testing/gmock",
"//testing/gtest",
"//third_party/chromium/media:media",
]
data_deps = [ "//cobalt/media/testing:cobalt_media_download_test_data" ]
}