media3: Capitalize "MIME" for MIME types.

Find and replace "mime" to "MIME", where appropriate, throughout media3.

PiperOrigin-RevId: 531122121
This commit is contained in:
huangdarwin 2023-05-11 07:32:18 +00:00 committed by Tofunmi Adigun-Hameed
parent 925aa34e13
commit 82ede47398
19 changed files with 33 additions and 33 deletions

View File

@ -134,7 +134,7 @@ public final class FileTypes {
/**
* Returns the {@link Type} corresponding to the MIME type provided.
*
* <p>Returns {@link #UNKNOWN} if the mime type is {@code null}.
* <p>Returns {@link #UNKNOWN} if the MIME type is {@code null}.
*/
public static @FileTypes.Type int inferFileTypeFromMimeType(@Nullable String mimeType) {
if (mimeType == null) {

View File

@ -748,12 +748,12 @@ public final class Format implements Bundleable {
// Container specific.
/** The mime type of the container, or null if unknown or not applicable. */
/** The MIME type of the container, or null if unknown or not applicable. */
@Nullable public final String containerMimeType;
// Sample specific.
/** The sample mime type, or null if unknown or not applicable. */
/** The sample MIME type, or null if unknown or not applicable. */
@Nullable public final String sampleMimeType;
/**
* The maximum size of a buffer of data (typically one sample), or {@link #NO_VALUE} if unknown or

View File

@ -184,7 +184,7 @@ public interface RendererCapabilities {
* C#FORMAT_UNSUPPORTED_DRM}, {@link C#FORMAT_UNSUPPORTED_SUBTYPE} and {@link
* C#FORMAT_UNSUPPORTED_TYPE}.
* <li>{@link AdaptiveSupport}: The level of support for adapting from the format to another
* format of the same mime type. One of {@link #ADAPTIVE_SEAMLESS}, {@link
* format of the same MIME type. One of {@link #ADAPTIVE_SEAMLESS}, {@link
* #ADAPTIVE_NOT_SEAMLESS} and {@link #ADAPTIVE_NOT_SUPPORTED}. Only set if the level of
* support for the format itself is {@link C#FORMAT_HANDLED} or {@link
* C#FORMAT_EXCEEDS_CAPABILITIES}.

View File

@ -530,7 +530,7 @@ public final class MediaMetricsListener
builder.setTrackState(TrackChangeEvent.TRACK_STATE_ON);
builder.setTrackChangeReason(getTrackChangeReason(trackSelectionReason));
if (format.containerMimeType != null) {
// TODO(b/181121074): Progressive container mime type is not filled in by MediaSource.
// TODO(b/181121074): Progressive container MIME type is not filled in by MediaSource.
builder.setContainerMimeType(format.containerMimeType);
}
if (format.sampleMimeType != null) {

View File

@ -58,7 +58,7 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.List;
/** Information about a {@link MediaCodec} for a given mime type. */
/** Information about a {@link MediaCodec} for a given MIME type. */
@SuppressWarnings("InlinedApi")
@UnstableApi
public final class MediaCodecInfo {
@ -151,10 +151,10 @@ public final class MediaCodecInfo {
* Creates an instance.
*
* @param name The name of the {@link MediaCodec}.
* @param mimeType A mime type supported by the {@link MediaCodec}.
* @param mimeType A MIME type supported by the {@link MediaCodec}.
* @param codecMimeType The MIME type that the codec uses for media of type {@code #mimeType}.
* Equal to {@code mimeType} unless the codec is known to use a non-standard MIME type alias.
* @param capabilities The capabilities of the {@link MediaCodec} for the specified mime type, or
* @param capabilities The capabilities of the {@link MediaCodec} for the specified MIME type, or
* {@code null} if not known.
* @param hardwareAccelerated Whether the {@link MediaCodec} is hardware accelerated.
* @param softwareOnly Whether the {@link MediaCodec} is software only.

View File

@ -98,7 +98,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
private static final int NO_SUITABLE_DECODER_ERROR = CUSTOM_ERROR_CODE_BASE + 1;
private static final int DECODER_QUERY_ERROR = CUSTOM_ERROR_CODE_BASE + 2;
/** The mime type for which a decoder was being initialized. */
/** The MIME type for which a decoder was being initialized. */
public final String mimeType;
/** Whether it was required that the decoder support a secure output path. */

View File

@ -90,12 +90,12 @@ public final class MediaCodecUtil {
private MediaCodecUtil() {}
/**
* Optional call to warm the codec cache for a given mime type.
* Optional call to warm the codec cache for a given MIME type.
*
* <p>Calling this method may speed up subsequent calls to {@link #getDecoderInfo(String, boolean,
* boolean)} and {@link #getDecoderInfos(String, boolean, boolean)}.
*
* @param mimeType The mime type.
* @param mimeType The MIME type.
* @param secure Whether the decoder is required to support secure decryption. Always pass false
* unless secure decryption really is required.
* @param tunneling Whether the decoder is required to support tunneling. Always pass false unless
@ -128,7 +128,7 @@ public final class MediaCodecUtil {
}
/**
* Returns information about the preferred decoder for a given mime type.
* Returns information about the preferred decoder for a given MIME type.
*
* @param mimeType The MIME type.
* @param secure Whether the decoder is required to support secure decryption. Always pass false
@ -146,7 +146,7 @@ public final class MediaCodecUtil {
}
/**
* Returns all {@link MediaCodecInfo}s for the given mime type, in the order given by {@link
* Returns all {@link MediaCodecInfo}s for the given MIME type, in the order given by {@link
* MediaCodecList}.
*
* @param mimeType The MIME type.
@ -154,7 +154,7 @@ public final class MediaCodecUtil {
* unless secure decryption really is required.
* @param tunneling Whether the decoder is required to support tunneling. Always pass false unless
* tunneling really is required.
* @return An unmodifiable list of all {@link MediaCodecInfo}s for the given mime type, in the
* @return An unmodifiable list of all {@link MediaCodecInfo}s for the given MIME type, in the
* order given by {@link MediaCodecList}.
* @throws DecoderQueryException If there was an error querying the available decoders.
*/

View File

@ -219,7 +219,7 @@ public final class OutputConsumerAdapterV30 implements MediaParser.OutputConsume
}
/**
* Defines the container mime type to propagate through {@link TrackOutput#format}.
* Defines the container MIME type to propagate through {@link TrackOutput#format}.
*
* @param parserName The name of the selected parser.
*/

View File

@ -1626,7 +1626,7 @@ public final class DefaultTrackSelectorTest {
Format aacAudioFormat = formatBuilder.setSampleMimeType(MimeTypes.AUDIO_AAC).build();
Format opusAudioFormat = formatBuilder.setSampleMimeType(MimeTypes.AUDIO_OPUS).build();
// Should not adapt between mixed mime types by default, so we expect a fixed selection
// Should not adapt between mixed MIME types by default, so we expect a fixed selection
// containing the first stream.
TrackGroupArray trackGroups = singleTrackGroup(aacAudioFormat, opusAudioFormat);
TrackSelectorResult result =
@ -1643,7 +1643,7 @@ public final class DefaultTrackSelectorTest {
assertThat(result.length).isEqualTo(1);
assertFixedSelection(result.selections[0], trackGroups, opusAudioFormat);
// If we explicitly enable mixed mime type adaptiveness, expect an adaptive selection.
// If we explicitly enable mixed MIME type adaptiveness, expect an adaptive selection.
trackSelector.setParameters(
defaultParameters.buildUpon().setAllowAudioMixedMimeTypeAdaptiveness(true));
result =
@ -1975,7 +1975,7 @@ public final class DefaultTrackSelectorTest {
Format h264VideoFormat = formatBuilder.setSampleMimeType(MimeTypes.VIDEO_H264).build();
Format h265VideoFormat = formatBuilder.setSampleMimeType(MimeTypes.VIDEO_H265).build();
// Should not adapt between mixed mime types by default, so we expect a fixed selection
// Should not adapt between mixed MIME types by default, so we expect a fixed selection
// containing the first stream.
TrackGroupArray trackGroups = singleTrackGroup(h264VideoFormat, h265VideoFormat);
TrackSelectorResult result =
@ -1992,7 +1992,7 @@ public final class DefaultTrackSelectorTest {
assertThat(result.length).isEqualTo(1);
assertFixedSelection(result.selections[0], trackGroups, h265VideoFormat);
// If we explicitly enable mixed mime type adaptiveness, expect an adaptive selection.
// If we explicitly enable mixed MIME type adaptiveness, expect an adaptive selection.
trackSelector.setParameters(
defaultParameters.buildUpon().setAllowVideoMixedMimeTypeAdaptiveness(true));
result =

View File

@ -1550,7 +1550,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
sampleMimeType = MimeTypes.getMediaMimeType(codecs);
} else {
// The variant assigns more than one codec string to this track. We choose whichever codec
// string matches the sample mime type. This can happen when different languages are encoded
// string matches the sample MIME type. This can happen when different languages are encoded
// using different codecs.
codecs =
MimeTypes.getCodecsCorrespondingToMimeType(

View File

@ -26,9 +26,9 @@ import java.io.IOException;
public final class SampleQueueMappingException extends IOException {
/**
* @param mimeType The mime type of the track group whose mapping failed.
* @param mimeType The MIME type of the track group whose mapping failed.
*/
public SampleQueueMappingException(@Nullable String mimeType) {
super("Unable to bind a sample queue to TrackGroup with mime type " + mimeType + ".");
super("Unable to bind a sample queue to TrackGroup with MIME type " + mimeType + ".");
}
}

View File

@ -63,7 +63,7 @@ public final class Ac3Util {
public static final int STREAM_TYPE_TYPE2 = 2;
/**
* The sample mime type of the bitstream. One of {@link MimeTypes#AUDIO_AC3} and {@link
* The sample MIME type of the bitstream. One of {@link MimeTypes#AUDIO_AC3} and {@link
* MimeTypes#AUDIO_E_AC3}.
*/
@Nullable public final String mimeType;
@ -450,7 +450,7 @@ public final class Ac3Util {
int fscod = data.readBits(2);
if (fscod == 3) {
// fscod '11' indicates that the decoder should not attempt to decode audio. We invalidate
// the mime type to prevent association with a renderer.
// the MIME type to prevent association with a renderer.
mimeType = null;
}
int frmsizecod = data.readBits(6);

View File

@ -29,7 +29,7 @@ public final class MpegAudioUtil {
/** MPEG audio header version. */
public int version;
/** The mime type. */
/** The MIME type. */
@Nullable public String mimeType;
/** Size of the frame associated with this header, in bytes. */
public int frameSize;

View File

@ -33,7 +33,7 @@ public final class PictureFrame implements Metadata.Entry {
/** The type of the picture. */
public final int pictureType;
/** The mime type of the picture. */
/** The MIME type of the picture. */
public final String mimeType;
/** A description of the picture. */
public final String description;

View File

@ -2410,8 +2410,8 @@ public class MatroskaExtractor implements Extractor {
/**
* Builds initialization data for a {@link Format} from FourCC codec private data.
*
* @return The codec mime type and initialization data. If the compression type is not supported
* then the mime type is set to {@link MimeTypes#VIDEO_UNKNOWN} and the initialization data
* @return The codec MIME type and initialization data. If the compression type is not supported
* then the MIME type is set to {@link MimeTypes#VIDEO_UNKNOWN} and the initialization data
* is {@code null}.
* @throws ParserException If the initialization data could not be built.
*/

View File

@ -52,7 +52,7 @@ public final class SeiReader {
Assertions.checkArgument(
MimeTypes.APPLICATION_CEA608.equals(channelMimeType)
|| MimeTypes.APPLICATION_CEA708.equals(channelMimeType),
"Invalid closed caption mime type provided: " + channelMimeType);
"Invalid closed caption MIME type provided: " + channelMimeType);
String formatId = channelFormat.id != null ? channelFormat.id : idGenerator.getFormatId();
output.format(
new Format.Builder()

View File

@ -49,7 +49,7 @@ import java.util.List;
Assertions.checkArgument(
MimeTypes.APPLICATION_CEA608.equals(channelMimeType)
|| MimeTypes.APPLICATION_CEA708.equals(channelMimeType),
"Invalid closed caption mime type provided: " + channelMimeType);
"Invalid closed caption MIME type provided: " + channelMimeType);
output.format(
new Format.Builder()
.setId(idGenerator.getFormatId())

View File

@ -88,7 +88,7 @@ public final class MediaPeriodAsserts {
* @param mediaPeriodFactory A factory to create a {@link MediaPeriod} based on a manifest.
* @param manifest The manifest which is to be tested.
* @param periodIndex The index of period in the manifest.
* @param ignoredMimeType Optional mime type whose existence in the filtered track groups is not
* @param ignoredMimeType Optional MIME type whose existence in the filtered track groups is not
* asserted.
*/
public static <T extends FilterableManifest<T>>

View File

@ -137,10 +137,10 @@ import java.util.List;
* <p>The {@linkplain Format requestedFormat} determines what support is checked.
*
* <ul>
* <li>The {@link Format#sampleMimeType} determines whether audio or video mime types are
* <li>The {@link Format#sampleMimeType} determines whether audio or video MIME types are
* considered. See {@link MimeTypes#isAudio} and {@link MimeTypes#isVideo} for more details.
* <li>The {@link Format#sampleMimeType} must be populated with the preferred {@linkplain
* MimeTypes MIME type}. This mime type will be the first checked.
* MimeTypes MIME type}. This MIME type will be the first checked.
* <li>When checking video support, if the HDR {@link Format#colorInfo} is set, only encoders
* that support that {@link ColorInfo} will be considered.
* </ul>