Skip to content

Commit 24e1a05

Browse files
committed
Add starboard experiment
With the starboard features merged, we can guard the BUFFER_FLAG_DECODE_ONLY experiment with a proper feature flag. Bug: 423927047
1 parent d940a1f commit 24e1a05

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

starboard/android/shared/media_codec_bridge.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "base/android/jni_string.h"
1919
#include "starboard/android/shared/media_capabilities_cache.h"
2020
#include "starboard/common/string.h"
21+
#include "starboard/shared/starboard/features.h"
2122

2223
#pragma GCC diagnostic push
2324
#pragma GCC diagnostic ignored "-Wunused-function"
@@ -313,6 +314,12 @@ jint MediaCodecBridge::QueueInputBuffer(jint index,
313314
jlong presentation_time_microseconds,
314315
jint flags) {
315316
JNIEnv* env = AttachCurrentThread();
317+
if (starboard::features::FeatureList::IsEnabled(
318+
starboard::features::kStarboardBufferFlagDecodeOnlyExperiment)) {
319+
SB_LOG(INFO) << "Feature has been enabled";
320+
} else {
321+
SB_LOG(INFO) << "Feature is not enabled";
322+
}
316323
return Java_MediaCodecBridge_queueInputBuffer(
317324
env, j_media_codec_bridge_, index, offset, size,
318325
presentation_time_microseconds, flags);

starboard/extension/feature_config.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ FEATURE_LIST_START
9797
// false)
9898
// STARBOARD_FEATURE(kCobaltVideoDebug, "CobaltVideoDebug", false)
9999
// #endif // BUILDFLAG(IS_ANDROID) && (SB_API_VERSION >= 17)
100+
#if BUILDFLAG(IS_ANDROID) && (SB_API_VERSION >= 17)
101+
STARBOARD_FEATURE(kStarboardBufferFlagDecodeOnlyExperiment,
102+
"StarboardBufferFlagDecodeOnlyExperiment",
103+
false)
104+
#endif
100105
FEATURE_LIST_END
101106

102107
// To add a parameter to Starboard, use the macro:

0 commit comments

Comments
 (0)