| # 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("//build/config/win/visual_studio_version.gni") |
| import("//starboard/build/convert_i18n_data.gni") |
| import("//starboard/shared/starboard/player/buildfiles.gni") |
| |
| config("starboard_platform_config") { |
| if (current_os == "winuwp") { |
| # We want this to apply to all shared win sources for xb1. |
| configs = [ "//starboard/xb1:starboard_platform_config" ] |
| } |
| include_dirs = [ |
| "//third_party/angle/include", |
| "//third_party/angle/include/EGL", |
| "//third_party/angle/include/GLES2", |
| "//third_party/angle/include/KHR", |
| ] |
| |
| cflags = [ |
| "/EHsc", # C++ exceptions (required with /ZW) |
| "/FU${msvc_path}/lib/x86/store/references/platform.winmd", |
| "/FU${windows_sdk_path}/References/$wdk_version/Windows.Foundation.FoundationContract/4.0.0.0/Windows.Foundation.FoundationContract.winmd", |
| "/FU${windows_sdk_path}/References/$wdk_version/Windows.Foundation.UniversalApiContract/14.0.0.0/Windows.Foundation.UniversalApiContract.winmd", |
| "/FU${windows_sdk_path}/References/$wdk_version/Windows.UI.ViewManagement.ViewManagementViewScalingContract/1.0.0.0/Windows.UI.ViewManagement.ViewManagementViewScalingContract.winmd", |
| ] |
| |
| if (is_internal_build) { |
| cflags += [ |
| "/FU${windows_sdk_path}/References/$wdk_version/Windows.Xbox.ApplicationResourcesContract/2.0.0.0/Windows.Xbox.ApplicationResourcesContract.winmd", |
| "/FU${windows_sdk_path}/References/$wdk_version/Windows.Xbox.Security.ApplicationSpecificDeviceAuthenticationContract/1.0.0.0/Windows.Xbox.Security.ApplicationSpecificDeviceAuthenticationContract.winmd", |
| ] |
| } |
| } |
| |
| static_library("starboard_platform") { |
| has_pedantic_warnings = true |
| |
| sources = [ |
| "//starboard/common/thread.cc", |
| "//starboard/common/thread.h", |
| "//starboard/shared/egl/system_egl.cc", |
| "//starboard/shared/gles/system_gles2.cc", |
| "//starboard/shared/iso/string_scan.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/socket_is_ipv6_supported.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_min_buffer_size_in_frames.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_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/drm/drm_close_session.cc", |
| "//starboard/shared/starboard/drm/drm_destroy_system.cc", |
| "//starboard/shared/starboard/drm/drm_generate_session_update_request.cc", |
| "//starboard/shared/starboard/drm/drm_get_metrics.cc", |
| "//starboard/shared/starboard/drm/drm_system_internal.h", |
| "//starboard/shared/starboard/drm/drm_update_session.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/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_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_progressive_buffer_budget.cc", |
| "//starboard/shared/starboard/media/media_get_video_buffer_budget.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/net_args.cc", |
| "//starboard/shared/starboard/net_args.h", |
| "//starboard/shared/starboard/net_log.cc", |
| "//starboard/shared/starboard/net_log.h", |
| "//starboard/shared/starboard/string_duplicate.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/cpu_features_get.cc", |
| "//starboard/shared/stub/image_decode.cc", |
| "//starboard/shared/stub/image_is_decode_supported.cc", |
| "//starboard/shared/stub/media_set_audio_write_duration.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_has_capability.cc", |
| "//starboard/shared/stub/system_hide_splash_screen.cc", |
| "//starboard/shared/stub/system_network_is_disconnected.cc", |
| "//starboard/shared/stub/system_sign_with_certification_secret_key.cc", |
| "//starboard/shared/stub/thread_context_get_pointer.cc", |
| "//starboard/shared/stub/thread_create_priority.cc", |
| "//starboard/shared/stub/thread_sampler_create.cc", |
| "//starboard/shared/stub/thread_sampler_destroy.cc", |
| "//starboard/shared/stub/thread_sampler_freeze.cc", |
| "//starboard/shared/stub/thread_sampler_is_supported.cc", |
| "//starboard/shared/stub/thread_sampler_thaw.cc", |
| "//starboard/shared/stub/time_get_monotonic_thread_now.cc", |
| "//starboard/shared/stub/time_is_time_thread_now_supported.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", |
| "//starboard/shared/win32/adapter_utils.cc", |
| "//starboard/shared/win32/adapter_utils.h", |
| "//starboard/shared/win32/atomic_public.h", |
| "//starboard/shared/win32/atomic_queue.h", |
| "//starboard/shared/win32/audio_decoder.cc", |
| "//starboard/shared/win32/audio_decoder.h", |
| "//starboard/shared/win32/audio_decoder_thread.cc", |
| "//starboard/shared/win32/audio_decoder_thread.h", |
| "//starboard/shared/win32/audio_sink.cc", |
| "//starboard/shared/win32/audio_sink_get_max_channels.cc", |
| "//starboard/shared/win32/audio_sink_get_nearest_supported_sample_frequency.cc", |
| "//starboard/shared/win32/audio_sink_is_audio_frame_storage_type_supported.cc", |
| "//starboard/shared/win32/audio_sink_is_audio_sample_type_supported.cc", |
| "//starboard/shared/win32/audio_transform.cc", |
| "//starboard/shared/win32/audio_transform.h", |
| "//starboard/shared/win32/auto_event_handle.h", |
| "//starboard/shared/win32/byte_swap.cc", |
| "//starboard/shared/win32/condition_variable_broadcast.cc", |
| "//starboard/shared/win32/condition_variable_create.cc", |
| "//starboard/shared/win32/condition_variable_destroy.cc", |
| "//starboard/shared/win32/condition_variable_signal.cc", |
| "//starboard/shared/win32/condition_variable_wait.cc", |
| "//starboard/shared/win32/condition_variable_wait_timed.cc", |
| "//starboard/shared/win32/decode_target_internal.cc", |
| "//starboard/shared/win32/decode_target_internal.h", |
| "//starboard/shared/win32/decrypting_decoder.cc", |
| "//starboard/shared/win32/decrypting_decoder.h", |
| "//starboard/shared/win32/directory_can_open.cc", |
| "//starboard/shared/win32/directory_close.cc", |
| "//starboard/shared/win32/directory_create.cc", |
| "//starboard/shared/win32/directory_get_next.cc", |
| "//starboard/shared/win32/directory_internal.cc", |
| "//starboard/shared/win32/directory_internal.h", |
| "//starboard/shared/win32/directory_open.cc", |
| "//starboard/shared/win32/drm_system_playready.cc", |
| "//starboard/shared/win32/drm_system_playready.h", |
| "//starboard/shared/win32/dx_context_video_decoder.cc", |
| "//starboard/shared/win32/dx_context_video_decoder.h", |
| "//starboard/shared/win32/environment.cc", |
| "//starboard/shared/win32/error_utils.cc", |
| "//starboard/shared/win32/error_utils.h", |
| "//starboard/shared/win32/file_atomic_replace.cc", |
| "//starboard/shared/win32/file_can_open.cc", |
| "//starboard/shared/win32/file_close.cc", |
| "//starboard/shared/win32/file_delete.cc", |
| "//starboard/shared/win32/file_exists.cc", |
| "//starboard/shared/win32/file_flush.cc", |
| "//starboard/shared/win32/file_get_info.cc", |
| "//starboard/shared/win32/file_get_path_info.cc", |
| "//starboard/shared/win32/file_internal.cc", |
| "//starboard/shared/win32/file_internal.h", |
| "//starboard/shared/win32/file_open.cc", |
| "//starboard/shared/win32/file_read.cc", |
| "//starboard/shared/win32/file_seek.cc", |
| "//starboard/shared/win32/file_truncate.cc", |
| "//starboard/shared/win32/file_write.cc", |
| "//starboard/shared/win32/graphics.cc", |
| "//starboard/shared/win32/graphics.h", |
| "//starboard/shared/win32/hardware_decode_target_internal.cc", |
| "//starboard/shared/win32/hardware_decode_target_internal.h", |
| "//starboard/shared/win32/log.cc", |
| "//starboard/shared/win32/log_flush.cc", |
| "//starboard/shared/win32/log_format.cc", |
| "//starboard/shared/win32/log_is_tty.cc", |
| "//starboard/shared/win32/log_raw_dump_stack.cc", |
| "//starboard/shared/win32/media_common.cc", |
| "//starboard/shared/win32/media_common.h", |
| "//starboard/shared/win32/media_foundation_utils.cc", |
| "//starboard/shared/win32/media_foundation_utils.h", |
| "//starboard/shared/win32/media_get_max_buffer_capacity.cc", |
| "//starboard/shared/win32/media_transform.cc", |
| "//starboard/shared/win32/media_transform.h", |
| "//starboard/shared/win32/memory_allocate_aligned_unchecked.cc", |
| "//starboard/shared/win32/memory_allocate_unchecked.cc", |
| "//starboard/shared/win32/memory_flush.cc", |
| "//starboard/shared/win32/memory_free.cc", |
| "//starboard/shared/win32/memory_free_aligned.cc", |
| "//starboard/shared/win32/memory_map.cc", |
| "//starboard/shared/win32/memory_protect.cc", |
| "//starboard/shared/win32/memory_reallocate_unchecked.cc", |
| "//starboard/shared/win32/memory_unmap.cc", |
| "//starboard/shared/win32/mutex_acquire.cc", |
| "//starboard/shared/win32/mutex_acquire_try.cc", |
| "//starboard/shared/win32/mutex_create.cc", |
| "//starboard/shared/win32/mutex_destroy.cc", |
| "//starboard/shared/win32/mutex_release.cc", |
| "//starboard/shared/win32/once.cc", |
| "//starboard/shared/win32/posix_emu/posix_memalign.cc", |
| "//starboard/shared/win32/set_non_blocking_internal.cc", |
| "//starboard/shared/win32/set_non_blocking_internal.h", |
| "//starboard/shared/win32/socket_accept.cc", |
| "//starboard/shared/win32/socket_bind.cc", |
| "//starboard/shared/win32/socket_clear_last_error.cc", |
| "//starboard/shared/win32/socket_connect.cc", |
| "//starboard/shared/win32/socket_create.cc", |
| "//starboard/shared/win32/socket_destroy.cc", |
| "//starboard/shared/win32/socket_free_resolution.cc", |
| "//starboard/shared/win32/socket_get_interface_address.cc", |
| "//starboard/shared/win32/socket_get_last_error.cc", |
| "//starboard/shared/win32/socket_get_local_address.cc", |
| "//starboard/shared/win32/socket_internal.cc", |
| "//starboard/shared/win32/socket_internal.h", |
| "//starboard/shared/win32/socket_is_connected.cc", |
| "//starboard/shared/win32/socket_is_connected_and_idle.cc", |
| "//starboard/shared/win32/socket_join_multicast_group.cc", |
| "//starboard/shared/win32/socket_listen.cc", |
| "//starboard/shared/win32/socket_receive_from.cc", |
| "//starboard/shared/win32/socket_resolve.cc", |
| "//starboard/shared/win32/socket_send_to.cc", |
| "//starboard/shared/win32/socket_set_broadcast.cc", |
| "//starboard/shared/win32/socket_set_receive_buffer_size.cc", |
| "//starboard/shared/win32/socket_set_reuse_address.cc", |
| "//starboard/shared/win32/socket_set_send_buffer_size.cc", |
| "//starboard/shared/win32/socket_set_tcp_keep_alive.cc", |
| "//starboard/shared/win32/socket_set_tcp_no_delay.cc", |
| "//starboard/shared/win32/socket_set_tcp_window_scaling.cc", |
| "//starboard/shared/win32/socket_waiter_add.cc", |
| "//starboard/shared/win32/socket_waiter_create.cc", |
| "//starboard/shared/win32/socket_waiter_destroy.cc", |
| "//starboard/shared/win32/socket_waiter_internal.cc", |
| "//starboard/shared/win32/socket_waiter_remove.cc", |
| "//starboard/shared/win32/socket_waiter_wait.cc", |
| "//starboard/shared/win32/socket_waiter_wait_timed.cc", |
| "//starboard/shared/win32/socket_waiter_wake_up.cc", |
| "//starboard/shared/win32/storage_write_record.cc", |
| "//starboard/shared/win32/string_compare_no_case.cc", |
| "//starboard/shared/win32/string_compare_no_case_n.cc", |
| "//starboard/shared/win32/string_format.cc", |
| "//starboard/shared/win32/string_format_wide.cc", |
| "//starboard/shared/win32/system_break_into_debugger.cc", |
| "//starboard/shared/win32/system_clear_last_error.cc", |
| "//starboard/shared/win32/system_get_error_string.cc", |
| "//starboard/shared/win32/system_get_last_error.cc", |
| "//starboard/shared/win32/system_get_locale_id.cc", |
| "//starboard/shared/win32/system_get_number_of_processors.cc", |
| "//starboard/shared/win32/system_get_random_data.cc", |
| "//starboard/shared/win32/system_get_random_uint64.cc", |
| "//starboard/shared/win32/system_get_stack.cc", |
| "//starboard/shared/win32/system_is_debugger_attached.cc", |
| "//starboard/shared/win32/thread_create.cc", |
| "//starboard/shared/win32/thread_create_local_key.cc", |
| "//starboard/shared/win32/thread_destroy_local_key.cc", |
| "//starboard/shared/win32/thread_detach.cc", |
| "//starboard/shared/win32/thread_get_current.cc", |
| "//starboard/shared/win32/thread_get_id.cc", |
| "//starboard/shared/win32/thread_get_local_value.cc", |
| "//starboard/shared/win32/thread_get_name.cc", |
| "//starboard/shared/win32/thread_is_equal.cc", |
| "//starboard/shared/win32/thread_join.cc", |
| "//starboard/shared/win32/thread_local_internal.cc", |
| "//starboard/shared/win32/thread_local_internal.h", |
| "//starboard/shared/win32/thread_private.cc", |
| "//starboard/shared/win32/thread_private.h", |
| "//starboard/shared/win32/thread_set_local_value.cc", |
| "//starboard/shared/win32/thread_set_name.cc", |
| "//starboard/shared/win32/thread_sleep.cc", |
| "//starboard/shared/win32/thread_yield.cc", |
| "//starboard/shared/win32/time_get_monotonic_now.cc", |
| "//starboard/shared/win32/time_get_now.cc", |
| "//starboard/shared/win32/time_utils.h", |
| "//starboard/shared/win32/time_zone_get_current.cc", |
| "//starboard/shared/win32/video_decoder.cc", |
| "//starboard/shared/win32/video_decoder.h", |
| "//starboard/shared/win32/wasapi_include.h", |
| "//starboard/shared/win32/wchar_utils.h", |
| "//starboard/shared/win32/win32_audio_decoder.cc", |
| "//starboard/shared/win32/win32_audio_decoder.h", |
| "//starboard/shared/win32/wrm_header.cc", |
| "//starboard/shared/win32/wrm_header.h", |
| ] |
| |
| sources += common_player_sources |
| |
| configs += [ |
| "//starboard/build/config:starboard_implementation", |
| ":starboard_platform_config", |
| ] |
| |
| public_deps = [ |
| "//starboard/common", |
| "//starboard/shared/starboard/media:media_util", |
| "//starboard/shared/starboard/player/filter:filter_based_player_sources", |
| ] |
| |
| deps = [ |
| "//starboard/egl_and_gles", |
| "//starboard/shared/starboard/media:media_util", |
| "//starboard/shared/starboard/player/filter:filter_based_player_sources", |
| "//third_party/opus", |
| ] |
| |
| if (is_internal_build) { |
| deps += [ "//internal/starboard/private/shared/stub:private_sources" ] |
| } |
| |
| if (gl_type == "angle") { |
| deps += [ "//third_party/angle:translator" ] |
| } |
| } |