mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Use outputStreamEnded for MetadataRenderer#isEnded
Issue: #8710 #minor-release PiperOrigin-RevId: 366051836
This commit is contained in:
parent
a7d7cfd023
commit
af926deb7a
3 changed files with 14 additions and 1 deletions
|
|
@ -102,6 +102,9 @@
|
||||||
spec ([#8704](https://github.com/google/ExoPlayer/issues/8704)).
|
spec ([#8704](https://github.com/google/ExoPlayer/issues/8704)).
|
||||||
* Support TTML `textEmphasis` attributes, used for Japanese boutens.
|
* Support TTML `textEmphasis` attributes, used for Japanese boutens.
|
||||||
* Support TTML `shear` attributes.
|
* Support TTML `shear` attributes.
|
||||||
|
* Metadata:
|
||||||
|
* Ensure that timed metadata near the end of a period is not dropped
|
||||||
|
([#8710](https://github.com/google/ExoPlayer/issues/8710)).
|
||||||
* MediaSession extension: Remove dependency to core module and rely on common
|
* MediaSession extension: Remove dependency to core module and rely on common
|
||||||
only. The `TimelineQueueEditor` uses a new `MediaDescriptionConverter` for
|
only. The `TimelineQueueEditor` uses a new `MediaDescriptionConverter` for
|
||||||
this purpose and does not rely on the `ConcatenatingMediaSource` anymore.
|
this purpose and does not rely on the `ConcatenatingMediaSource` anymore.
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ public final class MetadataRenderer extends BaseRenderer implements Callback {
|
||||||
private int pendingMetadataCount;
|
private int pendingMetadataCount;
|
||||||
@Nullable private MetadataDecoder decoder;
|
@Nullable private MetadataDecoder decoder;
|
||||||
private boolean inputStreamEnded;
|
private boolean inputStreamEnded;
|
||||||
|
private boolean outputStreamEnded;
|
||||||
private long subsampleOffsetUs;
|
private long subsampleOffsetUs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -118,6 +119,7 @@ public final class MetadataRenderer extends BaseRenderer implements Callback {
|
||||||
protected void onPositionReset(long positionUs, boolean joining) {
|
protected void onPositionReset(long positionUs, boolean joining) {
|
||||||
flushPendingMetadata();
|
flushPendingMetadata();
|
||||||
inputStreamEnded = false;
|
inputStreamEnded = false;
|
||||||
|
outputStreamEnded = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -158,6 +160,9 @@ public final class MetadataRenderer extends BaseRenderer implements Callback {
|
||||||
pendingMetadataIndex = (pendingMetadataIndex + 1) % MAX_PENDING_METADATA_COUNT;
|
pendingMetadataIndex = (pendingMetadataIndex + 1) % MAX_PENDING_METADATA_COUNT;
|
||||||
pendingMetadataCount--;
|
pendingMetadataCount--;
|
||||||
}
|
}
|
||||||
|
if (inputStreamEnded && pendingMetadataCount == 0) {
|
||||||
|
outputStreamEnded = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -198,7 +203,7 @@ public final class MetadataRenderer extends BaseRenderer implements Callback {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnded() {
|
public boolean isEnded() {
|
||||||
return inputStreamEnded;
|
return outputStreamEnded;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -92,3 +92,8 @@ MediaCodecAdapter (exotest.audio.aac):
|
||||||
buffers[89] = length 229, hash FFF98DF0
|
buffers[89] = length 229, hash FFF98DF0
|
||||||
buffers[90] = length 6, hash 31B22286
|
buffers[90] = length 6, hash 31B22286
|
||||||
buffers[91] = length 0, hash 1
|
buffers[91] = length 0, hash 1
|
||||||
|
MetadataOutput:
|
||||||
|
Metadata[0]:
|
||||||
|
entry[0] = EMSG: scheme=urn:mpeg:dash:event:callback:2015, id=0, durationMs=1000, value=1
|
||||||
|
Metadata[1]:
|
||||||
|
entry[0] = EMSG: scheme=urn:mpeg:dash:event:callback:2015, id=1, durationMs=1000, value=1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue