From d058587e549101aac0bc9744718bbb3ae8a4eb64 Mon Sep 17 00:00:00 2001 From: Oscar Vestlie Date: Wed, 5 Jun 2024 14:40:00 -0700 Subject: [PATCH] Remove Starboard version 13 (#3035) b/293645066 (cherry picked from commit 48f575081b60756924f9d646c3ff5c2c7bffb0c3) --- cobalt/browser/user_agent_platform_info.cc | 2 - cobalt/h5vcc/h5vcc_storage.cc | 4 -- cobalt/h5vcc/h5vcc_system.cc | 22 ------- cobalt/media/decoder_buffer_allocator.cc | 10 ---- cobalt/network/url_request_context.cc | 5 +- .../skia/hardware_resource_provider.cc | 4 -- cobalt/updater/updater_module.cc | 9 --- media/base/starboard_utils.cc | 10 ---- starboard/android/shared/BUILD.gn | 1 - .../android/shared/configuration_constants.cc | 2 - .../shared/system_get_connection_type.cc | 36 ----------- starboard/android/shared/system_get_path.cc | 7 --- .../android/shared/system_get_property.cc | 2 - starboard/common/media.cc | 7 --- starboard/configuration.h | 2 +- starboard/configuration_constants.h | 2 - starboard/decode_target.h | 4 -- starboard/elf_loader/exported_symbols.cc | 5 -- starboard/extension/updater_notification.h | 7 +-- starboard/linux/shared/BUILD.gn | 1 - .../linux/shared/configuration_constants.cc | 2 - .../linux/shared/media_is_audio_supported.cc | 2 - .../shared/system_get_connection_type.cc | 48 --------------- .../linux/shared/system_get_extensions.cc | 5 -- starboard/linux/shared/system_get_path.cc | 6 -- .../linux/x64x11/system_get_property_impl.cc | 17 ++++-- starboard/media.h | 18 ------ starboard/nplb/BUILD.gn | 1 - starboard/nplb/media_buffer_test.cc | 25 +------- .../nplb_evergreen_compat_tests/sabi_test.cc | 60 ------------------- starboard/nplb/player_create_test.cc | 41 +++++++------ .../nplb/player_creation_param_helpers.cc | 2 - .../player_get_preferred_output_mode_test.cc | 37 +++++++----- starboard/nplb/player_test_util.cc | 2 - .../nplb/system_get_connection_type_test.cc | 48 --------------- starboard/nplb/system_get_path_test.cc | 6 -- starboard/raspi/shared/BUILD.gn | 1 - .../raspi/shared/configuration_constants.cc | 2 - starboard/raspi/shared/system_get_property.cc | 2 - .../ffmpeg/ffmpeg_audio_decoder_impl.cc | 7 +-- .../ffmpeg/ffmpeg_audio_decoder_test.cc | 2 - .../shared/libjpeg/jpeg_image_decoder.cc | 2 - .../shared/starboard/media/codec_util.cc | 2 - .../shared/starboard/media/codec_util_test.cc | 2 - .../media/media_get_buffer_alignment.cc | 4 -- .../media/media_get_buffer_padding.cc | 4 -- starboard/shared/starboard/media/mime_util.cc | 2 - .../shared/starboard/media/mime_util_test.cc | 2 - .../starboard/media/parsed_mime_info_test.cc | 2 - .../starboard/player/video_dmp_reader.cc | 2 - .../shared/starboard/queue_application.h | 2 - .../shared/stub/media_get_buffer_alignment.cc | 4 -- .../shared/stub/media_get_buffer_padding.cc | 4 -- .../shared/stub/system_get_connection_type.cc | 23 ------- .../shared/uwp/media_is_video_supported.cc | 9 --- starboard/shared/uwp/system_get_property.cc | 2 - starboard/shared/win32/system_get_property.cc | 2 - starboard/stub/BUILD.gn | 1 - starboard/stub/configuration_constants.cc | 2 - starboard/system.h | 28 --------- .../win/shared/configuration_constants.cc | 2 - .../xb1/shared/configuration_constants.cc | 2 - .../xb1/shared/gpu_base_video_decoder.cc | 5 -- 63 files changed, 61 insertions(+), 523 deletions(-) delete mode 100644 starboard/android/shared/system_get_connection_type.cc delete mode 100644 starboard/linux/shared/system_get_connection_type.cc delete mode 100644 starboard/nplb/system_get_connection_type_test.cc delete mode 100644 starboard/shared/stub/system_get_connection_type.cc diff --git a/cobalt/browser/user_agent_platform_info.cc b/cobalt/browser/user_agent_platform_info.cc index 294ba1bce032..2897ddaf3a75 100644 --- a/cobalt/browser/user_agent_platform_info.cc +++ b/cobalt/browser/user_agent_platform_info.cc @@ -123,9 +123,7 @@ const DeviceTypeName kDeviceTypeStrings[] = { {kSbSystemDeviceTypeTV, "TV"}, {kSbSystemDeviceTypeAndroidTV, "ATV"}, {kSbSystemDeviceTypeDesktopPC, "DESKTOP"}, -#if SB_API_VERSION >= 14 {kSbSystemDeviceTypeVideoProjector, "PROJECTOR"}, -#endif // SB_API_VERSION >= 14 {kSbSystemDeviceTypeUnknown, "UNKNOWN"}}; std::string CreateDeviceTypeString(SbSystemDeviceType device_type) { diff --git a/cobalt/h5vcc/h5vcc_storage.cc b/cobalt/h5vcc/h5vcc_storage.cc index fdd660e0ff67..9b6c095b8845 100644 --- a/cobalt/h5vcc/h5vcc_storage.cc +++ b/cobalt/h5vcc/h5vcc_storage.cc @@ -271,9 +271,7 @@ H5vccStorageSetQuotaResponse H5vccStorage::SetQuota( quota.cache_api() + quota.service_worker_js(); uint32_t max_quota_size = 24 * 1024 * 1024; -#if SB_API_VERSION >= 14 max_quota_size = kSbMaxSystemPathCacheDirectorySize; -#endif // Assume the non-http-cache memory in kSbSystemPathCacheDirectory // is less than 1 mb and subtract this from the max_quota_size. max_quota_size -= (1 << 20); @@ -359,9 +357,7 @@ H5vccStorageResourceTypeQuotaBytesDictionary H5vccStorage::GetQuota() { network::disk_cache::kServiceWorkerScript)); uint32_t max_quota_size = 24 * 1024 * 1024; -#if SB_API_VERSION >= 14 max_quota_size = kSbMaxSystemPathCacheDirectorySize; -#endif // Assume the non-http-cache memory in kSbSystemPathCacheDirectory // is less than 1 mb and subtract this from the max_quota_size. max_quota_size -= (1 << 20); diff --git a/cobalt/h5vcc/h5vcc_system.cc b/cobalt/h5vcc/h5vcc_system.cc index 8e194d6b0dd0..bd4cd342ee16 100644 --- a/cobalt/h5vcc/h5vcc_system.cc +++ b/cobalt/h5vcc/h5vcc_system.cc @@ -85,45 +85,23 @@ std::string H5vccSystem::platform() const { std::string H5vccSystem::advertising_id() const { std::string result; char property[kSystemPropertyMaxLength] = {0}; -#if SB_API_VERSION >= 14 if (!SbSystemGetProperty(kSbSystemPropertyAdvertisingId, property, SB_ARRAY_SIZE_INT(property))) { DLOG(INFO) << "Failed to get kSbSystemPropertyAdvertisingId."; } else { result = property; } -#else - if (ifa_extension_ && ifa_extension_->version >= 1) { - if (!ifa_extension_->GetAdvertisingId(property, - SB_ARRAY_SIZE_INT(property))) { - DLOG(FATAL) << "Failed to get AdvertisingId from IFA extension."; - } else { - result = property; - } - } -#endif return result; } bool H5vccSystem::limit_ad_tracking() const { bool result = false; char property[kSystemPropertyMaxLength] = {0}; -#if SB_API_VERSION >= 14 if (!SbSystemGetProperty(kSbSystemPropertyLimitAdTracking, property, SB_ARRAY_SIZE_INT(property))) { DLOG(INFO) << "Failed to get kSbSystemPropertyAdvertisingId."; } else { result = std::atoi(property); } -#else - if (ifa_extension_ && ifa_extension_->version >= 1) { - if (!ifa_extension_->GetLimitAdTracking(property, - SB_ARRAY_SIZE_INT(property))) { - DLOG(FATAL) << "Failed to get LimitAdTracking from IFA extension."; - } else { - result = std::atoi(property); - } - } -#endif return result; } diff --git a/cobalt/media/decoder_buffer_allocator.cc b/cobalt/media/decoder_buffer_allocator.cc index 2a209586dbe6..6c91b45a3592 100644 --- a/cobalt/media/decoder_buffer_allocator.cc +++ b/cobalt/media/decoder_buffer_allocator.cc @@ -129,24 +129,14 @@ int DecoderBufferAllocator::GetAudioBufferBudget() const { int DecoderBufferAllocator::GetBufferAlignment() const { #if SB_API_VERSION < 16 -#if SB_API_VERSION >= 14 return SbMediaGetBufferAlignment(); -#else // SB_API_VERSION >= 14 - return std::max(SbMediaGetBufferAlignment(kSbMediaTypeAudio), - SbMediaGetBufferAlignment(kSbMediaTypeVideo)); -#endif // SB_API_VERSION >= 14 #else return sizeof(void*); #endif // SB_API_VERSION < 16 } int DecoderBufferAllocator::GetBufferPadding() const { -#if SB_API_VERSION >= 14 return SbMediaGetBufferPadding(); -#else // SB_API_VERSION >= 14 - return std::max(SbMediaGetBufferPadding(kSbMediaTypeAudio), - SbMediaGetBufferPadding(kSbMediaTypeVideo)); -#endif // SB_API_VERSION >= 14 } base::TimeDelta diff --git a/cobalt/network/url_request_context.cc b/cobalt/network/url_request_context.cc index bab31604648b..16ee6d8c81b7 100644 --- a/cobalt/network/url_request_context.cc +++ b/cobalt/network/url_request_context.cc @@ -244,10 +244,7 @@ URLRequestContext::URLRequestContext( } else { using_http_cache_ = true; - int max_cache_bytes = 24 * 1024 * 1024; -#if SB_API_VERSION >= 14 - max_cache_bytes = kSbMaxSystemPathCacheDirectorySize; -#endif + int max_cache_bytes = kSbMaxSystemPathCacheDirectorySize; // Assume the non-http-cache memory in kSbSystemPathCacheDirectory // is less than 1 mb and subtract this from the max_cache_bytes. max_cache_bytes -= (1 << 20); diff --git a/cobalt/renderer/rasterizer/skia/hardware_resource_provider.cc b/cobalt/renderer/rasterizer/skia/hardware_resource_provider.cc index fcc33f070a42..d80b8bd4e987 100644 --- a/cobalt/renderer/rasterizer/skia/hardware_resource_provider.cc +++ b/cobalt/renderer/rasterizer/skia/hardware_resource_provider.cc @@ -207,9 +207,7 @@ uint32_t DecodeTargetFormatToGLFormat( } } break; case kSbDecodeTargetFormat3Plane10BitYUVI420: -#if SB_API_VERSION >= 14 case kSbDecodeTargetFormat3Plane10BitYUVI420Compact: -#endif // SB_API_VERSION >= 14 case kSbDecodeTargetFormat3PlaneYUVI420: { DCHECK_LT(plane, 3); #if defined(GL_RED_EXT) @@ -238,11 +236,9 @@ DecodeTargetFormatToRenderTreeMultiPlaneFormat(SbDecodeTargetFormat format) { case kSbDecodeTargetFormat3Plane10BitYUVI420: { return render_tree::kMultiPlaneImageFormatYUV3Plane10BitBT2020; } break; -#if SB_API_VERSION >= 14 case kSbDecodeTargetFormat3Plane10BitYUVI420Compact: { return render_tree::kMultiPlaneImageFormatYUV3Plane10BitCompactedBT2020; } -#endif // SB_API_VERSION >= 14 default: { NOTREACHED(); } diff --git a/cobalt/updater/updater_module.cc b/cobalt/updater/updater_module.cc index 5fc41d32f72d..9d9af66009c5 100644 --- a/cobalt/updater/updater_module.cc +++ b/cobalt/updater/updater_module.cc @@ -69,21 +69,12 @@ ComponentStateToCobaltExtensionUpdaterNotificationState( return kCobaltExtensionUpdaterNotificationStateDownloaded; case ComponentState::kUpdating: return kCobaltExtensionUpdaterNotificationStateInstalling; -#if SB_API_VERSION > 13 case ComponentState::kUpdated: return kCobaltExtensionUpdaterNotificationStateUpdated; case ComponentState::kUpToDate: return kCobaltExtensionUpdaterNotificationStateUpToDate; case ComponentState::kUpdateError: return kCobaltExtensionUpdaterNotificationStateUpdateFailed; -#else - case ComponentState::kUpdated: - return kCobaltExtensionUpdaterNotificationStatekUpdated; - case ComponentState::kUpToDate: - return kCobaltExtensionUpdaterNotificationStatekUpToDate; - case ComponentState::kUpdateError: - return kCobaltExtensionUpdaterNotificationStatekUpdateFailed; -#endif default: return kCobaltExtensionUpdaterNotificationStateNone; } diff --git a/media/base/starboard_utils.cc b/media/base/starboard_utils.cc index c175785577ea..4e3156fabb39 100644 --- a/media/base/starboard_utils.cc +++ b/media/base/starboard_utils.cc @@ -83,14 +83,12 @@ SbMediaAudioCodec MediaAudioCodecToSbMediaAudioCodec(AudioCodec codec) { return kSbMediaAudioCodecVorbis; case AudioCodec::kOpus: return kSbMediaAudioCodecOpus; -#if SB_API_VERSION >= 14 case AudioCodec::kMP3: return kSbMediaAudioCodecMp3; case AudioCodec::kFLAC: return kSbMediaAudioCodecFlac; case AudioCodec::kPCM: return kSbMediaAudioCodecPcm; -#endif // SB_API_VERSION >= 14 #if SB_API_VERSION >= 15 case AudioCodec::kIAMF: return kSbMediaAudioCodecIamf; @@ -308,9 +306,7 @@ ENUM_EQ(kSbMediaMatrixIdBt2020ConstantLuminance, VideoColorSpace::MatrixID::BT2020_CL); ENUM_EQ(kSbMediaMatrixIdYDzDx, VideoColorSpace::MatrixID::YDZDX); -#if SB_API_VERSION >= 14 ENUM_EQ(kSbMediaMatrixIdInvalid, VideoColorSpace::MatrixID::INVALID); -#endif // SB_API_VERSION >= 14 // Ensure RangeId enums convert correctly. ENUM_EQ(kSbMediaRangeIdUnspecified, gfx::ColorSpace::RangeID::INVALID); @@ -381,12 +377,6 @@ SbMediaColorMetadata MediaToSbMediaColorMetadata( sb_media_color_metadata.matrix = static_cast(color_space.matrix); -#if SB_API_VERSION < 14 - if (color_space.matrix == VideoColorSpace::MatrixID::INVALID) { - sb_media_color_metadata.matrix = kSbMediaMatrixIdUnknown; - } -#endif // SB_API_VERSION < 14 - sb_media_color_metadata.range = static_cast(color_space.range); // TODO(b/230915942): Revisit to see if we have to support custom primary id. diff --git a/starboard/android/shared/BUILD.gn b/starboard/android/shared/BUILD.gn index e94f42affa52..e4cb075526ea 100644 --- a/starboard/android/shared/BUILD.gn +++ b/starboard/android/shared/BUILD.gn @@ -398,7 +398,6 @@ static_library("starboard_platform") { "speech_synthesis_internal.cc", "speech_synthesis_is_supported.cc", "speech_synthesis_speak.cc", - "system_get_connection_type.cc", "system_get_device_type.cc", "system_get_extensions.cc", "system_get_locale_id.cc", diff --git a/starboard/android/shared/configuration_constants.cc b/starboard/android/shared/configuration_constants.cc index 0691cff41d12..4e5d36e34063 100644 --- a/starboard/android/shared/configuration_constants.cc +++ b/starboard/android/shared/configuration_constants.cc @@ -133,10 +133,8 @@ const int kSbPreferredRgbaByteOrder = SB_PREFERRED_RGBA_BYTE_ORDER_RGBA; const uint32_t kSbUserMaxSignedIn = 1; #endif // SB_API_VERSION < 16 -#if SB_API_VERSION >= 14 // The maximum size the cache directory is allowed to use in bytes. const uint32_t kSbMaxSystemPathCacheDirectorySize = 24 << 20; // 24MiB -#endif #if SB_API_VERSION >= 16 // Whether this platform can map executable memory. This is required for diff --git a/starboard/android/shared/system_get_connection_type.cc b/starboard/android/shared/system_get_connection_type.cc deleted file mode 100644 index 7b3d2bf55d42..000000000000 --- a/starboard/android/shared/system_get_connection_type.cc +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2016 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. - -#include "starboard/system.h" - -#if SB_API_VERSION < 14 - -#include "starboard/android/shared/jni_env_ext.h" -#include "starboard/common/log.h" - -using starboard::android::shared::JniEnvExt; - -SbSystemConnectionType SbSystemGetConnectionType() { - JniEnvExt* env = JniEnvExt::Get(); - jboolean isWireless = - env->CallStarboardBooleanMethodOrAbort("isCurrentNetworkWireless", "()Z"); - - if (isWireless) { - return kSbSystemConnectionTypeWireless; - } else { - return kSbSystemConnectionTypeWired; - } -} - -#endif // SB_API_VERSION < 14 diff --git a/starboard/android/shared/system_get_path.cc b/starboard/android/shared/system_get_path.cc index 22d64edb4411..139318d0c7f2 100644 --- a/starboard/android/shared/system_get_path.cc +++ b/starboard/android/shared/system_get_path.cc @@ -135,13 +135,6 @@ bool SbSystemGetPath(SbSystemPathId path_id, char* out_path, int path_size) { break; } -#if SB_API_VERSION < 14 - case kSbSystemPathTestOutputDirectory: { - return SbSystemGetPath(kSbSystemPathDebugOutputDirectory, out_path, - path_size); - } -#endif - // We return the library directory as the "executable" since: // a) Unlike the .so itself, it has a valid timestamp of the app install. // b) Its parent directory is still a directory within our app package. diff --git a/starboard/android/shared/system_get_property.cc b/starboard/android/shared/system_get_property.cc index ea41eb10b1be..3f14106b8362 100644 --- a/starboard/android/shared/system_get_property.cc +++ b/starboard/android/shared/system_get_property.cc @@ -145,7 +145,6 @@ bool SbSystemGetProperty(SbSystemPropertyId property_id, CopyStringAndTestIfSuccess(out_value, value_length, utf_str.c_str()); return success; } -#if SB_API_VERSION >= 14 case kSbSystemPropertyAdvertisingId: { JniEnvExt* env = JniEnvExt::Get(); ScopedLocalJavaRef id_string( @@ -162,7 +161,6 @@ bool SbSystemGetProperty(SbSystemPropertyId property_id, return CopyStringAndTestIfSuccess(out_value, value_length, limit_ad_tracking_enabled ? "1" : "0"); } -#endif #if SB_API_VERSION >= 15 case kSbSystemPropertyDeviceType: return CopyStringAndTestIfSuccess(out_value, value_length, diff --git a/starboard/common/media.cc b/starboard/common/media.cc index acf261dc6ced..94a67f927598 100644 --- a/starboard/common/media.cc +++ b/starboard/common/media.cc @@ -605,14 +605,12 @@ const char* GetMediaAudioCodecName(SbMediaAudioCodec codec) { return "opus"; case kSbMediaAudioCodecVorbis: return "vorbis"; -#if SB_API_VERSION >= 14 case kSbMediaAudioCodecMp3: return "mp3"; case kSbMediaAudioCodecFlac: return "flac"; case kSbMediaAudioCodecPcm: return "pcm"; -#endif // SB_API_VERSION >= 14 #if SB_API_VERSION >= 15 case kSbMediaAudioCodecIamf: return "iamf"; @@ -804,13 +802,8 @@ const char* GetMediaMatrixIdName(SbMediaMatrixId matrix_id) { return "Bt2020ConstantLuminance"; case kSbMediaMatrixIdYDzDx: return "YDzDx"; -#if SB_API_VERSION >= 14 case kSbMediaMatrixIdInvalid: return "Invalid"; -#else // SB_API_VERSION >= 14 - case kSbMediaMatrixIdUnknown: - return "Unknown"; -#endif // SB_API_VERSION >= 14 } SB_NOTREACHED(); return "Invalid"; diff --git a/starboard/configuration.h b/starboard/configuration.h index 736ae904c0e7..9ee67356a65a 100644 --- a/starboard/configuration.h +++ b/starboard/configuration.h @@ -35,7 +35,7 @@ // The minimum API version allowed by this version of the Starboard headers, // inclusive. -#define SB_MINIMUM_API_VERSION 13 +#define SB_MINIMUM_API_VERSION 14 // The maximum API version allowed by this version of the Starboard headers, // inclusive. The API version is not stable and is open for changes. diff --git a/starboard/configuration_constants.h b/starboard/configuration_constants.h index 061208a18a55..8e0fa9922d3f 100644 --- a/starboard/configuration_constants.h +++ b/starboard/configuration_constants.h @@ -148,10 +148,8 @@ SB_EXPORT extern const char* kSbPathSepString; SB_EXPORT extern const uint32_t kSbUserMaxSignedIn; #endif // SB_API_VERSION < 16 -#if SB_API_VERSION >= 14 // The maximum size the cache directory is allowed to use in bytes. SB_EXPORT extern const uint32_t kSbMaxSystemPathCacheDirectorySize; -#endif #if SB_API_VERSION >= 16 // Whether this platform can map executable memory. This is required for diff --git a/starboard/decode_target.h b/starboard/decode_target.h index c120646a7434..c5082673e3f8 100644 --- a/starboard/decode_target.h +++ b/starboard/decode_target.h @@ -96,12 +96,10 @@ typedef enum SbDecodeTargetFormat { // order. Each pixel is stored in 16 bits. kSbDecodeTargetFormat3Plane10BitYUVI420, -#if SB_API_VERSION >= 14 // A decoder target format consisting of 10bit Y, U, and V planes, in that // order. The plane data is stored in a compact format. Every three 10-bit // pixels are packed into 32 bits. kSbDecodeTargetFormat3Plane10BitYUVI420Compact, -#endif // SB_API_VERSION >= 14 // A decoder target format consisting of a single plane with pixels laid out // in the format UYVY. Since there are two Y values per sample, but only one @@ -285,9 +283,7 @@ static inline int SbDecodeTargetNumberOfPlanesForFormat( case kSbDecodeTargetFormat2PlaneYUVNV12: return 2; case kSbDecodeTargetFormat3Plane10BitYUVI420: -#if SB_API_VERSION >= 14 case kSbDecodeTargetFormat3Plane10BitYUVI420Compact: -#endif // SB_API_VERSION >= 14 case kSbDecodeTargetFormat3PlaneYUVI420: return 3; default: diff --git a/starboard/elf_loader/exported_symbols.cc b/starboard/elf_loader/exported_symbols.cc index 929961058887..584fbe7d4cd6 100644 --- a/starboard/elf_loader/exported_symbols.cc +++ b/starboard/elf_loader/exported_symbols.cc @@ -102,9 +102,7 @@ ExportedSymbols::ExportedSymbols() { REGISTER_SYMBOL(kSbHasMediaWebmVp9Support); REGISTER_SYMBOL(kSbHasThreadPrioritySupport); REGISTER_SYMBOL(kSbMallocAlignment); -#if SB_API_VERSION >= 14 REGISTER_SYMBOL(kSbMaxSystemPathCacheDirectorySize); -#endif // SB_API_VERSION >= 14 REGISTER_SYMBOL(kSbMaxThreadLocalKeys); REGISTER_SYMBOL(kSbMaxThreadNameLength); REGISTER_SYMBOL(kSbMaxThreads); @@ -357,9 +355,6 @@ ExportedSymbols::ExportedSymbols() { #endif // SB_API_VERSION < 16 REGISTER_SYMBOL(SbSystemBreakIntoDebugger); REGISTER_SYMBOL(SbSystemClearLastError); -#if SB_API_VERSION < 14 - REGISTER_SYMBOL(SbSystemGetConnectionType); -#endif #if SB_API_VERSION < 15 REGISTER_SYMBOL(SbSystemGetDeviceType); #endif diff --git a/starboard/extension/updater_notification.h b/starboard/extension/updater_notification.h index 8d9521fafca9..737052ca6717 100644 --- a/starboard/extension/updater_notification.h +++ b/starboard/extension/updater_notification.h @@ -31,15 +31,10 @@ typedef enum CobaltExtensionUpdaterNotificationState { kCobaltExtensionUpdaterNotificationStateDownloading = 3, kCobaltExtensionUpdaterNotificationStateDownloaded = 4, kCobaltExtensionUpdaterNotificationStateInstalling = 5, -#if SB_API_VERSION > 13 kCobaltExtensionUpdaterNotificationStateUpdated = 6, kCobaltExtensionUpdaterNotificationStateUpToDate = 7, kCobaltExtensionUpdaterNotificationStateUpdateFailed = 8, -#else - kCobaltExtensionUpdaterNotificationStatekUpdated = 6, - kCobaltExtensionUpdaterNotificationStatekUpToDate = 7, - kCobaltExtensionUpdaterNotificationStatekUpdateFailed = 8, -#endif + } CobaltExtensionUpdaterNotificationState; typedef struct CobaltExtensionUpdaterNotificationApi { diff --git a/starboard/linux/shared/BUILD.gn b/starboard/linux/shared/BUILD.gn index 1e9ea031e2b6..a5896b38ffb8 100644 --- a/starboard/linux/shared/BUILD.gn +++ b/starboard/linux/shared/BUILD.gn @@ -87,7 +87,6 @@ static_library("starboard_platform_sources") { "//starboard/linux/shared/routes.h", "//starboard/linux/shared/soft_mic_platform_service.cc", "//starboard/linux/shared/soft_mic_platform_service.h", - "//starboard/linux/shared/system_get_connection_type.cc", "//starboard/linux/shared/system_get_device_type.cc", "//starboard/linux/shared/system_get_extensions.cc", "//starboard/linux/shared/system_get_path.cc", diff --git a/starboard/linux/shared/configuration_constants.cc b/starboard/linux/shared/configuration_constants.cc index 341512540dad..cb9375421f31 100644 --- a/starboard/linux/shared/configuration_constants.cc +++ b/starboard/linux/shared/configuration_constants.cc @@ -132,10 +132,8 @@ const int kSbPreferredRgbaByteOrder = SB_PREFERRED_RGBA_BYTE_ORDER_RGBA; const uint32_t kSbUserMaxSignedIn = 1; #endif // SB_API_VERSION < 16 -#if SB_API_VERSION >= 14 // The maximum size the cache directory is allowed to use in bytes. const uint32_t kSbMaxSystemPathCacheDirectorySize = 24 << 20; // 24MiB -#endif #if SB_API_VERSION >= 16 SB_EXPORT extern const bool kSbCanMapExecutableMemory = true; diff --git a/starboard/linux/shared/media_is_audio_supported.cc b/starboard/linux/shared/media_is_audio_supported.cc index d857bd5d43f5..c1b03d18d851 100644 --- a/starboard/linux/shared/media_is_audio_supported.cc +++ b/starboard/linux/shared/media_is_audio_supported.cc @@ -45,7 +45,6 @@ bool SbMediaIsAudioSupported(SbMediaAudioCodec audio_codec, if (audio_codec == kSbMediaAudioCodecVorbis) { return bitrate <= kSbMediaMaxAudioBitrateInBitsPerSecond; } -#if SB_API_VERSION >= 14 if (audio_codec == kSbMediaAudioCodecMp3) { return bitrate <= kSbMediaMaxAudioBitrateInBitsPerSecond; } @@ -55,7 +54,6 @@ bool SbMediaIsAudioSupported(SbMediaAudioCodec audio_codec, if (audio_codec == kSbMediaAudioCodecFlac) { return bitrate <= kSbMediaMaxAudioBitrateInBitsPerSecond; } -#endif // SB_API_VERSION >= 14 return false; } diff --git a/starboard/linux/shared/system_get_connection_type.cc b/starboard/linux/shared/system_get_connection_type.cc deleted file mode 100644 index 8042f3d60d0c..000000000000 --- a/starboard/linux/shared/system_get_connection_type.cc +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2016 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. - -#include "starboard/system.h" - -#if SB_API_VERSION < 14 - -#include "starboard/linux/shared/routes.h" - -using starboard::shared::Routes; - -SbSystemConnectionType SbSystemGetConnectionType() { - Routes routes; - - if (!routes.RequestDump()) { - return kSbSystemConnectionTypeUnknown; - } - - // Find the top priority route and return if the corresponding route uses a - // wireless interface. - int priority = INT_MAX; - bool is_wireless = false; - while (auto route = routes.GetNextRoute()) { - if (Routes::IsDefaultRoute(*route)) { - if (route->priority < priority) { - priority = route->priority; - is_wireless = Routes::IsWirelessInterface(*route); - } - } - } - if (priority != INT_MAX) - return is_wireless ? kSbSystemConnectionTypeWireless - : kSbSystemConnectionTypeWired; - return kSbSystemConnectionTypeUnknown; -} - -#endif // SB_API_VERSION < 14 diff --git a/starboard/linux/shared/system_get_extensions.cc b/starboard/linux/shared/system_get_extensions.cc index ede9b7bc987f..454bf3abe3f8 100644 --- a/starboard/linux/shared/system_get_extensions.cc +++ b/starboard/linux/shared/system_get_extensions.cc @@ -87,11 +87,6 @@ const void* SbSystemGetExtension(const char* name) { if (strcmp(name, kStarboardExtensionTimeZoneName) == 0) { return starboard::shared::GetTimeZoneApi(); } -#if SB_API_VERSION < 14 - if (strcmp(name, kStarboardExtensionIfaName) == 0) { - return starboard::shared::GetIfaApi(); - } -#endif // SB_API_VERSION < 14 #if SB_IS(EVERGREEN_COMPATIBLE) if (strcmp(name, kStarboardExtensionLoaderAppMetricsName) == 0) { return starboard::shared::starboard::GetLoaderAppMetricsApi(); diff --git a/starboard/linux/shared/system_get_path.cc b/starboard/linux/shared/system_get_path.cc index 7231e872d124..4d0e125e28f5 100644 --- a/starboard/linux/shared/system_get_path.cc +++ b/starboard/linux/shared/system_get_path.cc @@ -243,12 +243,6 @@ bool SbSystemGetPath(SbSystemPathId path_id, char* out_path, int path_size) { mkdir(path.data(), 0700); break; -#if SB_API_VERSION < 14 - case kSbSystemPathTestOutputDirectory: - return SbSystemGetPath(kSbSystemPathDebugOutputDirectory, out_path, - path_size); -#endif // #if SB_API_VERSION < 14 - case kSbSystemPathExecutableFile: return GetExecutablePath(out_path, path_size); diff --git a/starboard/linux/x64x11/system_get_property_impl.cc b/starboard/linux/x64x11/system_get_property_impl.cc index 18726c28617b..33c7decf2445 100644 --- a/starboard/linux/x64x11/system_get_property_impl.cc +++ b/starboard/linux/x64x11/system_get_property_impl.cc @@ -32,11 +32,18 @@ const char kModelName[] = "ModelName"; const char kPlatformName[] = "X11; Linux x86_64"; const char kSystemIntegratorName[] = "SystemIntegratorName"; -#if SB_API_VERSION >= 14 +#if SB_API_VERSION == 16 +const char kModelYear[] = "2025"; +#endif // SB_API_VERSION == 16 + +#if SB_API_VERSION == 15 +const char kModelYear[] = "2024"; +#endif // SB_API_VERSION == 15 + +#if SB_API_VERSION == 14 const char kModelYear[] = "2023"; -#else -const char kModelYear[] = "2022"; -#endif // SB_API_VERSION +#endif // SB_API_VERSION == 14 + } // namespace // Omit namespace linux due to symbol name conflict. @@ -109,7 +116,6 @@ bool GetSystemProperty(SbSystemPropertyId property_id, case kSbSystemPropertySpeechApiKey: case kSbSystemPropertyUserAgentAuxField: return false; -#if SB_API_VERSION >= 14 // Implementation provided for testing purposes only case kSbSystemPropertyAdvertisingId: return CopyStringAndTestIfSuccess( @@ -119,7 +125,6 @@ bool GetSystemProperty(SbSystemPropertyId property_id, return CopyStringAndTestIfSuccess( out_value, value_length, GetEnvironment("COBALT_LIMIT_AD_TRACKING").c_str()); -#endif #if SB_API_VERSION >= 15 case kSbSystemPropertyDeviceType: return CopyStringAndTestIfSuccess(out_value, value_length, diff --git a/starboard/media.h b/starboard/media.h index ec827b9d788c..997da966e53c 100644 --- a/starboard/media.h +++ b/starboard/media.h @@ -62,11 +62,9 @@ typedef enum SbMediaAudioCodec { kSbMediaAudioCodecEac3, kSbMediaAudioCodecOpus, kSbMediaAudioCodecVorbis, -#if SB_API_VERSION >= 14 kSbMediaAudioCodecMp3, kSbMediaAudioCodecFlac, kSbMediaAudioCodecPcm, -#endif // SB_API_VERSION >= 14 #if SB_API_VERSION >= 15 kSbMediaAudioCodecIamf, #endif // SB_API_VERSION >= 15 @@ -279,14 +277,8 @@ typedef enum SbMediaMatrixId { kSbMediaMatrixIdYDzDx = 11, kSbMediaMatrixIdLastStandardValue = kSbMediaMatrixIdYDzDx, -#if SB_API_VERSION >= 14 kSbMediaMatrixIdInvalid = 255, kSbMediaMatrixIdLast = kSbMediaMatrixIdInvalid, -#else // SB_API_VERSION >= 14 - kSbMediaMatrixIdUnknown = 1000, - kSbMediaMatrixIdLast = kSbMediaMatrixIdUnknown, -#endif // SB_API_VERSION >= 14 - } SbMediaMatrixId; // This corresponds to the WebM Range enum which is part of WebM color data (see @@ -704,12 +696,7 @@ typedef enum SbMediaBufferStorageType { // a larger value may increase the memory consumption of media buffers. // #if SB_API_VERSION < 16 -#if SB_API_VERSION >= 14 SB_EXPORT int SbMediaGetBufferAlignment(); -#else // SB_API_VERSION >= 14 -// |type|: the media type of the stream (audio or video). -SB_EXPORT int SbMediaGetBufferAlignment(SbMediaType type); -#endif // SB_API_VERSION >= 14 #endif // SB_API_VERSION < 16 // When the media stack needs more memory to store media buffers, it will @@ -769,12 +756,7 @@ SB_EXPORT int SbMediaGetMaxBufferCapacity(SbMediaVideoCodec codec, // can be use optimally by specific instructions like SIMD. Set to 0 to remove // any padding. // -#if SB_API_VERSION >= 14 SB_EXPORT int SbMediaGetBufferPadding(); -#else // SB_API_VERSION >= 14 -// |type|: the media type of the stream (audio or video). -SB_EXPORT int SbMediaGetBufferPadding(SbMediaType type); -#endif // SB_API_VERSION >= 14 // When either SbMediaGetInitialBufferCapacity or SbMediaGetBufferAllocationUnit // isn't zero, media buffers will be allocated using a memory pool. Set the diff --git a/starboard/nplb/BUILD.gn b/starboard/nplb/BUILD.gn index de846653d26b..b3724280f8b6 100644 --- a/starboard/nplb/BUILD.gn +++ b/starboard/nplb/BUILD.gn @@ -240,7 +240,6 @@ target(gtest_target_type, "nplb") { "string_format_wide_test.cc", "string_scan_test.cc", "system_clear_last_error_test.cc", - "system_get_connection_type_test.cc", "system_get_error_string_test.cc", "system_get_extension_test.cc", "system_get_last_error_test.cc", diff --git a/starboard/nplb/media_buffer_test.cc b/starboard/nplb/media_buffer_test.cc index 8b485f58555e..934e18099732 100644 --- a/starboard/nplb/media_buffer_test.cc +++ b/starboard/nplb/media_buffer_test.cc @@ -167,13 +167,9 @@ TEST(SbMediaBufferTest, MediaTypes) { #if SB_API_VERSION < 16 TEST(SbMediaBufferTest, Alignment) { for (auto type : kMediaTypes) { -#if SB_API_VERSION >= 14 // The test will be run more than once, it's redundant but allows us to keep // the test logic in one place. int alignment = SbMediaGetBufferAlignment(); -#else // SB_API_VERSION >= 14 - int alignment = SbMediaGetBufferAlignment(type); -#endif // SB_API_VERSION >= 14 #if SB_API_VERSION >= 16 // SbMediaGetBufferAlignment() was deprecated in Starboard 16, its return @@ -210,13 +206,9 @@ TEST(SbMediaBufferTest, AllocationUnit) { #if SB_API_VERSION < 16 if (!HasNonfatalFailure()) { for (SbMediaType type : kMediaTypes) { -#if SB_API_VERSION >= 14 // The test will be run more than once, it's redundant but allows us to // keep the test logic in one place. int alignment = SbMediaGetBufferAlignment(); -#else // SB_API_VERSION >= 14 - int alignment = SbMediaGetBufferAlignment(type); -#endif // SB_API_VERSION >= 14 SB_LOG(INFO) << "alignment=" << alignment; EXPECT_EQ(alignment & (alignment - 1), 0) << "Alignment must always be a power of 2"; @@ -286,16 +278,8 @@ TEST(SbMediaBufferTest, Padding) { // copy of the incoming buffer when necessary. EXPECT_EQ(SbMediaGetBufferPadding(), 0); -#else // SB_API_VERSION >= 16 - -#if SB_API_VERSION >= 14 +#else // SB_API_VERSION >= 16 EXPECT_GE(SbMediaGetBufferPadding(), 0); -#else // SB_API_VERSION >= 14 - for (auto type : kMediaTypes) { - EXPECT_GE(SbMediaGetBufferPadding(type), 0); - } -#endif // SB_API_VERSION >= 14 - #endif // SB_API_VERSION >= 16 } @@ -374,17 +358,10 @@ TEST(SbMediaBufferTest, ValidatePerformance) { TEST_PERF_FUNCNOARGS_DEFAULT(SbMediaIsBufferUsingMemoryPool); #if SB_API_VERSION < 16 -#if SB_API_VERSION >= 14 for (auto type : kMediaTypes) { TEST_PERF_FUNCNOARGS_DEFAULT(SbMediaGetBufferAlignment); TEST_PERF_FUNCNOARGS_DEFAULT(SbMediaGetBufferPadding); } -#else // SB_API_VERSION >= 14 - for (auto type : kMediaTypes) { - TEST_PERF_FUNCWITHARGS_DEFAULT(SbMediaGetBufferAlignment, type); - TEST_PERF_FUNCWITHARGS_DEFAULT(SbMediaGetBufferPadding, type); - } -#endif // SB_API_VERSION >= 14 #endif // SB_API_VERSION < 16 for (auto resolution : kVideoResolutions) { diff --git a/starboard/nplb/nplb_evergreen_compat_tests/sabi_test.cc b/starboard/nplb/nplb_evergreen_compat_tests/sabi_test.cc index aa277e36b9f9..47d1991d0b0c 100644 --- a/starboard/nplb/nplb_evergreen_compat_tests/sabi_test.cc +++ b/starboard/nplb/nplb_evergreen_compat_tests/sabi_test.cc @@ -28,66 +28,6 @@ namespace nplb_evergreen_compat_tests { namespace { -#if SB_API_VERSION == 13 -const char* kSabiJsonIdArmHardfp = - "{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4," - "\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":4," - "\"alignment_pointer\":4,\"alignment_short\":2,\"calling_convention\":" - "\"eabi\",\"endianness\":\"little\",\"floating_point_abi\":\"hard\"," - "\"floating_point_fpu\":\"vfpv3\",\"sb_api_version\":13,\"signedness_of_" - "char\":\"signed\",\"signedness_of_enum\":\"signed\",\"size_of_char\":1," - "\"size_of_double\":8,\"size_of_enum\":4,\"size_of_float\":4,\"size_of_" - "int\":4,\"size_of_llong\":8,\"size_of_long\":4,\"size_of_pointer\":4," - "\"size_of_short\":2,\"target_arch\":\"arm\",\"target_arch_sub\":\"v7a\"," - "\"word_size\":32}"; - -const char* kSabiJsonIdArmSoftfp = - "{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4," - "\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":4," - "\"alignment_pointer\":4,\"alignment_short\":2,\"calling_convention\":" - "\"eabi\",\"endianness\":\"little\",\"floating_point_abi\":\"softfp\"," - "\"floating_point_fpu\":\"vfpv3\",\"sb_api_version\":13,\"signedness_of_" - "char\":\"signed\",\"signedness_of_enum\":\"signed\",\"size_of_char\":1," - "\"size_of_double\":8,\"size_of_enum\":4,\"size_of_float\":4,\"size_of_" - "int\":4,\"size_of_llong\":8,\"size_of_long\":4,\"size_of_pointer\":4," - "\"size_of_short\":2,\"target_arch\":\"arm\",\"target_arch_sub\":\"v7a\"," - "\"word_size\":32}"; - -const char* kSabiJsonIdArm64 = - "{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4," - "\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":8," - "\"alignment_pointer\":8,\"alignment_short\":2,\"calling_convention\":" - "\"aarch64\",\"endianness\":\"little\",\"floating_point_abi\":\"\"," - "\"floating_point_fpu\":\"\",\"sb_api_version\":13,\"signedness_of_char\":" - "\"signed\",\"signedness_of_enum\":\"signed\",\"size_of_char\":1,\"size_of_" - "double\":8,\"size_of_enum\":4,\"size_of_float\":4,\"size_of_int\":4," - "\"size_of_llong\":8,\"size_of_long\":8,\"size_of_pointer\":8,\"size_of_" - "short\":2,\"target_arch\":\"arm64\",\"target_arch_sub\":\"v8a\",\"word_" - "size\":64}"; - -const char* kSabiJsonIdX86 = - "{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4," - "\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":4," - "\"alignment_pointer\":4,\"alignment_short\":2,\"calling_convention\":" - "\"sysv\",\"endianness\":\"little\",\"floating_point_abi\":\"\",\"floating_" - "point_fpu\":\"\",\"sb_api_version\":13,\"signedness_of_char\":\"signed\"," - "\"signedness_of_enum\":\"signed\",\"size_of_char\":1,\"size_of_double\":8," - "\"size_of_enum\":4,\"size_of_float\":4,\"size_of_int\":4,\"size_of_" - "llong\":8,\"size_of_long\":4,\"size_of_pointer\":4,\"size_of_short\":2," - "\"target_arch\":\"x86\",\"target_arch_sub\":\"\",\"word_size\":32}"; - -const char* kSabiJsonIdX64Sysv = - "{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4," - "\"alignment_int\":4,\"alignment_llong\":8,\"alignment_long\":8," - "\"alignment_pointer\":8,\"alignment_short\":2,\"calling_convention\":" - "\"sysv\",\"endianness\":\"little\",\"floating_point_abi\":\"\",\"floating_" - "point_fpu\":\"\",\"sb_api_version\":13,\"signedness_of_char\":\"signed\"," - "\"signedness_of_enum\":\"signed\",\"size_of_char\":1,\"size_of_double\":8," - "\"size_of_enum\":4,\"size_of_float\":4,\"size_of_int\":4,\"size_of_" - "llong\":8,\"size_of_long\":8,\"size_of_pointer\":8,\"size_of_short\":2," - "\"target_arch\":\"x64\",\"target_arch_sub\":\"\",\"word_size\":64}"; -#endif // SB_API_VERSION == 13 - #if SB_API_VERSION == 14 const char* kSabiJsonIdArmHardfp = "{\"alignment_char\":1,\"alignment_double\":8,\"alignment_float\":4," diff --git a/starboard/nplb/player_create_test.cc b/starboard/nplb/player_create_test.cc index 9c9f01722164..5dd8c2567f74 100644 --- a/starboard/nplb/player_create_test.cc +++ b/starboard/nplb/player_create_test.cc @@ -322,23 +322,23 @@ TEST_F(SbPlayerTest, MultiPlayer) { constexpr SbPlayerOutputMode kOutputModes[] = { kSbPlayerOutputModeDecodeToTexture, kSbPlayerOutputModePunchOut}; + // clang-format off constexpr SbMediaAudioCodec kAudioCodecs[] = { - kSbMediaAudioCodecNone, - - kSbMediaAudioCodecAac, - kSbMediaAudioCodecAc3, - kSbMediaAudioCodecEac3, - kSbMediaAudioCodecOpus, - kSbMediaAudioCodecVorbis, -#if SB_API_VERSION >= 14 - kSbMediaAudioCodecMp3, - kSbMediaAudioCodecFlac, - kSbMediaAudioCodecPcm, -#endif // SB_API_VERSION >= 14 + kSbMediaAudioCodecNone, + + kSbMediaAudioCodecAac, + kSbMediaAudioCodecAc3, + kSbMediaAudioCodecEac3, + kSbMediaAudioCodecOpus, + kSbMediaAudioCodecVorbis, + kSbMediaAudioCodecMp3, + kSbMediaAudioCodecFlac, + kSbMediaAudioCodecPcm, #if SB_API_VERSION >= 15 - kSbMediaAudioCodecIamf, + kSbMediaAudioCodecIamf, #endif // SB_API_VERSION >= 15 }; + // clang-format on // TODO: turn this into a macro. // Perform a check to determine if new audio codecs have been added to the @@ -352,24 +352,29 @@ TEST_F(SbPlayerTest, MultiPlayer) { case kAudioCodecs[3]: case kAudioCodecs[4]: case kAudioCodecs[5]: -#if SB_API_VERSION >= 14 case kAudioCodecs[6]: case kAudioCodecs[7]: case kAudioCodecs[8]: -#endif #if SB_API_VERSION >= 15 case kAudioCodecs[9]: #endif // SB_API_VERSION >= 15 break; } + // clang-format off constexpr SbMediaVideoCodec kVideoCodecs[] = { kSbMediaVideoCodecNone, - kSbMediaVideoCodecH264, kSbMediaVideoCodecH265, kSbMediaVideoCodecMpeg2, - kSbMediaVideoCodecTheora, kSbMediaVideoCodecVc1, kSbMediaVideoCodecAv1, - kSbMediaVideoCodecVp8, kSbMediaVideoCodecVp9, + kSbMediaVideoCodecH264, + kSbMediaVideoCodecH265, + kSbMediaVideoCodecMpeg2, + kSbMediaVideoCodecTheora, + kSbMediaVideoCodecVc1, + kSbMediaVideoCodecAv1, + kSbMediaVideoCodecVp8, + kSbMediaVideoCodecVp9, }; + // clang-format on // TODO: turn this into a macro. // Perform a check to determine if new video codecs have been added to the diff --git a/starboard/nplb/player_creation_param_helpers.cc b/starboard/nplb/player_creation_param_helpers.cc index d20a63577d10..a9dfc3c58aba 100644 --- a/starboard/nplb/player_creation_param_helpers.cc +++ b/starboard/nplb/player_creation_param_helpers.cc @@ -74,7 +74,6 @@ AudioStreamInfo CreateAudioStreamInfo(SbMediaAudioCodec codec) { audio_stream_info.bits_per_sample = 16; break; } -#if SB_API_VERSION >= 14 case kSbMediaAudioCodecMp3: { audio_stream_info.number_of_channels = 2; audio_stream_info.samples_per_second = 44100; @@ -93,7 +92,6 @@ AudioStreamInfo CreateAudioStreamInfo(SbMediaAudioCodec codec) { audio_stream_info.bits_per_sample = 32; break; } -#endif // SB_API_VERSION >= 14 #if SB_API_VERSION >= 15 case kSbMediaAudioCodecIamf: { audio_stream_info.number_of_channels = 2; diff --git a/starboard/nplb/player_get_preferred_output_mode_test.cc b/starboard/nplb/player_get_preferred_output_mode_test.cc index 5b9c74567671..69e5be37b511 100644 --- a/starboard/nplb/player_get_preferred_output_mode_test.cc +++ b/starboard/nplb/player_get_preferred_output_mode_test.cc @@ -44,32 +44,39 @@ TEST(SbPlayerGetPreferredOutputModeTest, SunnyDay) { } TEST(SbPlayerGetPreferredOutputModeTest, AllCodecs) { + // clang-format off const SbMediaAudioCodec kAudioCodecs[] = { - kSbMediaAudioCodecNone, - kSbMediaAudioCodecAac, - kSbMediaAudioCodecAc3, - kSbMediaAudioCodecEac3, - kSbMediaAudioCodecOpus, - kSbMediaAudioCodecVorbis, -#if SB_API_VERSION >= 14 - kSbMediaAudioCodecMp3, - kSbMediaAudioCodecFlac, - kSbMediaAudioCodecPcm, -#endif // SB_API_VERSION >= 14 + kSbMediaAudioCodecNone, + + kSbMediaAudioCodecAac, + kSbMediaAudioCodecAc3, + kSbMediaAudioCodecEac3, + kSbMediaAudioCodecOpus, + kSbMediaAudioCodecVorbis, + kSbMediaAudioCodecMp3, + kSbMediaAudioCodecFlac, + kSbMediaAudioCodecPcm, #if SB_API_VERSION >= 15 - kSbMediaAudioCodecIamf, + kSbMediaAudioCodecIamf, #endif // SB_API_VERSION >= 15 }; const SbMediaVideoCodec kVideoCodecs[] = { - kSbMediaVideoCodecNone, kSbMediaVideoCodecH264, kSbMediaVideoCodecH265, - kSbMediaVideoCodecMpeg2, kSbMediaVideoCodecTheora, kSbMediaVideoCodecVc1, - kSbMediaVideoCodecAv1, kSbMediaVideoCodecVp8, kSbMediaVideoCodecVp9, + kSbMediaVideoCodecNone, + kSbMediaVideoCodecH264, + kSbMediaVideoCodecH265, + kSbMediaVideoCodecMpeg2, + kSbMediaVideoCodecTheora, + kSbMediaVideoCodecVc1, + kSbMediaVideoCodecAv1, + kSbMediaVideoCodecVp8, + kSbMediaVideoCodecVp9, }; const SbPlayerOutputMode kOutputModes[] = { kSbPlayerOutputModeDecodeToTexture, kSbPlayerOutputModePunchOut, kSbPlayerOutputModeInvalid, }; + // clang-format on for (SbMediaAudioCodec audio_codec : kAudioCodecs) { for (SbMediaVideoCodec video_codec : kVideoCodecs) { diff --git a/starboard/nplb/player_test_util.cc b/starboard/nplb/player_test_util.cc index 4bcc1385d6a4..0d25eeb20dcf 100644 --- a/starboard/nplb/player_test_util.cc +++ b/starboard/nplb/player_test_util.cc @@ -56,11 +56,9 @@ const char* kAudioOnlyTestFiles[] = { "beneath_the_canopy_opus_5_1.dmp", "beneath_the_canopy_opus_mono.dmp", "heaac.dmp", -#if SB_API_VERSION >= 14 "sintel_5s_flac.dmp", "sintel_5s_mp3.dmp", "sintel_5s_pcm_s16le.dmp", -#endif // SB_API_VERSION >= 14 "sintel_5s_vorbis.dmp", }; diff --git a/starboard/nplb/system_get_connection_type_test.cc b/starboard/nplb/system_get_connection_type_test.cc deleted file mode 100644 index 3677b10081ba..000000000000 --- a/starboard/nplb/system_get_connection_type_test.cc +++ /dev/null @@ -1,48 +0,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. - -// Here we are not trying to do anything fancy, just to really sanity check that -// this is hooked up to something. - -#include "starboard/common/log.h" -#include "starboard/common/string.h" -#include "starboard/system.h" -#include "testing/gtest/include/gtest/gtest.h" - -#if SB_API_VERSION < 14 - -namespace starboard { -namespace nplb { -namespace { - -TEST(SbSystemGetConnectionTypeTest, SunnyDay) { - SbSystemConnectionType type = SbSystemGetConnectionType(); -} - -TEST(SbSystemGetConnectionTypeTest, ConnectionIsKnown) { - SbSystemConnectionType type = SbSystemGetConnectionType(); - EXPECT_NE(type, kSbSystemConnectionTypeUnknown); -} - -TEST(SbSystemGetConnectionTypeTest, ConnectionIsWiredOrWireless) { - SbSystemConnectionType type = SbSystemGetConnectionType(); - EXPECT_TRUE(type == kSbSystemConnectionTypeWired || - type == kSbSystemConnectionTypeWireless); -} - -} // namespace -} // namespace nplb -} // namespace starboard - -#endif // SB_API_VERSION < 14 diff --git a/starboard/nplb/system_get_path_test.cc b/starboard/nplb/system_get_path_test.cc index 99ed0fbc8590..350a2d4c52a3 100644 --- a/starboard/nplb/system_get_path_test.cc +++ b/starboard/nplb/system_get_path_test.cc @@ -107,9 +107,6 @@ TEST(SbSystemGetPathTest, FailsGracefullyBogusId) { TEST(SbSystemGetPathTest, DoesNotBlowUpForDefinedIds) { BasicTest(kSbSystemPathDebugOutputDirectory, false, false, __LINE__); BasicTest(kSbSystemPathTempDirectory, false, false, __LINE__); -#if SB_API_VERSION < 14 - BasicTest(kSbSystemPathTestOutputDirectory, false, false, __LINE__); -#endif // #if SB_API_VERSION < 14 BasicTest(kSbSystemPathCacheDirectory, false, false, __LINE__); BasicTest(kSbSystemPathFontDirectory, false, false, __LINE__); BasicTest(kSbSystemPathFontConfigurationDirectory, false, false, __LINE__); @@ -118,9 +115,6 @@ TEST(SbSystemGetPathTest, DoesNotBlowUpForDefinedIds) { TEST(SbSystemGetPathTest, DoesNotTouchOutputBufferOnFailureForDefinedIds) { UnmodifiedOnFailureTest(kSbSystemPathDebugOutputDirectory, __LINE__); UnmodifiedOnFailureTest(kSbSystemPathTempDirectory, __LINE__); -#if SB_API_VERSION < 14 - UnmodifiedOnFailureTest(kSbSystemPathTestOutputDirectory, __LINE__); -#endif // #if SB_API_VERSION < 14 UnmodifiedOnFailureTest(kSbSystemPathCacheDirectory, __LINE__); UnmodifiedOnFailureTest(kSbSystemPathFontDirectory, __LINE__); UnmodifiedOnFailureTest(kSbSystemPathFontConfigurationDirectory, __LINE__); diff --git a/starboard/raspi/shared/BUILD.gn b/starboard/raspi/shared/BUILD.gn index 8adaea878175..806e81b6642e 100644 --- a/starboard/raspi/shared/BUILD.gn +++ b/starboard/raspi/shared/BUILD.gn @@ -32,7 +32,6 @@ static_library("starboard_platform_sources") { "//starboard/linux/shared/netlink.h", "//starboard/linux/shared/routes.cc", "//starboard/linux/shared/routes.h", - "//starboard/linux/shared/system_get_connection_type.cc", "//starboard/linux/shared/system_get_path.cc", "//starboard/linux/shared/system_has_capability.cc", "//starboard/linux/shared/time_zone.cc", diff --git a/starboard/raspi/shared/configuration_constants.cc b/starboard/raspi/shared/configuration_constants.cc index d1163c476cfd..2be1f49ec158 100644 --- a/starboard/raspi/shared/configuration_constants.cc +++ b/starboard/raspi/shared/configuration_constants.cc @@ -134,10 +134,8 @@ const int kSbPreferredRgbaByteOrder = SB_PREFERRED_RGBA_BYTE_ORDER_RGBA; const uint32_t kSbUserMaxSignedIn = 1; #endif // SB_API_VERSION < 16 -#if SB_API_VERSION >= 14 // The maximum size the cache directory is allowed to use in bytes. const uint32_t kSbMaxSystemPathCacheDirectorySize = 24 << 20; // 24MiB -#endif #if SB_API_VERSION >= 16 // Whether this platform can map executable memory. This is required for diff --git a/starboard/raspi/shared/system_get_property.cc b/starboard/raspi/shared/system_get_property.cc index a315cfc4c163..72cc9cce098f 100644 --- a/starboard/raspi/shared/system_get_property.cc +++ b/starboard/raspi/shared/system_get_property.cc @@ -146,7 +146,6 @@ bool SbSystemGetProperty(SbSystemPropertyId property_id, case kSbSystemPropertySpeechApiKey: return false; -#if SB_API_VERSION >= 14 // Implementation provided for testing purposes only case kSbSystemPropertyAdvertisingId: return CopyStringAndTestIfSuccess( @@ -156,7 +155,6 @@ bool SbSystemGetProperty(SbSystemPropertyId property_id, return CopyStringAndTestIfSuccess( out_value, value_length, starboard::GetEnvironment("COBALT_LIMIT_AD_TRACKING").c_str()); -#endif case kSbSystemPropertyFriendlyName: return CopyStringAndTestIfSuccess(out_value, value_length, kFriendlyName); diff --git a/starboard/shared/ffmpeg/ffmpeg_audio_decoder_impl.cc b/starboard/shared/ffmpeg/ffmpeg_audio_decoder_impl.cc index a5cff77b9634..6a6e27dbdcfc 100644 --- a/starboard/shared/ffmpeg/ffmpeg_audio_decoder_impl.cc +++ b/starboard/shared/ffmpeg/ffmpeg_audio_decoder_impl.cc @@ -60,7 +60,6 @@ AVCodecID GetFfmpegCodecIdByMediaCodec( return AV_CODEC_ID_OPUS; case kSbMediaAudioCodecVorbis: return AV_CODEC_ID_VORBIS; -#if SB_API_VERSION >= 14 case kSbMediaAudioCodecMp3: return AV_CODEC_ID_MP3; case kSbMediaAudioCodecPcm: @@ -81,7 +80,6 @@ AVCodecID GetFfmpegCodecIdByMediaCodec( << " bits per sample was requested)"; return AV_CODEC_ID_NONE; } -#endif // SB_API_VERSION >= 14 default: return AV_CODEC_ID_NONE; } @@ -358,13 +356,10 @@ void AudioDecoderImpl::InitializeCodec() { codec_context_->codec_id = GetFfmpegCodecIdByMediaCodec(audio_stream_info_); // Request_sample_fmt is set by us, but sample_fmt is set by the decoder. if (GetSupportedSampleType() == kSbMediaAudioSampleTypeInt16Deprecated -#if SB_API_VERSION >= 14 // If we request FLT for 16-bit FLAC, FFmpeg will pick S32 as the closest // option. Since the rest of this pipeline doesn't support S32, we should // use S16 as the desired format. - || audio_stream_info_.codec == kSbMediaAudioCodecFlac -#endif // SB_API_VERSION >= 14 - ) { + || audio_stream_info_.codec == kSbMediaAudioCodecFlac) { codec_context_->request_sample_fmt = AV_SAMPLE_FMT_S16; } else { codec_context_->request_sample_fmt = AV_SAMPLE_FMT_FLT; diff --git a/starboard/shared/ffmpeg/ffmpeg_audio_decoder_test.cc b/starboard/shared/ffmpeg/ffmpeg_audio_decoder_test.cc index c009bb46f550..38ad0b63ac3c 100644 --- a/starboard/shared/ffmpeg/ffmpeg_audio_decoder_test.cc +++ b/starboard/shared/ffmpeg/ffmpeg_audio_decoder_test.cc @@ -28,7 +28,6 @@ namespace ffmpeg { namespace { // The codecs tested by these tests were introduced in SB_API_VERSION 14. -#if SB_API_VERSION >= 14 using ::starboard::shared::starboard::media::AudioStreamInfo; using ::testing::NotNull; @@ -76,7 +75,6 @@ TEST_F(FFmpegAudioDecoderTest, SupportsPcmCodecFor16BitAudio) { ASSERT_THAT(decoder, NotNull()); EXPECT_TRUE(decoder->is_valid()); } -#endif // SB_API_VERSION >= 14 } // namespace } // namespace ffmpeg diff --git a/starboard/shared/libjpeg/jpeg_image_decoder.cc b/starboard/shared/libjpeg/jpeg_image_decoder.cc index 326a8c7e6126..b6b8c2bd14c2 100644 --- a/starboard/shared/libjpeg/jpeg_image_decoder.cc +++ b/starboard/shared/libjpeg/jpeg_image_decoder.cc @@ -165,9 +165,7 @@ bool ReadLines(jpeg_decompress_struct* info, case kSbDecodeTargetFormat2PlaneYUVNV12: case kSbDecodeTargetFormat3PlaneYUVI420: case kSbDecodeTargetFormat3Plane10BitYUVI420: -#if SB_API_VERSION >= 14 case kSbDecodeTargetFormat3Plane10BitYUVI420Compact: -#endif // SB_API_VERSION >= 14 case kSbDecodeTargetFormat1PlaneUYVY: case kSbDecodeTargetFormatInvalid: SB_NOTREACHED(); diff --git a/starboard/shared/starboard/media/codec_util.cc b/starboard/shared/starboard/media/codec_util.cc index 3df61bb0ae42..c34a1084d262 100644 --- a/starboard/shared/starboard/media/codec_util.cc +++ b/starboard/shared/starboard/media/codec_util.cc @@ -96,7 +96,6 @@ SbMediaAudioCodec GetAudioCodecFromString(const char* codec, if (strcmp(codec, "vorbis") == 0) { return kSbMediaAudioCodecVorbis; } -#if SB_API_VERSION >= 14 if (strcmp(codec, "mp3") == 0 || strcmp(codec, "mp4a.69") == 0 || strcmp(codec, "mp4a.6B") == 0) { return kSbMediaAudioCodecMp3; @@ -111,7 +110,6 @@ SbMediaAudioCodec GetAudioCodecFromString(const char* codec, if (is_wav && strcmp(codec, "1") == 0) { return kSbMediaAudioCodecPcm; } -#endif // SB_API_VERSION >= 14 #if SB_API_VERSION >= 15 if (strcmp(codec, "iamf") == 0 || strncmp(codec, "iamf.", 5) == 0) { return kSbMediaAudioCodecIamf; diff --git a/starboard/shared/starboard/media/codec_util_test.cc b/starboard/shared/starboard/media/codec_util_test.cc index a57d7693f533..0bdc602e18a9 100644 --- a/starboard/shared/starboard/media/codec_util_test.cc +++ b/starboard/shared/starboard/media/codec_util_test.cc @@ -244,7 +244,6 @@ TEST(CodecUtilTest, ParsesVorbisCodec) { EXPECT_EQ(GetAudioCodecFromString("vorbis", ""), kSbMediaAudioCodecVorbis); } -#if SB_API_VERSION >= 14 TEST(CodecUtilTest, ParsesMp3Codecs) { EXPECT_EQ(GetAudioCodecFromString("mp3", ""), kSbMediaAudioCodecMp3); EXPECT_EQ(GetAudioCodecFromString("mp4a.69", ""), kSbMediaAudioCodecMp3); @@ -267,7 +266,6 @@ TEST(CodecUtilTest, DoesNotParse1AsPcmForNonWavSubtypes) { EXPECT_EQ(GetAudioCodecFromString("1", "mpeg"), kSbMediaAudioCodecNone); EXPECT_EQ(GetAudioCodecFromString("1", "webm"), kSbMediaAudioCodecNone); } -#endif // SB_API_VERSION >= 14 } // namespace } // namespace media diff --git a/starboard/shared/starboard/media/media_get_buffer_alignment.cc b/starboard/shared/starboard/media/media_get_buffer_alignment.cc index 856c4cdb8599..559a8b4e1bd5 100644 --- a/starboard/shared/starboard/media/media_get_buffer_alignment.cc +++ b/starboard/shared/starboard/media/media_get_buffer_alignment.cc @@ -15,11 +15,7 @@ #include "starboard/media.h" #if SB_API_VERSION < 16 -#if SB_API_VERSION >= 14 int SbMediaGetBufferAlignment() { -#else // SB_API_VERSION >= 14 -int SbMediaGetBufferAlignment(SbMediaType type) { -#endif // SB_API_VERSION >= 14 return 1; } #endif // SB_API_VERSION < 16 diff --git a/starboard/shared/starboard/media/media_get_buffer_padding.cc b/starboard/shared/starboard/media/media_get_buffer_padding.cc index 71d0d0effe09..b07796fe8a86 100644 --- a/starboard/shared/starboard/media/media_get_buffer_padding.cc +++ b/starboard/shared/starboard/media/media_get_buffer_padding.cc @@ -14,10 +14,6 @@ #include "starboard/media.h" -#if SB_API_VERSION >= 14 int SbMediaGetBufferPadding() { -#else // SB_API_VERSION >= 14 -int SbMediaGetBufferPadding(SbMediaType type) { -#endif // SB_API_VERSION >= 14 return 0; } diff --git a/starboard/shared/starboard/media/mime_util.cc b/starboard/shared/starboard/media/mime_util.cc index 52650f83d472..23f83dd7bcff 100644 --- a/starboard/shared/starboard/media/mime_util.cc +++ b/starboard/shared/starboard/media/mime_util.cc @@ -96,7 +96,6 @@ bool IsSupportedAudioCodec(const ParsedMimeInfo& mime_info) { return false; } break; -#if SB_API_VERSION >= 14 case kSbMediaAudioCodecMp3: if (mime_type.subtype() != "mpeg" && mime_type.subtype() != "mp3") { return false; @@ -112,7 +111,6 @@ bool IsSupportedAudioCodec(const ParsedMimeInfo& mime_info) { return false; } break; -#endif // SB_API_VERSION >= 14 #if SB_API_VERSION >= 15 case kSbMediaAudioCodecIamf: if (mime_type.subtype() != "mp4") { diff --git a/starboard/shared/starboard/media/mime_util_test.cc b/starboard/shared/starboard/media/mime_util_test.cc index 14784e60406e..8cfcb6495b14 100644 --- a/starboard/shared/starboard/media/mime_util_test.cc +++ b/starboard/shared/starboard/media/mime_util_test.cc @@ -26,7 +26,6 @@ namespace media { namespace { // The codecs tested by these tests were introduced in SB_API_VERSION 14. -#if SB_API_VERSION >= 14 constexpr char kEmptyKeySystem[] = ""; constexpr int64_t kBitrate = 44100; @@ -113,7 +112,6 @@ TEST(MimeUtilTest, ChecksUnsupportedWavCodecs) { CanPlayMimeAndKeySystem(invalid_wav_mime_str.c_str(), kEmptyKeySystem), kSbMediaSupportTypeNotSupported); } -#endif // SB_API_VERSION >= 14 } // namespace } // namespace media diff --git a/starboard/shared/starboard/media/parsed_mime_info_test.cc b/starboard/shared/starboard/media/parsed_mime_info_test.cc index 94c1f7b8ff19..4951fc299d5e 100644 --- a/starboard/shared/starboard/media/parsed_mime_info_test.cc +++ b/starboard/shared/starboard/media/parsed_mime_info_test.cc @@ -71,7 +71,6 @@ TEST(ParsedMimeInfoTest, ParsesVorbisCodec) { EXPECT_EQ(mime_info.audio_info().codec, kSbMediaAudioCodecVorbis); } -#if SB_API_VERSION >= 14 TEST(ParsedMimeInfoTest, ParsesMp3Codec) { ParsedMimeInfo mime_info("audio/mpeg; codecs=\"mp3\""); ASSERT_TRUE(mime_info.has_audio_info()); @@ -89,7 +88,6 @@ TEST(ParsedMimeInfoTest, ParsesPcmCodec) { ASSERT_TRUE(mime_info.has_audio_info()); EXPECT_EQ(mime_info.audio_info().codec, kSbMediaAudioCodecPcm); } -#endif // SB_API_VERSION >= 14 } // namespace } // namespace media diff --git a/starboard/shared/starboard/player/video_dmp_reader.cc b/starboard/shared/starboard/player/video_dmp_reader.cc index e630ec22c9be..807fcf4c8a30 100644 --- a/starboard/shared/starboard/player/video_dmp_reader.cc +++ b/starboard/shared/starboard/player/video_dmp_reader.cc @@ -153,7 +153,6 @@ std::string VideoDmpReader::audio_mime_type() const { case kSbMediaAudioCodecVorbis: ss << "audio/webm; codecs=\"vorbis\";"; break; -#if SB_API_VERSION >= 14 case kSbMediaAudioCodecMp3: ss << "audio/mpeg; codecs=\"mp3\";"; break; @@ -163,7 +162,6 @@ std::string VideoDmpReader::audio_mime_type() const { case kSbMediaAudioCodecPcm: ss << "audio/wav; codecs=\"1\";"; break; -#endif // SB_API_VERSION >= 14 default: SB_NOTREACHED() << "Unsupported audio codec: " << dmp_info_.audio_codec; } diff --git a/starboard/shared/starboard/queue_application.h b/starboard/shared/starboard/queue_application.h index c32237cca49b..8f039d9b7adb 100644 --- a/starboard/shared/starboard/queue_application.h +++ b/starboard/shared/starboard/queue_application.h @@ -82,11 +82,9 @@ class QueueApplication : public Application { virtual void WakeSystemEventWait() = 0; private: -#if SB_API_VERSION >= 14 // Use Inject() or InjectAndProcess(). DispatchAndDelete() ignores the event // queue and processes the event out of order which can lead to bugs. using Application::DispatchAndDelete; -#endif // Specialization of Queue for starboard events. It differs in that it has // the responsibility of deleting heap allocated starboard events in its diff --git a/starboard/shared/stub/media_get_buffer_alignment.cc b/starboard/shared/stub/media_get_buffer_alignment.cc index 7439e7458d40..95a746cdacb6 100644 --- a/starboard/shared/stub/media_get_buffer_alignment.cc +++ b/starboard/shared/stub/media_get_buffer_alignment.cc @@ -15,11 +15,7 @@ #include "starboard/media.h" #if SB_API_VERSION < 16 -#if SB_API_VERSION >= 14 int SbMediaGetBufferAlignment() { -#else // SB_API_VERSION >= 14 -int SbMediaGetBufferAlignment(SbMediaType type) { -#endif // SB_API_VERSION >= 14 return 0; } #endif // SB_API_VERSION < 16 diff --git a/starboard/shared/stub/media_get_buffer_padding.cc b/starboard/shared/stub/media_get_buffer_padding.cc index 71d0d0effe09..b07796fe8a86 100644 --- a/starboard/shared/stub/media_get_buffer_padding.cc +++ b/starboard/shared/stub/media_get_buffer_padding.cc @@ -14,10 +14,6 @@ #include "starboard/media.h" -#if SB_API_VERSION >= 14 int SbMediaGetBufferPadding() { -#else // SB_API_VERSION >= 14 -int SbMediaGetBufferPadding(SbMediaType type) { -#endif // SB_API_VERSION >= 14 return 0; } diff --git a/starboard/shared/stub/system_get_connection_type.cc b/starboard/shared/stub/system_get_connection_type.cc deleted file mode 100644 index 49de2c4323ad..000000000000 --- a/starboard/shared/stub/system_get_connection_type.cc +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2016 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. - -#include "starboard/system.h" - -#if SB_API_VERSION < 14 - -SbSystemConnectionType SbSystemGetConnectionType() { - return kSbSystemConnectionTypeUnknown; -} - -#endif // SB_API_VERSION < 14 diff --git a/starboard/shared/uwp/media_is_video_supported.cc b/starboard/shared/uwp/media_is_video_supported.cc index e19e13997db4..3654764ad6e6 100644 --- a/starboard/shared/uwp/media_is_video_supported.cc +++ b/starboard/shared/uwp/media_is_video_supported.cc @@ -213,15 +213,6 @@ class XboxVideoCapabilities { return is_supported; } -#if SB_API_VERSION < 14 - // AV1 decoder only supports YUVI420 compact texture format. The new format - // is only supported after - // 14. - if (codec == kSbMediaVideoCodecAv1) { - return false; - } -#endif // SB_API_VERSION >= 14 - is_supported &= ApplicationUwp::Get()->IsHdrSupported(); is_supported &= bit_depth == 10; is_supported &= primary_id == kSbMediaPrimaryIdBt2020; diff --git a/starboard/shared/uwp/system_get_property.cc b/starboard/shared/uwp/system_get_property.cc index 09252d92bac6..53baad1ed69f 100644 --- a/starboard/shared/uwp/system_get_property.cc +++ b/starboard/shared/uwp/system_get_property.cc @@ -326,7 +326,6 @@ bool SbSystemGetProperty(SbSystemPropertyId property_id, return true; case kSbSystemPropertyUserAgentAuxField: return GetAppXVersion(out_value, value_length); -#if SB_API_VERSION >= 14 case kSbSystemPropertyAdvertisingId: { std::string advertising_id = GetAdvertisingId(); return CopyStringAndTestIfSuccess(out_value, value_length, @@ -338,7 +337,6 @@ bool SbSystemGetProperty(SbSystemPropertyId property_id, return CopyStringAndTestIfSuccess(out_value, value_length, advertising_id.empty() ? "1" : "0"); } -#endif // SB_API_VERSION >= 14 #if SB_API_VERSION >= 15 case kSbSystemPropertyDeviceType: return GetDeviceType(out_value, value_length); diff --git a/starboard/shared/win32/system_get_property.cc b/starboard/shared/win32/system_get_property.cc index d37f722f9524..76eb1f05fcb9 100644 --- a/starboard/shared/win32/system_get_property.cc +++ b/starboard/shared/win32/system_get_property.cc @@ -57,7 +57,6 @@ bool SbSystemGetProperty(SbSystemPropertyId property_id, case kSbSystemPropertyPlatformName: return CopyStringAndTestIfSuccess(out_value, value_length, kPlatformName); -#if SB_API_VERSION >= 14 // Implementation provided for testing purposes only case kSbSystemPropertyAdvertisingId: return CopyStringAndTestIfSuccess( @@ -67,7 +66,6 @@ bool SbSystemGetProperty(SbSystemPropertyId property_id, return CopyStringAndTestIfSuccess( out_value, value_length, starboard::GetEnvironment("COBALT_LIMIT_AD_TRACKING").c_str()); -#endif #if SB_API_VERSION >= 15 case kSbSystemPropertyDeviceType: diff --git a/starboard/stub/BUILD.gn b/starboard/stub/BUILD.gn index ff82fc64d962..7f053ab5b2f3 100644 --- a/starboard/stub/BUILD.gn +++ b/starboard/stub/BUILD.gn @@ -200,7 +200,6 @@ static_library("stub_sources") { "//starboard/shared/stub/system_break_into_debugger.cc", "//starboard/shared/stub/system_clear_last_error.cc", "//starboard/shared/stub/system_egl.cc", - "//starboard/shared/stub/system_get_connection_type.cc", "//starboard/shared/stub/system_get_device_type.cc", "//starboard/shared/stub/system_get_error_string.cc", "//starboard/shared/stub/system_get_last_error.cc", diff --git a/starboard/stub/configuration_constants.cc b/starboard/stub/configuration_constants.cc index 7b4a5cd4fec4..5b7d7991350b 100644 --- a/starboard/stub/configuration_constants.cc +++ b/starboard/stub/configuration_constants.cc @@ -131,10 +131,8 @@ const int kSbPreferredRgbaByteOrder = SB_PREFERRED_RGBA_BYTE_ORDER_RGBA; const uint32_t kSbUserMaxSignedIn = 1; #endif // SB_API_VERSION < 16 -#if SB_API_VERSION >= 14 // The maximum size the cache directory is allowed to use in bytes. const uint32_t kSbMaxSystemPathCacheDirectorySize = 24 << 20; // 24MiB -#endif #if SB_API_VERSION >= 16 // Whether this platform can map executable memory. This is required for diff --git a/starboard/system.h b/starboard/system.h index b87b5a30b19e..ba1bfb38759f 100644 --- a/starboard/system.h +++ b/starboard/system.h @@ -58,11 +58,6 @@ typedef enum SbSystemPathId { // Path to a directory where temporary files can be written. kSbSystemPathTempDirectory, -#if SB_API_VERSION < 14 - // Path to a directory where test results can be written. - kSbSystemPathTestOutputDirectory, -#endif // #if SB_API_VERSION < 14 - // Full path to the executable file. kSbSystemPathExecutableFile, @@ -121,7 +116,6 @@ typedef enum SbSystemPropertyId { // A field that, if available, is appended to the user agent kSbSystemPropertyUserAgentAuxField, -#if SB_API_VERSION >= 14 // Advertising ID or IFA, typically a 128-bit UUID // Please see https://iabtechlab.com/OTT-IFA for details. // Corresponds to 'ifa' field. Note: `ifa_type` field is not provided. @@ -130,7 +124,6 @@ typedef enum SbSystemPropertyId { // Limit advertising tracking, treated as boolean. Set to nonzero to indicate // a true value. Corresponds to 'lmt' field. kSbSystemPropertyLimitAdTracking, -#endif #if SB_API_VERSION >= 15 // Type of the device, e.g. such as "TV", "STB", "OTT" @@ -166,30 +159,14 @@ typedef enum SbSystemDeviceType { // An Android TV Device. kSbSystemDeviceTypeAndroidTV, -#if SB_API_VERSION >= 14 // A wall video projector. kSbSystemDeviceTypeVideoProjector, -#endif // SB_API_VERSION >= 14 // Unknown device. kSbSystemDeviceTypeUnknown, } SbSystemDeviceType; #endif // SB_API_VERSION < 15 -#if SB_API_VERSION < 14 -// Enumeration of network connection types. -typedef enum SbSystemConnectionType { - // The system is on a wired connection. - kSbSystemConnectionTypeWired, - - // The system is on a wireless connection. - kSbSystemConnectionTypeWireless, - - // The system connection type is unknown. - kSbSystemConnectionTypeUnknown, -} SbSystemConnectionType; -#endif // SB_API_VERSION < 14 - // Runtime capabilities are boolean properties of a platform that can't be // determined at compile-time. They may vary from device to device, but they // will not change over the course of a single execution. They often specify @@ -312,11 +289,6 @@ SB_EXPORT int64_t SbSystemGetUsedGPUMemory(); SB_EXPORT SbSystemDeviceType SbSystemGetDeviceType(); #endif -#if SB_API_VERSION < 14 -// Returns the device's current network connection type. -SB_EXPORT SbSystemConnectionType SbSystemGetConnectionType(); -#endif // SB_API_VERSION < 14 - // Returns if the device is disconnected from network. "Disconnected" is chosen // over connected because disconnection can be determined with more certainty // than connection usually. diff --git a/starboard/win/shared/configuration_constants.cc b/starboard/win/shared/configuration_constants.cc index 8486d3b96f0d..4cb3f8f235fc 100644 --- a/starboard/win/shared/configuration_constants.cc +++ b/starboard/win/shared/configuration_constants.cc @@ -140,10 +140,8 @@ const int kSbPreferredRgbaByteOrder = SB_PREFERRED_RGBA_BYTE_ORDER_RGBA; const uint32_t kSbUserMaxSignedIn = 1; #endif // SB_API_VERSION < 16 -#if SB_API_VERSION >= 14 // The maximum size the cache directory is allowed to use in bytes. const uint32_t kSbMaxSystemPathCacheDirectorySize = 24 << 20; // 24MiB -#endif #if SB_API_VERSION >= 16 // Whether this platform can map executable memory. This is required for diff --git a/starboard/xb1/shared/configuration_constants.cc b/starboard/xb1/shared/configuration_constants.cc index 6a15e19925ca..6294dca654b4 100644 --- a/starboard/xb1/shared/configuration_constants.cc +++ b/starboard/xb1/shared/configuration_constants.cc @@ -137,10 +137,8 @@ const int kSbPreferredRgbaByteOrder = SB_PREFERRED_RGBA_BYTE_ORDER_RGBA; const uint32_t kSbUserMaxSignedIn = 1; #endif // SB_API_VERSION < 16 -#if SB_API_VERSION >= 14 // The maximum size the cache directory is allowed to use in bytes. const uint32_t kSbMaxSystemPathCacheDirectorySize = 24 << 20; // 24MiB -#endif #if SB_API_VERSION >= 16 // Whether this platform can map executable memory. This is required for diff --git a/starboard/xb1/shared/gpu_base_video_decoder.cc b/starboard/xb1/shared/gpu_base_video_decoder.cc index 09cf12cd9bd6..2bd7e17d254f 100644 --- a/starboard/xb1/shared/gpu_base_video_decoder.cc +++ b/starboard/xb1/shared/gpu_base_video_decoder.cc @@ -142,14 +142,9 @@ class GpuVideoDecoderBase::GPUDecodeTargetPrivate info.format = kSbDecodeTargetFormat3PlaneYUVI420; } else { SB_DCHECK(image->bit_depth() == 10); -#if SB_API_VERSION >= 14 info.format = image->is_compacted() ? kSbDecodeTargetFormat3Plane10BitYUVI420Compact : kSbDecodeTargetFormat3Plane10BitYUVI420; -#else // SB_API_VERSION >= 14 - SB_DCHECK(!image->is_compacted()); - info.format = kSbDecodeTargetFormat3Plane10BitYUVI420; -#endif // SB_API_VERSION >= 14 } info.is_opaque = true; info.width = image->width();