| # Copyright 2022 Comcast Cable Communications Management, LLC |
| # |
| # 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. |
| # |
| # SPDX-License-Identifier: Apache-2.0 |
| # |
| # 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/linux/pkg_config.gni") |
| |
| declare_args() { |
| rdk_enable_securityagent = true |
| rdk_enable_ocdm = true |
| rdk_enable_rfc_api = false |
| } |
| |
| pkg_config("glib") { |
| packages = [ |
| "glib-2.0", |
| "gobject-2.0", |
| "gthread-2.0", |
| ] |
| } |
| |
| pkg_config("gstreamer") { |
| packages = [ |
| "gstreamer-1.0", |
| "gstreamer-app-1.0", |
| "gstreamer-base-1.0", |
| "gstreamer-video-1.0", |
| "gstreamer-audio-1.0", |
| "gstreamer-pbutils-1.0", |
| ] |
| } |
| |
| pkg_config("wpeframework") { |
| packages = [ |
| "WPEFrameworkCore", |
| "WPEFrameworkDefinitions", |
| "WPEFrameworkWebSocket", |
| ] |
| } |
| |
| pkg_config("cryptography") { |
| packages = [ "WPEFrameworkCryptography" ] |
| defines = [ "HAS_CRYPTOGRAPHY=1" ] |
| } |
| |
| if (rdk_enable_securityagent) { |
| pkg_config("securityagent") { |
| packages = [ "securityagent" ] |
| defines = [ "HAS_SECURITY_AGENT=1" ] |
| } |
| } |
| |
| if (rdk_enable_ocdm) { |
| pkg_config("ocdm") { |
| packages = [ "ocdm" ] |
| defines = [ "HAS_OCDM=1" ] |
| } |
| } |
| |
| static_library("starboard_platform") { |
| check_includes = false |
| |
| # has_pedantic_warnings = true |
| |
| defines = [] |
| |
| sources = [ |
| # Shared sources |
| "//starboard/shared/gles/system_gles2.cc", |
| "//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/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_used_cpu_memory.cc", |
| "//starboard/shared/linux/system_is_debugger_attached.cc", |
| "//starboard/shared/linux/thread_get_id.cc", |
| "//starboard/shared/linux/thread_get_name.cc", |
| "//starboard/shared/linux/thread_set_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/posix/directory_create.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_mapped_file.cc", |
| "//starboard/shared/posix/memory_mapped_file.h", |
| "//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_create.cc", |
| "//starboard/shared/pthread/thread_create_local_key.cc", |
| "//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_is_supported.cc", |
| "//starboard/shared/pthread/thread_sampler_thaw.cc", |
| "//starboard/shared/pthread/thread_set_local_value.cc", |
| "//starboard/shared/pthread/thread_types_public.h", |
| "//starboard/shared/pthread/thread_yield.cc", |
| "//starboard/shared/signal/crash_signals.cc", |
| "//starboard/shared/signal/crash_signals.h", |
| "//starboard/shared/signal/suspend_signals.cc", |
| "//starboard/shared/signal/suspend_signals.h", |
| "//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_is_audio_frame_storage_type_supported_interleaved_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/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/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_is_server_certificate_updatable.cc", |
| "//starboard/shared/starboard/drm/drm_system_internal.h", |
| "//starboard/shared/starboard/drm/drm_update_server_certificate.cc", |
| "//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_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_message.cc", |
| "//starboard/shared/starboard/log_mutex.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_output_count_single_audio_output.cc", |
| "//starboard/shared/starboard/memory.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_freeze.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/decode_target_get_info.cc", |
| "//starboard/shared/stub/decode_target_release.cc", |
| "//starboard/shared/stub/image_decode.cc", |
| "//starboard/shared/stub/image_is_decode_supported.cc", |
| "//starboard/shared/stub/log_raw_dump_stack.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/system_hide_splash_screen.cc", |
| "//starboard/shared/stub/system_raise_platform_error.cc", |
| "//starboard/shared/stub/system_symbolize.cc", |
| "//starboard/shared/stub/thread_create_priority.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_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", |
| |
| # RDK implementation |
| "accessibility_data.cc", |
| "accessibility_get_caption_settings.cc", |
| "accessibility_get_display_settings.cc", |
| "accessibility_set_captions_enabled.cc", |
| "application_rdk.cc", |
| "audio_sink/audio_sink_is_audio_sample_type_supported.cc", |
| "audio_sink/gstreamer_audio_sink_type.cc", |
| "audio_sink/gstreamer_audio_sink_type_lifecycle.cc", |
| "configuration.cc", |
| "configuration.h", |
| "drm/drm_create_system.cc", |
| "drm/drm_system_ocdm.cc", |
| "drm/gst_decryptor_ocdm.cc", |
| "ess_input.cc", |
| "firebolt/firebolt.cc", |
| "firebolt/firebolt.h", |
| "get_home_directory.cc", |
| "hang_detector.cc", |
| "hang_detector.h", |
| "libcobalt.cc", |
| "libcobalt.h", |
| "linux_key_mapping.cc", |
| "linux_key_mapping.h", |
| "main_rdk.cc", |
| "media/gst_media_utils.cc", |
| "media/media_get_audio_buffer_budget.cc", |
| "media/media_get_audio_configuration.cc", |
| "media/media_get_buffer_alignment.cc", |
| "media/media_get_buffer_allocation_unit.cc", |
| "media/media_get_buffer_garbage_collection_duration_threshold.cc", |
| "media/media_get_buffer_padding.cc", |
| "media/media_get_buffer_storage_type.cc", |
| "media/media_get_initial_buffer_capacity.cc", |
| "media/media_get_max_buffer_capacity.cc", |
| "media/media_get_progressive_buffer_budget.cc", |
| "media/media_get_video_buffer_budget.cc", |
| "media/media_is_audio_supported.cc", |
| "media/media_is_buffer_pool_allocate_on_demand.cc", |
| "media/media_is_buffer_using_memory_pool.cc", |
| "media/media_is_output_protected.cc", |
| "media/media_is_supported.cc", |
| "media/media_is_transfer_characteristics_supported.cc", |
| "media/media_is_video_supported.cc", |
| "platform_service.cc", |
| "platform_service.h", |
| "player/player_create.cc", |
| "player/player_destroy.cc", |
| "player/player_get_audio_configuration.cc", |
| "player/player_get_current_frame.cc", |
| "player/player_get_info.cc", |
| "player/player_get_maximum_number_of_samples_per_write.cc", |
| "player/player_get_preferred_output_mode.cc", |
| "player/player_internal.cc", |
| "player/player_output_mode_supported.cc", |
| "player/player_seek.cc", |
| "player/player_set_bounds.cc", |
| "player/player_set_playback_rate.cc", |
| "player/player_set_volume.cc", |
| "player/player_write_end_of_stream.cc", |
| "player/player_write_sample.cc", |
| "rdkservices.cc", |
| "speech/accessibility_get_text_to_speech_settings.cc", |
| "speech/speech_synthesis_cancel.cc", |
| "speech/speech_synthesis_is_supported.cc", |
| "speech/speech_synthesis_speak.cc", |
| "system/system_egl.cc", |
| "system/system_get_device_type.cc", |
| "system/system_get_extensions.cc", |
| "system/system_get_path.cc", |
| "system/system_get_property.cc", |
| "system/system_has_capability.cc", |
| "system/system_network_is_disconnected.cc", |
| "system/system_request_conceal.cc", |
| "system/system_sign_with_certification_secret_key.cc", |
| "system/system_get_total_cpu_memory.cc", |
| "system/system_get_total_gpu_memory.cc", |
| "system/system_get_used_gpu_memory.cc", |
| "time_zone_get_name.cc", |
| "window/window_create.cc", |
| "window/window_destroy.cc", |
| "window/window_get_diagonal_size_in_inches.cc", |
| "window/window_get_platform_handle.cc", |
| "window/window_get_size.cc", |
| "window/window_internal.cc", |
| ] |
| |
| if (target_platform == "rdk-rpi") { |
| sources -= [ |
| "//starboard/shared/gles/system_gles2.cc", |
| ] |
| sources += [ |
| "//starboard/raspi/shared/system_gles2.cc", |
| ] |
| } |
| |
| if (final_executable_type == "shared_library") { |
| sources += [ |
| "//starboard/shared/starboard/shared_main_adapter.cc" |
| ] |
| } |
| |
| cflags = [] |
| |
| libs = [ |
| "EGL", |
| "GLESv2", |
| "essos", |
| "dl", |
| ] |
| |
| configs += [ |
| "//starboard/build/config:starboard_implementation", |
| ":glib", |
| ":gstreamer", |
| ":wpeframework", |
| ":cryptography", |
| ] |
| |
| if (rdk_enable_rfc_api) { |
| libs += [ |
| "rfcapi", |
| ] |
| cflags += [ |
| "-I=/usr/include/wdmp-c", |
| ] |
| defines = [ "HAS_RFC_API=1" ] |
| } |
| |
| if (rdk_enable_securityagent) { |
| configs += [ ":securityagent" ] |
| } |
| |
| if (rdk_enable_ocdm) { |
| configs += [ ":ocdm" ] |
| } |
| |
| public_deps = [ |
| "//starboard:starboard_headers_only", |
| "//starboard/common", |
| "//starboard/shared/starboard/media:media_util", |
| ] |
| |
| deps = [ |
| "//third_party/libevent", |
| ] |
| |
| if (sb_is_evergreen_compatible) { |
| public_deps += [ |
| "//starboard/elf_loader:constants", |
| "//starboard/elf_loader:evergreen_config" |
| ] |
| deps += [ "//third_party/crashpad/wrapper" ] |
| } else { |
| deps += [ "//third_party/crashpad/wrapper:wrapper_stub" ] |
| } |
| } |