Rename muxer/Mp4Utils.java to muxer/Mp4MuxerUtil.java

PiperOrigin-RevId: 660417092
This commit is contained in:
sheenachhabra 2024-08-07 09:20:42 -07:00 committed by Copybara-Service
parent bef134a093
commit 0530d663bc
6 changed files with 9 additions and 10 deletions

View File

@ -20,7 +20,7 @@ import static androidx.media3.common.util.Assertions.checkNotNull;
import static androidx.media3.common.util.Assertions.checkState;
import static androidx.media3.muxer.ColorUtils.MEDIAFORMAT_STANDARD_TO_PRIMARIES_AND_MATRIX;
import static androidx.media3.muxer.ColorUtils.MEDIAFORMAT_TRANSFER_TO_MP4_TRANSFER;
import static androidx.media3.muxer.Mp4Utils.UNSIGNED_INT_MAX_VALUE;
import static androidx.media3.muxer.MuxerUtil.UNSIGNED_INT_MAX_VALUE;
import static java.nio.charset.StandardCharsets.UTF_8;
import android.media.MediaCodec;

View File

@ -211,7 +211,7 @@ public final class FragmentedMp4Muxer implements Muxer {
*/
@Override
public void addMetadataEntry(Metadata.Entry metadataEntry) {
checkArgument(Mp4Utils.isMetadataSupported(metadataEntry), "Unsupported metadata");
checkArgument(MuxerUtil.isMetadataSupported(metadataEntry), "Unsupported metadata");
metadataCollector.addMetadata(metadataEntry);
}

View File

@ -23,7 +23,7 @@ import static androidx.media3.muxer.Boxes.BOX_HEADER_SIZE;
import static androidx.media3.muxer.Boxes.MFHD_BOX_CONTENT_SIZE;
import static androidx.media3.muxer.Boxes.TFHD_BOX_CONTENT_SIZE;
import static androidx.media3.muxer.Boxes.getTrunBoxContentSize;
import static androidx.media3.muxer.Mp4Utils.UNSIGNED_INT_MAX_VALUE;
import static androidx.media3.muxer.MuxerUtil.UNSIGNED_INT_MAX_VALUE;
import static java.lang.Math.max;
import static java.lang.Math.min;

View File

@ -428,7 +428,7 @@ public final class Mp4Muxer implements Muxer {
*/
@Override
public void addMetadataEntry(Metadata.Entry metadataEntry) {
checkArgument(Mp4Utils.isMetadataSupported(metadataEntry), "Unsupported metadata");
checkArgument(MuxerUtil.isMetadataSupported(metadataEntry), "Unsupported metadata");
if (metadataEntry instanceof Mp4TimestampData) {
timestampData = (Mp4TimestampData) metadataEntry;
}

View File

@ -23,13 +23,13 @@ import androidx.media3.container.Mp4OrientationData;
import androidx.media3.container.Mp4TimestampData;
import androidx.media3.container.XmpData;
/** Utilities for MP4 files. */
/** Utility methods for muxer. */
@UnstableApi
public final class Mp4Utils {
public final class MuxerUtil {
/** The maximum value of a 32-bit unsigned int. */
public static final long UNSIGNED_INT_MAX_VALUE = 4_294_967_295L;
private Mp4Utils() {}
private MuxerUtil() {}
/** Returns whether a given {@link Metadata.Entry metadata} is supported. */
public static boolean isMetadataSupported(Metadata.Entry metadata) {

View File

@ -24,9 +24,8 @@ import androidx.media3.common.util.UnstableApi;
import androidx.media3.container.Mp4OrientationData;
import androidx.media3.muxer.FragmentedMp4Muxer;
import androidx.media3.muxer.Mp4Muxer;
import androidx.media3.muxer.Mp4Utils;
import androidx.media3.muxer.Muxer;
import androidx.media3.muxer.Muxer.TrackToken;
import androidx.media3.muxer.MuxerUtil;
import com.google.common.collect.ImmutableList;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import java.io.FileNotFoundException;
@ -196,7 +195,7 @@ public final class InAppMuxer implements Muxer {
@Override
public void addMetadataEntry(Metadata.Entry metadataEntry) {
if (Mp4Utils.isMetadataSupported(metadataEntry)) {
if (MuxerUtil.isMetadataSupported(metadataEntry)) {
metadataEntries.add(metadataEntry);
}
}