mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Rename flushPending() to writePendingTrackSamples()
The new name is more readable PiperOrigin-RevId: 663264188
This commit is contained in:
parent
fc18ad3135
commit
4df5ecb045
1 changed files with 4 additions and 4 deletions
|
|
@ -130,7 +130,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||
*/
|
||||
public void finishWritingSamplesAndFinalizeMoovBox() throws IOException {
|
||||
for (int i = 0; i < tracks.size(); i++) {
|
||||
flushPending(tracks.get(i));
|
||||
writePendingTrackSamples(tracks.get(i));
|
||||
}
|
||||
|
||||
// Leave the file empty if no samples are written.
|
||||
|
|
@ -334,8 +334,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||
safelyReplaceMoovAtEnd(newMoovStart, currentMoovData);
|
||||
}
|
||||
|
||||
/** Writes out any pending samples to the file. */
|
||||
private void flushPending(Track track) throws IOException {
|
||||
/** Writes out any pending samples of the given {@link Track}. */
|
||||
private void writePendingTrackSamples(Track track) throws IOException {
|
||||
checkState(track.pendingSamplesByteBuffer.size() == track.pendingSamplesBufferInfo.size());
|
||||
if (track.pendingSamplesBufferInfo.isEmpty()) {
|
||||
return;
|
||||
|
|
@ -417,7 +417,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||
if (lastSampleInfo.presentationTimeUs - firstSampleInfo.presentationTimeUs
|
||||
> INTERLEAVE_DURATION_US) {
|
||||
newSamplesWritten = true;
|
||||
flushPending(track);
|
||||
writePendingTrackSamples(track);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue