Skip to content

Commit

Permalink
Remove SB14 references (#3897)
Browse files Browse the repository at this point in the history
b/355449840
  • Loading branch information
madhurajayaraman authored Aug 8, 2024
1 parent 7a23f54 commit f8e4ec7
Show file tree
Hide file tree
Showing 33 changed files with 0 additions and 370 deletions.
6 changes: 0 additions & 6 deletions cobalt/media/base/sbplayer_pipeline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,6 @@ SbPlayerPipeline::SbPlayerPipeline(
if (force_punch_out_by_default) {
default_output_mode_ = kSbPlayerOutputModePunchOut;
}
#if SB_API_VERSION < 15
SbMediaSetAudioWriteDuration(audio_write_duration_.InMicroseconds());
LOG(INFO) << "Setting audio write duration to " << audio_write_duration_
<< ", the duration during preroll is "
<< audio_write_duration_for_preroll_;
#endif // SB_API_VERSION < 15
}

SbPlayerPipeline::~SbPlayerPipeline() { DCHECK(!player_bridge_); }
Expand Down
14 changes: 0 additions & 14 deletions media/base/starboard_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,8 @@ SbMediaAudioCodec MediaAudioCodecToSbMediaAudioCodec(AudioCodec codec) {
case AudioCodec::kAAC:
return kSbMediaAudioCodecAac;
case AudioCodec::kAC3:
#if SB_API_VERSION < 15
if (!kSbHasAc3Audio) {
DLOG(ERROR) << "Audio codec AC3 not enabled on this platform. To "
<< "enable it, set kSbHasAc3Audio to |true|.";
return kSbMediaAudioCodecNone;
}
#endif // SB_API_VERSION < 15
return kSbMediaAudioCodecAc3;
case AudioCodec::kEAC3:
#if SB_API_VERSION < 15
if (!kSbHasAc3Audio) {
DLOG(ERROR) << "Audio codec AC3 not enabled on this platform. To "
<< "enable it, set kSbHasAc3Audio to |true|.";
return kSbMediaAudioCodecNone;
}
#endif // SB_API_VERSION < 15
return kSbMediaAudioCodecEac3;
case AudioCodec::kVorbis:
return kSbMediaAudioCodecVorbis;
Expand Down
2 changes: 0 additions & 2 deletions starboard/android/shared/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ static_library("starboard_platform") {
"//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/system_get_random_data.cc",
"//starboard/shared/linux/system_get_total_cpu_memory.cc",
"//starboard/shared/linux/system_get_used_cpu_memory.cc",
Expand Down Expand Up @@ -253,7 +252,6 @@ static_library("starboard_platform") {
"//starboard/shared/starboard/window_set_default_options.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/system_get_total_gpu_memory.cc",
"//starboard/shared/stub/system_get_used_gpu_memory.cc",
"//starboard/shared/stub/system_hide_splash_screen.cc",
Expand Down
5 changes: 0 additions & 5 deletions starboard/android/shared/configuration_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ const char kSbFileSepChar = '/';
// The string form of SB_FILE_SEP_CHAR.
const char* kSbFileSepString = "/";

#if SB_API_VERSION < 15
// Allow ac3 and ec3 support
const bool kSbHasAc3Audio = true;
#endif

// Specifies whether this platform has webm/vp9 support. This should be set to
// non-zero on platforms with webm/vp9 support.
const bool kSbHasMediaWebmVp9Support = true;
Expand Down
14 changes: 0 additions & 14 deletions starboard/common/media.cc
Original file line number Diff line number Diff line change
Expand Up @@ -584,22 +584,8 @@ const char* GetMediaAudioCodecName(SbMediaAudioCodec codec) {
case kSbMediaAudioCodecAac:
return "aac";
case kSbMediaAudioCodecAc3:
#if SB_API_VERSION < 15
if (!kSbHasAc3Audio) {
SB_NOTREACHED() << "AC3 audio is not enabled on this platform. To "
<< "enable it, set kSbHasAc3Audio to |true|.";
return "invalid";
}
#endif // SB_API_VERSION < 15
return "ac3";
case kSbMediaAudioCodecEac3:
#if SB_API_VERSION < 15
if (!kSbHasAc3Audio) {
SB_NOTREACHED() << "AC3 audio is not enabled on this platform. To "
<< "enable it, set kSbHasAc3Audio to |true|.";
return "invalid";
}
#endif // SB_API_VERSION < 15
return "ec3";
case kSbMediaAudioCodecOpus:
return "opus";
Expand Down
5 changes: 0 additions & 5 deletions starboard/configuration_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ SB_EXPORT extern const char kSbFileSepChar;
// The string form of SB_FILE_SEP_CHAR.
SB_EXPORT extern const char* kSbFileSepString;

#if SB_API_VERSION < 15
// Allow ac3 and ec3 support
SB_EXPORT extern const bool kSbHasAc3Audio;
#endif

// Specifies whether this platform has webm/vp9 support. This should be set to
// non-zero on platforms with webm/vp9 support.
SB_EXPORT extern const bool kSbHasMediaWebmVp9Support;
Expand Down
21 changes: 0 additions & 21 deletions starboard/elf_loader/exported_symbols.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#endif // SB_API_VERSION < 16
#include "starboard/log.h"
#include "starboard/memory.h"
#include "starboard/memory_reporter.h"
#include "starboard/microphone.h"
#include "starboard/mutex.h"
#include "starboard/player.h"
Expand Down Expand Up @@ -97,9 +96,6 @@ ExportedSymbols::ExportedSymbols() {
REGISTER_SYMBOL(kSbFileMaxPath);
REGISTER_SYMBOL(kSbFileSepChar);
REGISTER_SYMBOL(kSbFileSepString);
#if SB_API_VERSION < 15
REGISTER_SYMBOL(kSbHasAc3Audio);
#endif // SB_API_VERSION < 15
REGISTER_SYMBOL(kSbHasMediaWebmVp9Support);
REGISTER_SYMBOL(kSbHasThreadPrioritySupport);
REGISTER_SYMBOL(kSbMallocAlignment);
Expand Down Expand Up @@ -227,9 +223,6 @@ ExportedSymbols::ExportedSymbols() {
REGISTER_SYMBOL(SbMediaGetVideoBufferBudget);
REGISTER_SYMBOL(SbMediaIsBufferPoolAllocateOnDemand);
REGISTER_SYMBOL(SbMediaIsBufferUsingMemoryPool);
#if SB_API_VERSION < 15
REGISTER_SYMBOL(SbMediaSetAudioWriteDuration);
#endif // SB_API_VERSION < 15
#if SB_API_VERSION < 16
REGISTER_SYMBOL(SbMemoryAllocate);
REGISTER_SYMBOL(SbMemoryAllocateAligned);
Expand All @@ -244,24 +237,10 @@ ExportedSymbols::ExportedSymbols() {
#endif // SB_CAN(MAP_EXECUTABLE_MEMORY)
REGISTER_SYMBOL(SbMemoryFree);
REGISTER_SYMBOL(SbMemoryFreeAligned);
#endif // SB_API_VERSION < 16

#if SB_API_VERSION < 15
REGISTER_SYMBOL(SbMemoryGetStackBounds);
#endif

#if SB_API_VERSION < 16
REGISTER_SYMBOL(SbMemoryMap);
REGISTER_SYMBOL(SbMemoryProtect);
REGISTER_SYMBOL(SbMemoryReallocate);
REGISTER_SYMBOL(SbMemoryReallocateUnchecked);
#endif // SB_API_VERSION < 16

#if SB_API_VERSION < 15
REGISTER_SYMBOL(SbMemorySetReporter);
#endif

#if SB_API_VERSION < 16
REGISTER_SYMBOL(SbMemoryUnmap);
#endif // SB_API_VERSION < 16

Expand Down
2 changes: 0 additions & 2 deletions starboard/linux/shared/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ static_library("starboard_platform_sources") {
"//starboard/shared/linux/dev_input/dev_input.cc",
"//starboard/shared/linux/dev_input/dev_input.h",
"//starboard/shared/linux/get_home_directory.cc",
"//starboard/shared/linux/memory_get_stack_bounds.cc",
"//starboard/shared/linux/socket_get_interface_address.cc",
"//starboard/shared/linux/system_get_random_data.cc",
"//starboard/shared/linux/system_get_stack.cc",
Expand Down Expand Up @@ -336,7 +335,6 @@ static_library("starboard_platform_sources") {
"//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/media_set_audio_write_duration.cc",
"//starboard/shared/stub/microphone_close.cc",
"//starboard/shared/stub/microphone_create.cc",
"//starboard/shared/stub/microphone_destroy.cc",
Expand Down
5 changes: 0 additions & 5 deletions starboard/linux/shared/configuration_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ const char kSbFileSepChar = '/';
// The string form of SB_FILE_SEP_CHAR.
const char* kSbFileSepString = "/";

#if SB_API_VERSION < 15
// Allow ac3 and ec3 support
const bool kSbHasAc3Audio = true;
#endif

// Specifies whether this platform has webm/vp9 support. This should be set to
// non-zero on platforms with webm/vp9 support.
const bool kSbHasMediaWebmVp9Support = false;
Expand Down
5 changes: 0 additions & 5 deletions starboard/linux/shared/media_is_audio_supported.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ bool SbMediaIsAudioSupported(SbMediaAudioCodec audio_codec,

if (audio_codec == kSbMediaAudioCodecAc3 ||
audio_codec == kSbMediaAudioCodecEac3) {
#if SB_API_VERSION < 15
if (!kSbHasAc3Audio) {
return false;
}
#endif // SB_API_VERSION < 15
return bitrate <= kSbMediaMaxAudioBitrateInBitsPerSecond;
}

Expand Down
13 changes: 0 additions & 13 deletions starboard/media.h
Original file line number Diff line number Diff line change
Expand Up @@ -725,19 +725,6 @@ SB_EXPORT int SbMediaGetVideoBufferBudget(SbMediaVideoCodec codec,
int resolution_height,
int bits_per_pixel);

// Communicate to the platform how far past |current_playback_position| the app
// will write audio samples. The app will write all samples between
// |current_playback_position| and |current_playback_position| + |duration|, as
// soon as they are available (during is in microseconds). The app may sometimes
// write more samples than that, but the app only guarantees to write |duration|
// past |current_playback_position| in general. The platform is responsible for
// guaranteeing that when only |duration| audio samples are written at a time,
// no playback issues occur (such as transient or indefinite hanging). The
// platform may assume |duration| >= 0.5 seconds.
#if SB_API_VERSION < 15
SB_EXPORT void SbMediaSetAudioWriteDuration(int64_t duration);
#endif // SB_API_VERSION < 15

#ifdef __cplusplus
} // extern "C"
#endif
Expand Down
10 changes: 0 additions & 10 deletions starboard/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,6 @@ SB_EXPORT void SbMemoryFlush(void* virtual_address, int64_t size_bytes);
#endif
#endif // SB_API_VERSION < 16

#if SB_API_VERSION < 15

// Gets the stack bounds for the current thread.
//
// |out_high|: The highest addressable byte + 1 for the current thread.
// |out_low|: The lowest addressable byte for the current thread.
SB_EXPORT void SbMemoryGetStackBounds(void** out_high, void** out_low);

#endif // SB_API_VERSION < 15

#if SB_API_VERSION < 16
// A wrapper that implements a drop-in replacement for |calloc|, which is used
// in some packages.
Expand Down
113 changes: 0 additions & 113 deletions starboard/memory_reporter.h

This file was deleted.

1 change: 0 additions & 1 deletion starboard/nplb/extern_c_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ extern "C" {
#include "starboard/log.h"
#include "starboard/media.h"
#include "starboard/memory.h"
#include "starboard/memory_reporter.h"
#include "starboard/microphone.h"
#include "starboard/mutex.h"
#include "starboard/player.h"
Expand Down
1 change: 0 additions & 1 deletion starboard/nplb/include_all.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include "starboard/log.h"
#include "starboard/media.h"
#include "starboard/memory.h"
#include "starboard/memory_reporter.h"
#include "starboard/microphone.h"
#include "starboard/mutex.h"
#include "starboard/player.h"
Expand Down
8 changes: 0 additions & 8 deletions starboard/nplb/media_set_audio_write_duration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,6 @@ TEST_P(SbMediaSetAudioWriteDurationTest, WriteLimitedInput) {
ASSERT_NE(dmp_reader_.audio_codec(), kSbMediaAudioCodecNone);
ASSERT_GT(dmp_reader_.number_of_audio_buffers(), 0);

#if SB_API_VERSION < 15
SbMediaSetAudioWriteDuration(kDuration);
#endif // SB_API_VERSION < 15

SbPlayer player = CreatePlayer();
WaitForPlayerState(kSbPlayerStateInitialized);

Expand Down Expand Up @@ -229,10 +225,6 @@ TEST_P(SbMediaSetAudioWriteDurationTest, WriteContinuedLimitedInput) {
ASSERT_NE(dmp_reader_.audio_codec(), kSbMediaAudioCodecNone);
ASSERT_GT(dmp_reader_.number_of_audio_buffers(), 0);

#if SB_API_VERSION < 15
SbMediaSetAudioWriteDuration(kDuration);
#endif // SB_API_VERSION < 15

// This directly impacts the runtime of the test.
total_duration_ = 15'000'000LL; // 15 seconds

Expand Down
2 changes: 0 additions & 2 deletions starboard/raspi/shared/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ static_library("starboard_platform_sources") {
"//starboard/shared/linux/cpu_features_get.cc",
"//starboard/shared/linux/dev_input/dev_input.cc",
"//starboard/shared/linux/get_home_directory.cc",
"//starboard/shared/linux/memory_get_stack_bounds.cc",
"//starboard/shared/linux/socket_get_interface_address.cc",
"//starboard/shared/linux/system_get_random_data.cc",
"//starboard/shared/linux/system_get_stack.cc",
Expand Down Expand Up @@ -302,7 +301,6 @@ static_library("starboard_platform_sources") {
"//starboard/shared/stub/drm_update_server_certificate.cc",
"//starboard/shared/stub/drm_update_session.cc",
"//starboard/shared/stub/media_is_supported.cc",
"//starboard/shared/stub/media_set_audio_write_duration.cc",
"//starboard/shared/stub/microphone_close.cc",
"//starboard/shared/stub/microphone_create.cc",
"//starboard/shared/stub/microphone_destroy.cc",
Expand Down
Loading

0 comments on commit f8e4ec7

Please sign in to comment.