mirror of
https://github.com/samsonjs/media.git
synced 2026-04-15 12:55:46 +00:00
- Format can represent both container and sample formats. If a container contains a single track (as is true in DASH and SmoothStreaming) then the container Format can also contain sufficient information about the samples to allow for track selection. This avoids the Format to MediaFormat conversions that we were previously doing in ChunkSource implementations. - One important result of this change is that adaptive format evaluation and static format selection now use the same format objects, which is a whole lot less confusing for someone who wants to implement both initial selection and subsequent adaptation logic. It's not in the V2 doc, but it may well make sense if the TrackSelector not only selects the tracks to enable for an adaptive playback, but also injects a FormatEvaluator when enabling them that will control the subsequent adaptive selections. That would make it so that all format selection logic originates from the same place. - As part of this change, the adaptiveX variables are removed from the format object; they don't really correspond to a single format. This also saves on having to inject the max video dimensions through a bunch of classes. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=114546777
48 lines
1.3 KiB
Java
48 lines
1.3 KiB
Java
/*
|
|
* Copyright (C) 2014 The Android Open Source Project
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
package com.google.android.exoplayer;
|
|
|
|
/**
|
|
* A {@link TrackRenderer} that does nothing.
|
|
*/
|
|
public final class DummyTrackRenderer extends TrackRenderer {
|
|
|
|
@Override
|
|
protected int supportsFormat(Format format) throws ExoPlaybackException {
|
|
return TrackRenderer.FORMAT_UNSUPPORTED_TYPE;
|
|
}
|
|
|
|
@Override
|
|
protected boolean isEnded() {
|
|
throw new IllegalStateException();
|
|
}
|
|
|
|
@Override
|
|
protected boolean isReady() {
|
|
throw new IllegalStateException();
|
|
}
|
|
|
|
@Override
|
|
protected void doSomeWork(long positionUs, long elapsedRealtimeUs) {
|
|
throw new IllegalStateException();
|
|
}
|
|
|
|
@Override
|
|
protected void maybeThrowError() {
|
|
throw new IllegalStateException();
|
|
}
|
|
|
|
}
|