mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Formatting fixes
This commit is contained in:
parent
6287a22285
commit
1c044c98ad
@ -29,6 +29,7 @@ import androidx.media3.extractor.DefaultExtractorInput;
|
||||
import androidx.media3.extractor.Extractor;
|
||||
import androidx.media3.extractor.ExtractorInput;
|
||||
import androidx.media3.extractor.TrackOutput;
|
||||
import com.google.errorprone.annotations.ForOverride;
|
||||
import java.io.IOException;
|
||||
|
||||
/** A {@link BaseMediaChunk} that uses an {@link Extractor} to decode sample data. */
|
||||
@ -135,7 +136,7 @@ public class ContainerMediaChunk extends BaseMediaChunk {
|
||||
nextLoadPosition = input.getPosition() - dataSpec.position;
|
||||
}
|
||||
} finally {
|
||||
onLoadIterationEnded();
|
||||
onLoadEnded();
|
||||
DataSourceUtil.closeQuietly(dataSource);
|
||||
}
|
||||
loadCompleted = !loadCanceled;
|
||||
@ -154,24 +155,17 @@ public class ContainerMediaChunk extends BaseMediaChunk {
|
||||
|
||||
/**
|
||||
* Method that is called to signal that a {@link #load()} has concluded. This is called in both
|
||||
* successful and error scenarios.
|
||||
* successful and error scenarios before the {@link DataSource} is closed.
|
||||
*/
|
||||
protected void onLoadIterationEnded() {}
|
||||
@ForOverride
|
||||
protected void onLoadEnded() {}
|
||||
|
||||
/**
|
||||
* Returns whether the current chunk's load has been canceled from {@link #cancelLoad()}
|
||||
*
|
||||
* @return true if {@link #cancelLoad()} was invoked
|
||||
*/
|
||||
/** Returns whether the current chunk's load has been canceled from {@link #cancelLoad()}. */
|
||||
public final boolean isLoadCanceled() {
|
||||
return loadCanceled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the next position to load in the chunk on a {@link #load()}
|
||||
*
|
||||
* @return the position to load from
|
||||
*/
|
||||
/** Returns the next position to load in the chunk on a {@link #load()}. */
|
||||
public final long getNextLoadPosition() {
|
||||
return nextLoadPosition;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user