Commit 04ef3ae8 by huangdarwin Committed by Tofunmi Adigun-Hameed

media3: Capitalize "MIME" for MIME types.

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

PiperOrigin-RevId: 531122121
parent 7ebc9453
Showing with 33 additions and 33 deletions
......@@ -750,12 +750,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
......
......@@ -132,7 +132,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) {
......
......@@ -180,7 +180,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}.
......
......@@ -528,7 +528,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) {
......
......@@ -57,7 +57,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")
public final class MediaCodecInfo {
......@@ -149,10 +149,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.
......
......@@ -96,7 +96,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. */
......
......@@ -88,12 +88,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
......@@ -126,7 +126,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
......@@ -144,7 +144,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.
......@@ -152,7 +152,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.
*/
......
......@@ -217,7 +217,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.
*/
......
......@@ -1624,7 +1624,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 =
......@@ -1641,7 +1641,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 =
......@@ -1973,7 +1973,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 =
......@@ -1990,7 +1990,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 =
......
......@@ -61,7 +61,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;
......@@ -448,7 +448,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);
......
......@@ -27,7 +27,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;
......
......@@ -2408,8 +2408,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.
*/
......
......@@ -50,7 +50,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()
......
......@@ -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())
......
......@@ -31,7 +31,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;
......
......@@ -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(
......
......@@ -24,9 +24,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 + ".");
}
}
......@@ -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>
......
......@@ -86,7 +86,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>>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment