GitHub note - Apologies for the cryptic change descriptions,
they relate to a design doc that's not externally visible.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=113043764
When a seek is performed, renderers currently perform the
actions that they need to take in two places: Some changes
are performed in seekTo implementations. Other changes are
performed when discontinuities are read from the source.
In HLS we need to perform what is effectively a seek
originating in the source. To support this, this CL allows
discontinuities read from the source to modify the playback
position. All actions that renderers perform as a result
of a seek are moved to be performed when a discontinuity is
received.
Best way to understand CL:
- Look at SampleSource interface change and then at the
concrete implementations, to make sure they've been
changed properly.
- Look at SampleSourceTrackRenderer change.
- Look at concrete renderers. The general pattern is that
code previously performed in seekTo and READ_DISCONTINUITY
is merged into onDiscontinuity().
Note: This will be further untangled in V2.
Issue #676
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112720746
Currently, input/output buffers can 'leak' if they are dequeued then the decoder
is flush()ed. This happens if an input buffer is dequeued then a discontinuity
is read, or an output buffer is dequeued and is early. If this happens several
times, no more buffers are available.
This change makes flush() work like MediaCodec: it returns all dequeued
input/output buffers to the codec. Keeping the behavior in line with MediaCodec
might make it easier to factor out a common decoder interface in the future.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=109054178
- The old approach was technically incorrect, because the checks
were "capacity < sampleSize" and hence neglected the fact that
the buffer position may be greater than 0 (e.g. if the caller
wants to prefix the sample with some additional data).
- Also proactively throw an exception if the buffer is too small,
rather than wait for the failure when we actually do the write.
- Admit we don't know the mime type (using unknown mime types) rather
than passing the container mime type.
- Pass the correct mime type for opus, vp9 and vp8, and remove the incorrect
container checks in the corresponding extensions.
- Fix building with APP_ABI=all by configuring for all architectures.
- Keep vpx_dsp which is required for building successfully.
- Use perl -pi -e not sed, for building on Macs.
- Generalize rendererEnabledFlags to be selected track indices through
ExoPlayerImpl/ExoPlayerImplInternal.
- Selecting an out-of-bound track index (e.g. -1) is equivalent to
disabling a renderer prior to the generalization.
- A prepared TrackRenderer that exposes 0 tracks is equivalent to a
TrackRenderer in the STATE_IGNORE state prior to the generalization.
Issue #514.
The SubtitleLayout is now properly aligned with the surface.
This means the subtitles remain on top of the video in portrait
mode, rather than being huge and below it.
1. Remove requirement for TrackRenderer implementations to report
current position, unless they are time sources.
2. Expose whether renderers have media to play. The immediate benefit
of this is to solve the referenced GitHub issue, and also to only
display the appropriate Audio/Video/Text buttons in the demo app
for the media being played. This is also a natural step toward
multi-track support.
Github issue: #541
This makes it so that it's no longer necessary to specify the number
of downstream renderers to HlsSampleSource, FrameworkSampleSource and
ExtractorSampleSource, by forcing the downstream renderers to register
with the SampleSource instances in their constructors. This eliminates
a common source of subtle client bugs where the passed value is incorrect.