Remix audio remuxing into its own feature flag.

This commit is contained in:
Nicholas Tinsley
2024-02-03 13:10:18 -05:00
parent 3c5cbc3114
commit 4545e70384
6 changed files with 37 additions and 14 deletions

View File

@@ -258,7 +258,7 @@ public final class AttachmentCompressionJob extends BaseJob {
}
if (FeatureFlags.useStreamingVideoMuxer()) {
StreamingTranscoder transcoder = new StreamingTranscoder(dataSource, options, constraints.getCompressedVideoMaxSize(context));
StreamingTranscoder transcoder = new StreamingTranscoder(dataSource, options, constraints.getCompressedVideoMaxSize(context), FeatureFlags.allowAudioRemuxing());
if (transcoder.isTranscodeRequired()) {
Log.i(TAG, "Compressing with streaming muxer");

View File

@@ -120,6 +120,7 @@ public final class FeatureFlags {
private static final String CALLING_RAISE_HAND = "android.calling.raiseHand";
private static final String USE_ACTIVE_CALL_MANAGER = "android.calling.useActiveCallManager.2";
private static final String GIF_SEARCH = "global.gifSearch";
private static final String AUDIO_REMUXING = "android.media.audioRemux";
/**
* We will only store remote values for flags in this set. If you want a flag to be controllable
@@ -192,7 +193,8 @@ public final class FeatureFlags {
CALLING_RAISE_HAND,
PHONE_NUMBER_PRIVACY,
USE_ACTIVE_CALL_MANAGER,
GIF_SEARCH
GIF_SEARCH,
AUDIO_REMUXING
);
@VisibleForTesting
@@ -693,6 +695,11 @@ public final class FeatureFlags {
return getBoolean(GIF_SEARCH, true);
}
/** Allow media converters to remux audio instead of transcoding it. */
public static boolean allowAudioRemuxing() {
return getBoolean(AUDIO_REMUXING, false);
}
/** Only for rendering debug info. */
public static synchronized @NonNull Map<String, Object> getMemoryValues() {
return new TreeMap<>(REMOTE_VALUES);