Skip 4K export test on Pixel 3a
PiperOrigin-RevId: 644659699
This commit is contained in:
parent
66c19390e2
commit
d27549d29a
@ -653,14 +653,14 @@ public final class MimeTypes {
|
||||
}
|
||||
mimeType = Ascii.toLowerCase(mimeType);
|
||||
switch (mimeType) {
|
||||
// Normalize uncommon versions of some audio MIME types to their standard equivalent.
|
||||
// Normalize uncommon versions of some audio MIME types to their standard equivalent.
|
||||
case BASE_TYPE_AUDIO + "/x-flac":
|
||||
return AUDIO_FLAC;
|
||||
case BASE_TYPE_AUDIO + "/mp3":
|
||||
return AUDIO_MPEG;
|
||||
case BASE_TYPE_AUDIO + "/x-wav":
|
||||
return AUDIO_WAV;
|
||||
// Normalize MIME types that are often written with upper-case letters to their common form.
|
||||
// Normalize MIME types that are often written with upper-case letters to their common form.
|
||||
case "application/x-mpegurl":
|
||||
return APPLICATION_M3U8;
|
||||
case "audio/mpeg-l1":
|
||||
|
@ -347,20 +347,20 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
}
|
||||
|
||||
switch (audioAttributes.usage) {
|
||||
// USAGE_VOICE_COMMUNICATION_SIGNALLING is for DTMF that may happen multiple times
|
||||
// during the phone call when AUDIOFOCUS_GAIN_TRANSIENT is requested for that.
|
||||
// Don't request audio focus here.
|
||||
// USAGE_VOICE_COMMUNICATION_SIGNALLING is for DTMF that may happen multiple times
|
||||
// during the phone call when AUDIOFOCUS_GAIN_TRANSIENT is requested for that.
|
||||
// Don't request audio focus here.
|
||||
case C.USAGE_VOICE_COMMUNICATION_SIGNALLING:
|
||||
return AUDIOFOCUS_NONE;
|
||||
|
||||
// Javadoc says 'AUDIOFOCUS_GAIN: Examples of uses of this focus gain are for music
|
||||
// playback, for a game or a video player'
|
||||
// Javadoc says 'AUDIOFOCUS_GAIN: Examples of uses of this focus gain are for music
|
||||
// playback, for a game or a video player'
|
||||
case C.USAGE_GAME:
|
||||
case C.USAGE_MEDIA:
|
||||
return AUDIOFOCUS_GAIN;
|
||||
|
||||
// Special usages: USAGE_UNKNOWN shouldn't be used. Request audio focus to prevent
|
||||
// multiple media playback happen at the same time.
|
||||
// Special usages: USAGE_UNKNOWN shouldn't be used. Request audio focus to prevent
|
||||
// multiple media playback happen at the same time.
|
||||
case C.USAGE_UNKNOWN:
|
||||
Log.w(
|
||||
TAG,
|
||||
@ -368,14 +368,14 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
+ " handling. Using AUDIOFOCUS_GAIN by default.");
|
||||
return AUDIOFOCUS_GAIN;
|
||||
|
||||
// Javadoc says 'AUDIOFOCUS_GAIN_TRANSIENT: An example is for playing an alarm, or
|
||||
// during a VoIP call'
|
||||
// Javadoc says 'AUDIOFOCUS_GAIN_TRANSIENT: An example is for playing an alarm, or
|
||||
// during a VoIP call'
|
||||
case C.USAGE_ALARM:
|
||||
case C.USAGE_VOICE_COMMUNICATION:
|
||||
return AUDIOFOCUS_GAIN_TRANSIENT;
|
||||
|
||||
// Javadoc says 'AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK: Examples are when playing
|
||||
// driving directions or notifications'
|
||||
// Javadoc says 'AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK: Examples are when playing
|
||||
// driving directions or notifications'
|
||||
case C.USAGE_ASSISTANCE_NAVIGATION_GUIDANCE:
|
||||
case C.USAGE_ASSISTANCE_SONIFICATION:
|
||||
case C.USAGE_NOTIFICATION:
|
||||
@ -386,13 +386,13 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
case C.USAGE_NOTIFICATION_RINGTONE:
|
||||
return AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK;
|
||||
|
||||
// Javadoc says 'AUDIOFOCUS_GAIN_EXCLUSIVE: This is typically used if you are doing
|
||||
// audio recording or speech recognition'.
|
||||
// Assistant is considered as both recording and notifying developer
|
||||
// Javadoc says 'AUDIOFOCUS_GAIN_EXCLUSIVE: This is typically used if you are doing
|
||||
// audio recording or speech recognition'.
|
||||
// Assistant is considered as both recording and notifying developer
|
||||
case C.USAGE_ASSISTANT:
|
||||
return AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE;
|
||||
|
||||
// Special usages:
|
||||
// Special usages:
|
||||
case C.USAGE_ASSISTANCE_ACCESSIBILITY:
|
||||
if (audioAttributes.contentType == C.AUDIO_CONTENT_TYPE_SPEECH) {
|
||||
// Voice shouldn't be interrupted by other playback.
|
||||
|
@ -96,7 +96,7 @@ public final class DownloadNotificationHelper {
|
||||
haveDownloadedBytes |= download.getBytesDownloaded() > 0;
|
||||
downloadTaskCount++;
|
||||
break;
|
||||
// Terminal states aren't expected, but if we encounter them we do nothing.
|
||||
// Terminal states aren't expected, but if we encounter them we do nothing.
|
||||
case Download.STATE_STOPPED:
|
||||
case Download.STATE_COMPLETED:
|
||||
case Download.STATE_FAILED:
|
||||
|
@ -1093,7 +1093,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer
|
||||
case MimeTypes.VIDEO_H263:
|
||||
case MimeTypes.VIDEO_MP4V:
|
||||
case MimeTypes.VIDEO_AV1:
|
||||
// Assume a min compression of 2 similar to the platform's C2SoftAomDec.cpp.
|
||||
// Assume a min compression of 2 similar to the platform's C2SoftAomDec.cpp.
|
||||
case MimeTypes.VIDEO_VP8:
|
||||
// Assume a min compression of 2 similar to the platform's SoftVPX.cpp.
|
||||
return getMaxSampleSize(/* pixelCount= */ width * height, /* minCompressionRatio= */ 2);
|
||||
@ -2180,7 +2180,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer
|
||||
return true;
|
||||
}
|
||||
switch (Util.MODEL) {
|
||||
// Workaround for some Fire OS devices.
|
||||
// Workaround for some Fire OS devices.
|
||||
case "AFTA":
|
||||
case "AFTN":
|
||||
case "AFTR":
|
||||
|
@ -1539,7 +1539,7 @@ public class DashManifestParser extends DefaultHandler
|
||||
}
|
||||
switch (value) {
|
||||
case "forced_subtitle":
|
||||
// Support both hyphen and underscore (https://github.com/google/ExoPlayer/issues/9727).
|
||||
// Support both hyphen and underscore (https://github.com/google/ExoPlayer/issues/9727).
|
||||
case "forced-subtitle":
|
||||
return C.SELECTION_FLAG_FORCED;
|
||||
default:
|
||||
@ -1608,7 +1608,7 @@ public class DashManifestParser extends DefaultHandler
|
||||
case "caption":
|
||||
return C.ROLE_FLAG_CAPTION;
|
||||
case "forced_subtitle":
|
||||
// Support both hyphen and underscore (https://github.com/google/ExoPlayer/issues/9727).
|
||||
// Support both hyphen and underscore (https://github.com/google/ExoPlayer/issues/9727).
|
||||
case "forced-subtitle":
|
||||
case "subtitle":
|
||||
return C.ROLE_FLAG_SUBTITLE;
|
||||
|
@ -230,7 +230,7 @@ import java.util.HashMap;
|
||||
checkArgument(rtpPayloadType < 96);
|
||||
|
||||
switch (rtpPayloadType) {
|
||||
// See RFC3551 Section 6.
|
||||
// See RFC3551 Section 6.
|
||||
case RTP_STATIC_PAYLOAD_TYPE_PCMU:
|
||||
return constructAudioRtpMap(
|
||||
RTP_STATIC_PAYLOAD_TYPE_PCMU,
|
||||
|
@ -295,7 +295,7 @@ import com.google.common.collect.ImmutableMap;
|
||||
case MimeTypes.AUDIO_AC3:
|
||||
case MimeTypes.AUDIO_ALAW:
|
||||
case MimeTypes.AUDIO_MLAW:
|
||||
// Does not require a fmtp attribute. Fall through.
|
||||
// Does not require a fmtp attribute. Fall through.
|
||||
default:
|
||||
// Do nothing.
|
||||
}
|
||||
|
@ -458,7 +458,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
break;
|
||||
|
||||
case STATE_READING_BODY:
|
||||
// Message body must be handled by addMessageBody().
|
||||
// Message body must be handled by addMessageBody().
|
||||
|
||||
default:
|
||||
throw new IllegalStateException();
|
||||
|
@ -116,7 +116,7 @@ public final class RtpAc3Reader implements RtpPayloadReader {
|
||||
case AC3_FRAME_TYPE_INITIAL_FRAGMENT_A:
|
||||
case AC3_FRAME_TYPE_INITIAL_FRAGMENT_B:
|
||||
maybeOutputSampleMetadata();
|
||||
// Falls through.
|
||||
// Falls through.
|
||||
case AC3_FRAME_TYPE_NON_INITIAL_FRAGMENT:
|
||||
// The content of an AC3 frame is split into multiple RTP packets.
|
||||
processFragmentedPacket(data, rtpMarker, frameType, sampleTimeUs);
|
||||
|
@ -77,7 +77,7 @@ public final class WavUtil {
|
||||
return TYPE_PCM;
|
||||
case C.ENCODING_PCM_FLOAT:
|
||||
return TYPE_FLOAT;
|
||||
// TYPE_PCM is little endian so big endian formats don't match.
|
||||
// TYPE_PCM is little endian so big endian formats don't match.
|
||||
case C.ENCODING_PCM_16BIT_BIG_ENDIAN:
|
||||
case C.ENCODING_PCM_24BIT_BIG_ENDIAN:
|
||||
case C.ENCODING_PCM_32BIT_BIG_ENDIAN:
|
||||
|
@ -133,10 +133,10 @@ public final class TextInformationFrame extends Id3Frame {
|
||||
switch (recordingDate.size()) {
|
||||
case 3:
|
||||
builder.setRecordingDay(recordingDate.get(2));
|
||||
// fall through
|
||||
// fall through
|
||||
case 2:
|
||||
builder.setRecordingMonth(recordingDate.get(1));
|
||||
// fall through
|
||||
// fall through
|
||||
case 1:
|
||||
builder.setRecordingYear(recordingDate.get(0));
|
||||
// fall through
|
||||
@ -151,10 +151,10 @@ public final class TextInformationFrame extends Id3Frame {
|
||||
switch (releaseDate.size()) {
|
||||
case 3:
|
||||
builder.setReleaseDay(releaseDate.get(2));
|
||||
// fall through
|
||||
// fall through
|
||||
case 2:
|
||||
builder.setReleaseMonth(releaseDate.get(1));
|
||||
// fall through
|
||||
// fall through
|
||||
case 1:
|
||||
builder.setReleaseYear(releaseDate.get(0));
|
||||
// fall through
|
||||
|
@ -103,7 +103,7 @@ import java.math.BigInteger;
|
||||
if (lastPageSearchPosition > positionBeforeSeekToEnd) {
|
||||
return lastPageSearchPosition;
|
||||
}
|
||||
// Fall through.
|
||||
// Fall through.
|
||||
case STATE_READ_LAST_PAGE:
|
||||
totalGranules = readGranuleOfLastPage(input);
|
||||
state = STATE_IDLE;
|
||||
@ -114,7 +114,7 @@ import java.math.BigInteger;
|
||||
return position;
|
||||
}
|
||||
state = STATE_SKIP;
|
||||
// Fall through.
|
||||
// Fall through.
|
||||
case STATE_SKIP:
|
||||
skipToPageOfTargetGranule(input);
|
||||
state = STATE_IDLE;
|
||||
|
@ -1297,7 +1297,7 @@ public final class Cea708Decoder extends CeaDecoder {
|
||||
Alignment alignment;
|
||||
switch (justification) {
|
||||
case JUSTIFICATION_FULL:
|
||||
// TODO: Add support for full justification.
|
||||
// TODO: Add support for full justification.
|
||||
case JUSTIFICATION_LEFT:
|
||||
alignment = Alignment.ALIGN_NORMAL;
|
||||
break;
|
||||
|
@ -476,7 +476,7 @@ public final class TtmlParser implements SubtitleParser {
|
||||
XmlPullParserUtil.getAttributeValue(xmlParser, TtmlNode.ATTR_TTS_WRITING_MODE);
|
||||
if (writingDirection != null) {
|
||||
switch (Ascii.toLowerCase(writingDirection)) {
|
||||
// TODO: Support horizontal RTL modes.
|
||||
// TODO: Support horizontal RTL modes.
|
||||
case TtmlNode.VERTICAL:
|
||||
case TtmlNode.VERTICAL_LR:
|
||||
verticalType = Cue.VERTICAL_TYPE_LR;
|
||||
|
@ -198,8 +198,8 @@ import java.util.Map;
|
||||
new RubySpan(rubyText, rubyPosition), start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
break;
|
||||
case TtmlStyle.RUBY_TYPE_DELIMITER:
|
||||
// TODO: Add support for this when RubySpan supports parenthetical text. For now, just
|
||||
// fall through and delete the text.
|
||||
// TODO: Add support for this when RubySpan supports parenthetical text. For now, just
|
||||
// fall through and delete the text.
|
||||
case TtmlStyle.RUBY_TYPE_TEXT:
|
||||
// We can't just remove the text directly from `builder` here because TtmlNode has fixed
|
||||
// ideas of where every node starts and ends (nodeStartsByRegion and nodeEndsByRegion) so
|
||||
|
@ -169,7 +169,7 @@ public final class DefaultTsPayloadReaderFactory implements TsPayloadReader.Fact
|
||||
if (!isSet(FLAG_ENABLE_HDMV_DTS_AUDIO_STREAMS)) {
|
||||
return null;
|
||||
}
|
||||
// Fall through.
|
||||
// Fall through.
|
||||
case TsExtractor.TS_STREAM_TYPE_DTS:
|
||||
case TsExtractor.TS_STREAM_TYPE_DTS_HD:
|
||||
return new PesReader(
|
||||
|
@ -139,8 +139,8 @@ import org.checkerframework.checker.nullness.qual.PolyNull;
|
||||
stblBox = Boxes.stbl(stsdBox, stts, stsz, stsc, chunkOffsetBox);
|
||||
break;
|
||||
case C.TRACK_TYPE_METADATA:
|
||||
// TODO: (b/280443593) - Check if we can identify a metadata track type from a custom
|
||||
// mime type.
|
||||
// TODO: (b/280443593) - Check if we can identify a metadata track type from a custom
|
||||
// mime type.
|
||||
case C.TRACK_TYPE_UNKNOWN:
|
||||
handlerType = "meta";
|
||||
handlerName = "MetaHandle";
|
||||
|
@ -1330,8 +1330,8 @@ import java.util.List;
|
||||
return PlaybackStateCompat.ACTION_STOP;
|
||||
case Player.COMMAND_ADJUST_DEVICE_VOLUME:
|
||||
case Player.COMMAND_CHANGE_MEDIA_ITEMS:
|
||||
// TODO(b/227346735): Handle this through
|
||||
// MediaSessionCompat.setFlags(FLAG_HANDLES_QUEUE_COMMANDS)
|
||||
// TODO(b/227346735): Handle this through
|
||||
// MediaSessionCompat.setFlags(FLAG_HANDLES_QUEUE_COMMANDS)
|
||||
case Player.COMMAND_GET_AUDIO_ATTRIBUTES:
|
||||
case Player.COMMAND_GET_CURRENT_MEDIA_ITEM:
|
||||
case Player.COMMAND_GET_DEVICE_VOLUME:
|
||||
|
@ -826,7 +826,7 @@ public class AudioAttributesCompat {
|
||||
case USAGE_VIRTUAL_SOURCE:
|
||||
mUsage = usage;
|
||||
break;
|
||||
// TODO: shouldn't it be USAGE_ASSISTANT?
|
||||
// TODO: shouldn't it be USAGE_ASSISTANT?
|
||||
case USAGE_ASSISTANT:
|
||||
mUsage = USAGE_ASSISTANCE_NAVIGATION_GUIDANCE;
|
||||
break;
|
||||
@ -877,7 +877,7 @@ public class AudioAttributesCompat {
|
||||
break;
|
||||
case AudioManagerHidden.STREAM_SYSTEM_ENFORCED:
|
||||
mFlags |= AudioAttributesCompat.FLAG_AUDIBILITY_ENFORCED;
|
||||
// intended fall through, attributes in common with STREAM_SYSTEM
|
||||
// intended fall through, attributes in common with STREAM_SYSTEM
|
||||
case AudioManager.STREAM_SYSTEM:
|
||||
mContentType = CONTENT_TYPE_SONIFICATION;
|
||||
break;
|
||||
|
@ -3634,13 +3634,13 @@ public class MediaSessionCompat {
|
||||
}
|
||||
long validActions = mState == null ? 0 : mState.getActions();
|
||||
switch (ke.getKeyCode()) {
|
||||
// Note KeyEvent.KEYCODE_MEDIA_PLAY is API 11+
|
||||
// Note KeyEvent.KEYCODE_MEDIA_PLAY is API 11+
|
||||
case KEYCODE_MEDIA_PLAY:
|
||||
if ((validActions & PlaybackStateCompat.ACTION_PLAY) != 0) {
|
||||
cb.onPlay();
|
||||
}
|
||||
break;
|
||||
// Note KeyEvent.KEYCODE_MEDIA_PAUSE is API 11+
|
||||
// Note KeyEvent.KEYCODE_MEDIA_PAUSE is API 11+
|
||||
case KEYCODE_MEDIA_PAUSE:
|
||||
if ((validActions & PlaybackStateCompat.ACTION_PAUSE) != 0) {
|
||||
cb.onPause();
|
||||
|
@ -300,7 +300,7 @@ public final class RatingCompat implements Parcelable {
|
||||
if (isRated()) {
|
||||
return mRatingValue;
|
||||
}
|
||||
// fall through
|
||||
// fall through
|
||||
default:
|
||||
return -1.0f;
|
||||
}
|
||||
|
@ -168,6 +168,10 @@ public class ExportTest {
|
||||
assumeFalse(
|
||||
"Skip due to over-reported encoder capabilities",
|
||||
Util.SDK_INT == 29 && Ascii.equalsIgnoreCase(Util.MODEL, "pixel 3"));
|
||||
// Reference: b/347635026
|
||||
assumeFalse(
|
||||
"Skip due to decoder failing to queue input frames",
|
||||
Util.SDK_INT == 29 && Ascii.equalsIgnoreCase(Util.MODEL, "pixel 3a"));
|
||||
Transformer transformer =
|
||||
new Transformer.Builder(context)
|
||||
.setEncoderFactory(new ForceEncodeEncoderFactory(context))
|
||||
|
@ -647,7 +647,7 @@ public class DefaultTimeBar extends View implements TimeBar {
|
||||
switch (keyCode) {
|
||||
case KeyEvent.KEYCODE_DPAD_LEFT:
|
||||
positionIncrement = -positionIncrement;
|
||||
// Fall through.
|
||||
// Fall through.
|
||||
case KeyEvent.KEYCODE_DPAD_RIGHT:
|
||||
if (scrubIncrementally(positionIncrement)) {
|
||||
removeCallbacks(stopScrubbingRunnable);
|
||||
|
Loading…
x
Reference in New Issue
Block a user