blob: 54284513ff88a6c12b56076bb0dce78d5bcea7c2 [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/audio_codecs.cc",
"base/audio_codecs.h",
"base/audio_decoder_config.cc",
"base/audio_decoder_config.h",
"base/audio_timestamp_helper.cc",
"base/audio_timestamp_helper.h",
"base/bit_reader.cc",
"base/bit_reader.h",
"base/bit_reader_core.cc",
"base/bit_reader_core.h",
"base/byte_queue.cc",
"base/byte_queue.h",
"base/channel_layout.cc",
"base/channel_layout.h",
"base/color_space.cc",
"base/color_space.h",
"base/data_source.cc",
"base/data_source.h",
"base/decoder_buffer.cc",
"base/decoder_buffer.h",
"base/decoder_buffer_cache.cc",
"base/decoder_buffer_cache.h",
"base/decrypt_config.cc",
"base/decrypt_config.h",
"base/demuxer.cc",
"base/demuxer.h",
"base/demuxer_stream.cc",
"base/demuxer_stream.h",
"base/demuxer_stream_provider.cc",
"base/demuxer_stream_provider.h",
"base/drm_system.cc",
"base/drm_system.h",
"base/encryption_pattern.cc",
"base/encryption_pattern.h",
"base/encryption_scheme.cc",
"base/encryption_scheme.h",
"base/hdr_metadata.cc",
"base/hdr_metadata.h",
"base/interleaved_sinc_resampler.cc",
"base/interleaved_sinc_resampler.h",
"base/media_log.cc",
"base/media_log.h",
"base/media_track.cc",
"base/media_track.h",
"base/media_tracks.cc",
"base/media_tracks.h",
"base/media_util.cc",
"base/media_util.h",
"base/mime_util.cc",
"base/mime_util.h",
"base/mime_util_internal.cc",
"base/mime_util_internal.h",
"base/playback_statistics.cc",
"base/playback_statistics.h",
"base/ranges.cc",
"base/ranges.h",
"base/sample_format.cc",
"base/sample_format.h",
"base/sbplayer_pipeline.cc",
"base/sbplayer_set_bounds_helper.cc",
"base/sbplayer_set_bounds_helper.h",
"base/starboard_player.cc",
"base/starboard_player.h",
"base/starboard_utils.cc",
"base/starboard_utils.h",
"base/stream_parser.cc",
"base/stream_parser.h",
"base/stream_parser_buffer.cc",
"base/stream_parser_buffer.h",
"base/text_track_config.cc",
"base/text_track_config.h",
"base/video_codecs.cc",
"base/video_codecs.h",
"base/video_decoder_config.cc",
"base/video_decoder_config.h",
"base/video_frame_provider.h",
"base/video_util.cc",
"base/video_util.h",
"decoder_buffer_allocator.cc",
"decoder_buffer_allocator.h",
"decoder_buffer_memory_info.h",
"fetcher_buffered_data_source.cc",
"fetcher_buffered_data_source.h",
"filters/chunk_demuxer.cc",
"filters/chunk_demuxer.h",
"filters/frame_processor.cc",
"filters/frame_processor.h",
"filters/h264_bit_reader.cc",
"filters/h264_bit_reader.h",
"filters/h264_bitstream_buffer.cc",
"filters/h264_bitstream_buffer.h",
"filters/h264_parser.cc",
"filters/h264_parser.h",
"filters/h264_to_annex_b_bitstream_converter.cc",
"filters/h264_to_annex_b_bitstream_converter.h",
"filters/h265_parser.cc",
"filters/h265_parser.h",
"filters/source_buffer_range.cc",
"filters/source_buffer_range.h",
"filters/source_buffer_state.cc",
"filters/source_buffer_state.h",
"filters/source_buffer_stream.cc",
"filters/source_buffer_stream.h",
"filters/stream_parser_factory.cc",
"filters/stream_parser_factory.h",
"formats/common/offset_byte_queue.cc",
"formats/common/offset_byte_queue.h",
"formats/mp4/aac.cc",
"formats/mp4/aac.h",
"formats/mp4/avc.cc",
"formats/mp4/avc.h",
"formats/mp4/bitstream_converter.cc",
"formats/mp4/bitstream_converter.h",
"formats/mp4/box_definitions.cc",
"formats/mp4/box_definitions.h",
"formats/mp4/box_reader.cc",
"formats/mp4/box_reader.h",
"formats/mp4/es_descriptor.cc",
"formats/mp4/es_descriptor.h",
"formats/mp4/fourccs.h",
"formats/mp4/hevc.cc",
"formats/mp4/hevc.h",
"formats/mp4/mp4_stream_parser.cc",
"formats/mp4/mp4_stream_parser.h",
"formats/mp4/rcheck.h",
"formats/mp4/sample_to_group_iterator.cc",
"formats/mp4/sample_to_group_iterator.h",
"formats/mp4/track_run_iterator.cc",
"formats/mp4/track_run_iterator.h",
"formats/mpeg/adts_constants.cc",
"formats/mpeg/adts_constants.h",
"formats/mpeg/adts_stream_parser.cc",
"formats/mpeg/adts_stream_parser.h",
"formats/mpeg/mpeg1_audio_stream_parser.cc",
"formats/mpeg/mpeg1_audio_stream_parser.h",
"formats/mpeg/mpeg_audio_stream_parser_base.cc",
"formats/mpeg/mpeg_audio_stream_parser_base.h",
"formats/webm/cluster_builder.cc",
"formats/webm/cluster_builder.h",
"formats/webm/opus_packet_builder.cc",
"formats/webm/opus_packet_builder.h",
"formats/webm/tracks_builder.cc",
"formats/webm/tracks_builder.h",
"formats/webm/webm_audio_client.cc",
"formats/webm/webm_audio_client.h",
"formats/webm/webm_cluster_parser.cc",
"formats/webm/webm_cluster_parser.h",
"formats/webm/webm_colour_parser.cc",
"formats/webm/webm_colour_parser.h",
"formats/webm/webm_constants.cc",
"formats/webm/webm_constants.h",
"formats/webm/webm_content_encodings.cc",
"formats/webm/webm_content_encodings.h",
"formats/webm/webm_content_encodings_client.cc",
"formats/webm/webm_content_encodings_client.h",
"formats/webm/webm_crypto_helpers.cc",
"formats/webm/webm_crypto_helpers.h",
"formats/webm/webm_info_parser.cc",
"formats/webm/webm_info_parser.h",
"formats/webm/webm_parser.cc",
"formats/webm/webm_parser.h",
"formats/webm/webm_stream_parser.cc",
"formats/webm/webm_stream_parser.h",
"formats/webm/webm_tracks_parser.cc",
"formats/webm/webm_tracks_parser.h",
"formats/webm/webm_video_client.cc",
"formats/webm/webm_video_client.h",
"formats/webm/webm_webvtt_parser.cc",
"formats/webm/webm_webvtt_parser.h",
"media_module.cc",
"media_module.h",
"player/buffered_data_source.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/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",
]
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/protobuf:protobuf_lite",
"//url",
]
}
target(gtest_target_type, "media_test") {
testonly = true
sources = [
"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",
"//cobalt/base",
"//cobalt/test:run_all_unittests",
"//testing/gmock",
"//testing/gtest",
]
}