| # 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. |
| |
| import("//starboard/shared/starboard/player/buildfiles.gni") |
| import("//starboard/shared/starboard/player/player_tests.gni") |
| |
| group("starboard_platform") { |
| public_deps = [ ":starboard_platform_sources" ] |
| } |
| |
| static_library("starboard_platform_sources") { |
| check_includes = false |
| |
| has_pedantic_warnings = true |
| |
| sources = [ |
| "//starboard/linux/shared/atomic_public.h", |
| "//starboard/linux/shared/configuration_constants.cc", |
| "//starboard/linux/shared/configuration_public.h", |
| "//starboard/linux/shared/netlink.cc", |
| "//starboard/linux/shared/netlink.h", |
| "//starboard/linux/shared/routes.cc", |
| "//starboard/linux/shared/routes.h", |
| "//starboard/linux/shared/system_get_path.cc", |
| "//starboard/linux/shared/system_has_capability.cc", |
| "//starboard/linux/shared/time_zone.cc", |
| "//starboard/linux/shared/time_zone.h", |
| "//starboard/raspi/shared/application_dispmanx.cc", |
| "//starboard/raspi/shared/audio_sink_type_dispatcher.cc", |
| "//starboard/raspi/shared/dispmanx_util.cc", |
| "//starboard/raspi/shared/dispmanx_util.h", |
| "//starboard/raspi/shared/graphics.cc", |
| "//starboard/raspi/shared/graphics.h", |
| "//starboard/raspi/shared/media_is_video_supported.cc", |
| "//starboard/raspi/shared/open_max/decode_target_create.cc", |
| "//starboard/raspi/shared/open_max/decode_target_create.h", |
| "//starboard/raspi/shared/open_max/decode_target_get_info.cc", |
| "//starboard/raspi/shared/open_max/decode_target_internal.h", |
| "//starboard/raspi/shared/open_max/decode_target_release.cc", |
| "//starboard/raspi/shared/open_max/dispmanx_resource_pool.cc", |
| "//starboard/raspi/shared/open_max/dispmanx_resource_pool.h", |
| "//starboard/raspi/shared/open_max/image_decode.cc", |
| "//starboard/raspi/shared/open_max/image_is_decode_supported.cc", |
| "//starboard/raspi/shared/open_max/open_max_component.cc", |
| "//starboard/raspi/shared/open_max/open_max_component.h", |
| "//starboard/raspi/shared/open_max/open_max_component_base.cc", |
| "//starboard/raspi/shared/open_max/open_max_component_base.h", |
| "//starboard/raspi/shared/open_max/open_max_egl_render_component.cc", |
| "//starboard/raspi/shared/open_max/open_max_egl_render_component.h", |
| "//starboard/raspi/shared/open_max/open_max_image_decode_component.cc", |
| "//starboard/raspi/shared/open_max/open_max_image_decode_component.h", |
| "//starboard/raspi/shared/open_max/open_max_video_decode_component.cc", |
| "//starboard/raspi/shared/open_max/open_max_video_decode_component.h", |
| "//starboard/raspi/shared/open_max/video_decoder.cc", |
| "//starboard/raspi/shared/open_max/video_decoder.h", |
| "//starboard/raspi/shared/player_components_factory.cc", |
| "//starboard/raspi/shared/system_get_device_type.cc", |
| "//starboard/raspi/shared/system_get_property.cc", |
| "//starboard/raspi/shared/system_gles2.cc", |
| "//starboard/raspi/shared/thread_create_priority.cc", |
| "//starboard/raspi/shared/video_renderer_sink_impl.cc", |
| "//starboard/raspi/shared/video_renderer_sink_impl.h", |
| "//starboard/raspi/shared/window_create.cc", |
| "//starboard/raspi/shared/window_destroy.cc", |
| "//starboard/raspi/shared/window_get_platform_handle.cc", |
| "//starboard/raspi/shared/window_get_size.cc", |
| "//starboard/raspi/shared/window_internal.cc", |
| "//starboard/shared/alsa/alsa_audio_sink_type.cc", |
| "//starboard/shared/alsa/alsa_audio_sink_type.h", |
| "//starboard/shared/alsa/alsa_util.cc", |
| "//starboard/shared/alsa/alsa_util.h", |
| "//starboard/shared/egl/system_egl.cc", |
| "//starboard/shared/gcc/atomic_gcc_public.h", |
| "//starboard/shared/iso/directory_close.cc", |
| "//starboard/shared/iso/directory_get_next.cc", |
| "//starboard/shared/iso/directory_open.cc", |
| "//starboard/shared/iso/memory_allocate_unchecked.cc", |
| "//starboard/shared/iso/memory_free.cc", |
| "//starboard/shared/iso/memory_reallocate_unchecked.cc", |
| "//starboard/shared/iso/string_scan.cc", |
| "//starboard/shared/libevent/socket_waiter_add.cc", |
| "//starboard/shared/libevent/socket_waiter_create.cc", |
| "//starboard/shared/libevent/socket_waiter_destroy.cc", |
| "//starboard/shared/libevent/socket_waiter_internal.cc", |
| "//starboard/shared/libevent/socket_waiter_remove.cc", |
| "//starboard/shared/libevent/socket_waiter_wait.cc", |
| "//starboard/shared/libevent/socket_waiter_wait_timed.cc", |
| "//starboard/shared/libevent/socket_waiter_wake_up.cc", |
| "//starboard/shared/linux/byte_swap.cc", |
| "//starboard/shared/linux/cpu_features_get.cc", |
| "//starboard/shared/linux/dev_input/dev_input.cc", |
| "//starboard/shared/linux/get_home_directory.cc", |
| "//starboard/shared/linux/memory_get_stack_bounds.cc", |
| "//starboard/shared/linux/socket_get_interface_address.cc", |
| "//starboard/shared/linux/system_get_random_data.cc", |
| "//starboard/shared/linux/system_get_stack.cc", |
| "//starboard/shared/linux/system_get_total_cpu_memory.cc", |
| "//starboard/shared/linux/system_get_used_cpu_memory.cc", |
| "//starboard/shared/linux/system_is_debugger_attached.cc", |
| "//starboard/shared/linux/system_symbolize.cc", |
| "//starboard/shared/linux/thread_get_id.cc", |
| "//starboard/shared/linux/thread_get_name.cc", |
| "//starboard/shared/linux/thread_set_name.cc", |
| "//starboard/shared/linux/time_zone_get_name.cc", |
| "//starboard/shared/nouser/user_get_current.cc", |
| "//starboard/shared/nouser/user_get_property.cc", |
| "//starboard/shared/nouser/user_get_signed_in.cc", |
| "//starboard/shared/nouser/user_internal.cc", |
| "//starboard/shared/opus/opus_audio_decoder.cc", |
| "//starboard/shared/opus/opus_audio_decoder.h", |
| "//starboard/shared/posix/directory_create.cc", |
| "//starboard/shared/posix/environment.cc", |
| "//starboard/shared/posix/file_atomic_replace.cc", |
| "//starboard/shared/posix/file_can_open.cc", |
| "//starboard/shared/posix/file_close.cc", |
| "//starboard/shared/posix/file_delete.cc", |
| "//starboard/shared/posix/file_exists.cc", |
| "//starboard/shared/posix/file_flush.cc", |
| "//starboard/shared/posix/file_get_info.cc", |
| "//starboard/shared/posix/file_get_path_info.cc", |
| "//starboard/shared/posix/file_open.cc", |
| "//starboard/shared/posix/file_read.cc", |
| "//starboard/shared/posix/file_seek.cc", |
| "//starboard/shared/posix/file_truncate.cc", |
| "//starboard/shared/posix/file_write.cc", |
| "//starboard/shared/posix/log.cc", |
| "//starboard/shared/posix/log_flush.cc", |
| "//starboard/shared/posix/log_format.cc", |
| "//starboard/shared/posix/log_is_tty.cc", |
| "//starboard/shared/posix/log_raw.cc", |
| "//starboard/shared/posix/memory_allocate_aligned_unchecked.cc", |
| "//starboard/shared/posix/memory_flush.cc", |
| "//starboard/shared/posix/memory_free_aligned.cc", |
| "//starboard/shared/posix/memory_map.cc", |
| "//starboard/shared/posix/memory_protect.cc", |
| "//starboard/shared/posix/memory_unmap.cc", |
| "//starboard/shared/posix/page_internal.cc", |
| "//starboard/shared/posix/set_non_blocking_internal.cc", |
| "//starboard/shared/posix/socket_accept.cc", |
| "//starboard/shared/posix/socket_bind.cc", |
| "//starboard/shared/posix/socket_clear_last_error.cc", |
| "//starboard/shared/posix/socket_connect.cc", |
| "//starboard/shared/posix/socket_create.cc", |
| "//starboard/shared/posix/socket_destroy.cc", |
| "//starboard/shared/posix/socket_free_resolution.cc", |
| "//starboard/shared/posix/socket_get_last_error.cc", |
| "//starboard/shared/posix/socket_get_local_address.cc", |
| "//starboard/shared/posix/socket_internal.cc", |
| "//starboard/shared/posix/socket_is_connected.cc", |
| "//starboard/shared/posix/socket_is_connected_and_idle.cc", |
| "//starboard/shared/posix/socket_is_ipv6_supported.cc", |
| "//starboard/shared/posix/socket_join_multicast_group.cc", |
| "//starboard/shared/posix/socket_listen.cc", |
| "//starboard/shared/posix/socket_receive_from.cc", |
| "//starboard/shared/posix/socket_resolve.cc", |
| "//starboard/shared/posix/socket_send_to.cc", |
| "//starboard/shared/posix/socket_set_broadcast.cc", |
| "//starboard/shared/posix/socket_set_receive_buffer_size.cc", |
| "//starboard/shared/posix/socket_set_reuse_address.cc", |
| "//starboard/shared/posix/socket_set_send_buffer_size.cc", |
| "//starboard/shared/posix/socket_set_tcp_keep_alive.cc", |
| "//starboard/shared/posix/socket_set_tcp_no_delay.cc", |
| "//starboard/shared/posix/socket_set_tcp_window_scaling.cc", |
| "//starboard/shared/posix/storage_write_record.cc", |
| "//starboard/shared/posix/string_compare_no_case.cc", |
| "//starboard/shared/posix/string_compare_no_case_n.cc", |
| "//starboard/shared/posix/string_format.cc", |
| "//starboard/shared/posix/string_format_wide.cc", |
| "//starboard/shared/posix/system_break_into_debugger.cc", |
| "//starboard/shared/posix/system_clear_last_error.cc", |
| "//starboard/shared/posix/system_get_error_string.cc", |
| "//starboard/shared/posix/system_get_last_error.cc", |
| "//starboard/shared/posix/system_get_locale_id.cc", |
| "//starboard/shared/posix/system_get_number_of_processors.cc", |
| "//starboard/shared/posix/thread_sleep.cc", |
| "//starboard/shared/posix/time_get_monotonic_now.cc", |
| "//starboard/shared/posix/time_get_monotonic_thread_now.cc", |
| "//starboard/shared/posix/time_get_now.cc", |
| "//starboard/shared/posix/time_is_time_thread_now_supported.cc", |
| "//starboard/shared/posix/time_zone_get_current.cc", |
| "//starboard/shared/pthread/condition_variable_broadcast.cc", |
| "//starboard/shared/pthread/condition_variable_create.cc", |
| "//starboard/shared/pthread/condition_variable_destroy.cc", |
| "//starboard/shared/pthread/condition_variable_signal.cc", |
| "//starboard/shared/pthread/condition_variable_wait.cc", |
| "//starboard/shared/pthread/condition_variable_wait_timed.cc", |
| "//starboard/shared/pthread/mutex_acquire.cc", |
| "//starboard/shared/pthread/mutex_acquire_try.cc", |
| "//starboard/shared/pthread/mutex_create.cc", |
| "//starboard/shared/pthread/mutex_destroy.cc", |
| "//starboard/shared/pthread/mutex_release.cc", |
| "//starboard/shared/pthread/once.cc", |
| "//starboard/shared/pthread/thread_context_get_pointer.cc", |
| "//starboard/shared/pthread/thread_context_internal.cc", |
| "//starboard/shared/pthread/thread_context_internal.h", |
| "//starboard/shared/pthread/thread_create.cc", |
| "//starboard/shared/pthread/thread_create_local_key.cc", |
| "//starboard/shared/pthread/thread_create_priority.h", |
| "//starboard/shared/pthread/thread_destroy_local_key.cc", |
| "//starboard/shared/pthread/thread_detach.cc", |
| "//starboard/shared/pthread/thread_get_current.cc", |
| "//starboard/shared/pthread/thread_get_local_value.cc", |
| "//starboard/shared/pthread/thread_is_equal.cc", |
| "//starboard/shared/pthread/thread_join.cc", |
| "//starboard/shared/pthread/thread_sampler_create.cc", |
| "//starboard/shared/pthread/thread_sampler_destroy.cc", |
| "//starboard/shared/pthread/thread_sampler_freeze.cc", |
| "//starboard/shared/pthread/thread_sampler_internal.cc", |
| "//starboard/shared/pthread/thread_sampler_internal.h", |
| "//starboard/shared/pthread/thread_sampler_is_supported.cc", |
| "//starboard/shared/pthread/thread_sampler_thaw.cc", |
| "//starboard/shared/pthread/thread_set_local_value.cc", |
| "//starboard/shared/pthread/thread_yield.cc", |
| "//starboard/shared/signal/crash_signals.cc", |
| "//starboard/shared/signal/crash_signals.h", |
| "//starboard/shared/signal/debug_signals.cc", |
| "//starboard/shared/signal/debug_signals.h", |
| "//starboard/shared/signal/suspend_signals.cc", |
| "//starboard/shared/signal/suspend_signals.h", |
| "//starboard/shared/signal/system_request_conceal.cc", |
| "//starboard/shared/signal/system_request_freeze.cc", |
| "//starboard/shared/starboard/application.cc", |
| "//starboard/shared/starboard/audio_sink/audio_sink_create.cc", |
| "//starboard/shared/starboard/audio_sink/audio_sink_destroy.cc", |
| "//starboard/shared/starboard/audio_sink/audio_sink_get_max_channels_5_1.cc", |
| "//starboard/shared/starboard/audio_sink/audio_sink_get_min_buffer_size_in_frames.cc", |
| "//starboard/shared/starboard/audio_sink/audio_sink_get_nearest_supported_sample_frequency.cc", |
| "//starboard/shared/starboard/audio_sink/audio_sink_internal.cc", |
| "//starboard/shared/starboard/audio_sink/audio_sink_internal.h", |
| "//starboard/shared/starboard/audio_sink/audio_sink_is_audio_frame_storage_type_supported_interleaved_only.cc", |
| "//starboard/shared/starboard/audio_sink/audio_sink_is_audio_sample_type_supported_float32_only.cc", |
| "//starboard/shared/starboard/audio_sink/audio_sink_is_valid.cc", |
| "//starboard/shared/starboard/audio_sink/stub_audio_sink_type.cc", |
| "//starboard/shared/starboard/audio_sink/stub_audio_sink_type.h", |
| "//starboard/shared/starboard/command_line.cc", |
| "//starboard/shared/starboard/command_line.h", |
| "//starboard/shared/starboard/crash_handler.cc", |
| "//starboard/shared/starboard/crash_handler.h", |
| "//starboard/shared/starboard/directory_can_open.cc", |
| "//starboard/shared/starboard/event_cancel.cc", |
| "//starboard/shared/starboard/event_schedule.cc", |
| "//starboard/shared/starboard/file_atomic_replace_write_file.cc", |
| "//starboard/shared/starboard/file_atomic_replace_write_file.h", |
| "//starboard/shared/starboard/file_mode_string_to_flags.cc", |
| "//starboard/shared/starboard/file_storage/storage_close_record.cc", |
| "//starboard/shared/starboard/file_storage/storage_delete_record.cc", |
| "//starboard/shared/starboard/file_storage/storage_get_record_size.cc", |
| "//starboard/shared/starboard/file_storage/storage_open_record.cc", |
| "//starboard/shared/starboard/file_storage/storage_read_record.cc", |
| "//starboard/shared/starboard/log_mutex.cc", |
| "//starboard/shared/starboard/log_mutex.h", |
| "//starboard/shared/starboard/log_raw_dump_stack.cc", |
| "//starboard/shared/starboard/log_raw_format.cc", |
| "//starboard/shared/starboard/media/media_can_play_mime_and_key_system.cc", |
| "//starboard/shared/starboard/media/media_get_audio_buffer_budget.cc", |
| "//starboard/shared/starboard/media/media_get_audio_configuration.cc", |
| "//starboard/shared/starboard/media/media_get_audio_output_count_single_audio_output.cc", |
| "//starboard/shared/starboard/media/media_get_buffer_alignment.cc", |
| "//starboard/shared/starboard/media/media_get_buffer_allocation_unit.cc", |
| "//starboard/shared/starboard/media/media_get_buffer_garbage_collection_duration_threshold.cc", |
| "//starboard/shared/starboard/media/media_get_buffer_padding.cc", |
| "//starboard/shared/starboard/media/media_get_buffer_storage_type.cc", |
| "//starboard/shared/starboard/media/media_get_initial_buffer_capacity.cc", |
| "//starboard/shared/starboard/media/media_get_max_buffer_capacity.cc", |
| "//starboard/shared/starboard/media/media_get_progressive_buffer_budget.cc", |
| "//starboard/shared/starboard/media/media_get_video_buffer_budget.cc", |
| "//starboard/shared/starboard/media/media_is_audio_supported_aac_and_opus.cc", |
| "//starboard/shared/starboard/media/media_is_buffer_pool_allocate_on_demand.cc", |
| "//starboard/shared/starboard/media/media_is_buffer_using_memory_pool.cc", |
| "//starboard/shared/starboard/memory.cc", |
| "//starboard/shared/starboard/new.cc", |
| "//starboard/shared/starboard/queue_application.cc", |
| "//starboard/shared/starboard/string_duplicate.cc", |
| "//starboard/shared/starboard/system_get_random_uint64.cc", |
| "//starboard/shared/starboard/system_request_blur.cc", |
| "//starboard/shared/starboard/system_request_focus.cc", |
| "//starboard/shared/starboard/system_request_reveal.cc", |
| "//starboard/shared/starboard/system_request_stop.cc", |
| "//starboard/shared/starboard/system_supports_resume.cc", |
| "//starboard/shared/starboard/window_set_default_options.cc", |
| "//starboard/shared/stub/accessibility_get_caption_settings.cc", |
| "//starboard/shared/stub/accessibility_get_display_settings.cc", |
| "//starboard/shared/stub/accessibility_get_text_to_speech_settings.cc", |
| "//starboard/shared/stub/accessibility_set_captions_enabled.cc", |
| "//starboard/shared/stub/drm_close_session.cc", |
| "//starboard/shared/stub/drm_create_system.cc", |
| "//starboard/shared/stub/drm_destroy_system.cc", |
| "//starboard/shared/stub/drm_generate_session_update_request.cc", |
| "//starboard/shared/stub/drm_get_metrics.cc", |
| "//starboard/shared/stub/drm_is_server_certificate_updatable.cc", |
| "//starboard/shared/stub/drm_update_server_certificate.cc", |
| "//starboard/shared/stub/drm_update_session.cc", |
| "//starboard/shared/stub/media_is_supported.cc", |
| "//starboard/shared/stub/media_set_audio_write_duration.cc", |
| "//starboard/shared/stub/microphone_close.cc", |
| "//starboard/shared/stub/microphone_create.cc", |
| "//starboard/shared/stub/microphone_destroy.cc", |
| "//starboard/shared/stub/microphone_get_available.cc", |
| "//starboard/shared/stub/microphone_is_sample_rate_supported.cc", |
| "//starboard/shared/stub/microphone_open.cc", |
| "//starboard/shared/stub/microphone_read.cc", |
| "//starboard/shared/stub/speech_synthesis_cancel.cc", |
| "//starboard/shared/stub/speech_synthesis_is_supported.cc", |
| "//starboard/shared/stub/speech_synthesis_speak.cc", |
| "//starboard/shared/stub/system_get_total_gpu_memory.cc", |
| "//starboard/shared/stub/system_get_used_gpu_memory.cc", |
| "//starboard/shared/stub/system_hide_splash_screen.cc", |
| "//starboard/shared/stub/system_network_is_disconnected.cc", |
| "//starboard/shared/stub/system_raise_platform_error.cc", |
| "//starboard/shared/stub/system_sign_with_certification_secret_key.cc", |
| "//starboard/shared/stub/ui_nav_get_interface.cc", |
| "//starboard/shared/stub/window_blur_on_screen_keyboard.cc", |
| "//starboard/shared/stub/window_focus_on_screen_keyboard.cc", |
| "//starboard/shared/stub/window_get_diagonal_size_in_inches.cc", |
| "//starboard/shared/stub/window_get_on_screen_keyboard_bounding_rect.cc", |
| "//starboard/shared/stub/window_hide_on_screen_keyboard.cc", |
| "//starboard/shared/stub/window_is_on_screen_keyboard_shown.cc", |
| "//starboard/shared/stub/window_on_screen_keyboard_is_supported.cc", |
| "//starboard/shared/stub/window_on_screen_keyboard_suggestions_supported.cc", |
| "//starboard/shared/stub/window_set_on_screen_keyboard_keep_focus.cc", |
| "//starboard/shared/stub/window_show_on_screen_keyboard.cc", |
| "//starboard/shared/stub/window_update_on_screen_keyboard_suggestions.cc", |
| "run_starboard_main.cc", |
| ] |
| |
| sources += common_player_sources |
| |
| if (!sb_is_modular) { |
| sources += [ "//starboard/raspi/shared/main.cc" ] |
| } |
| |
| configs += [ "//starboard/build/config:starboard_implementation" ] |
| |
| public_deps = [ |
| ":starboard_base_symbolize", |
| "//starboard:starboard_headers_only", |
| "//starboard/common", |
| "//starboard/shared/ffmpeg:ffmpeg_dynamic_load", |
| "//starboard/shared/starboard/media:media_util", |
| "//starboard/shared/starboard/player/filter:filter_based_player_sources", |
| ] |
| |
| deps = [ |
| "//third_party/libevent", |
| "//third_party/opus", |
| ] |
| |
| if (sb_evergreen_compatible_use_libunwind) { |
| deps += [ "//third_party/llvm-project/libunwind:unwind_starboard" ] |
| } |
| |
| if (sb_is_evergreen_compatible) { |
| sources += [ |
| "//starboard/shared/starboard/loader_app_metrics.cc", |
| "//starboard/shared/starboard/loader_app_metrics.h", |
| ] |
| |
| public_deps += [ |
| "//starboard/elf_loader:constants", |
| "//starboard/elf_loader:evergreen_config", |
| "//starboard/loader_app:pending_restart", |
| ] |
| deps += [ "//third_party/crashpad/crashpad/wrapper" ] |
| } else { |
| deps += [ "//third_party/crashpad/crashpad/wrapper:wrapper_stub" ] |
| } |
| } |
| |
| static_library("starboard_base_symbolize") { |
| sources = [ |
| "//third_party/symbolize/demangle.cc", |
| "//third_party/symbolize/symbolize.cc", |
| ] |
| deps = [ |
| "//starboard:starboard_headers_only", |
| "//starboard/common:common_headers_only", |
| ] |
| if (sb_is_evergreen_compatible && current_toolchain == starboard_toolchain) { |
| public_deps = [ "//starboard/elf_loader:evergreen_info" ] |
| } |
| } |
| |
| if (current_toolchain == starboard_toolchain) { |
| target(starboard_level_gtest_target_type, "starboard_platform_tests") { |
| build_loader = false |
| testonly = true |
| |
| sources = player_tests_sources + [ "//starboard/common/test_main.cc" ] |
| |
| configs += [ "//starboard/build/config:starboard_implementation" ] |
| |
| deps = [ |
| "//starboard:starboard_with_main", |
| "//starboard/shared/starboard/player/filter/testing:test_util", |
| "//testing/gmock", |
| "//testing/gtest", |
| ] |
| } |
| } |