This change allows MediaPeriod instances to replace
SampleStream instances when the selection isn't changing.
It also allows MediaPeriod instances to retain a
SampleStream but indicate that the renderer consuming
from it needs to be reset.
The change is used to fix the ref'd bug, and is used to
do the same thing in HLS without the need for the source
to report a discontinuity. Note that reporting discontinuity
could cause unnecessary failure when used as a child of
MergingMediaSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129971782
If a renderer is reading ahead of the playing period, seeking within the
playing period would fail, because renderers would not be disabled but then try
to read from SampleStreams that have a released period.
Also, in the same circumstances, seeking within the reading period would fail,
because all renderers would be disabled, but their sample streams have already
been read. When they are reenabled they expect to see a format but don't
receive one.
In both cases, seeking can just clear the timeline. This only occurs in rare
circumstances when the player is reading ahead, so the cost of re-preparing
will not be incurred often, and allows the seeking logic to be simpler.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129891060
Referential equality is going to become important for detecting
whether a SampleStream has been replaced, so we need to create
new instances as we do elsewhere.
This also enables multiple SampleStreams to be provided for a
single TrackGroup, as is also true for DASH and SmoothStreaming.
It's forbidden to ask for multiple SampleStreams from a single
TrackGroup currently, but we may choose to relax that at some
point (and indicate whether it's allowed as a flag on each
TrackGroup).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129842336
- Add build test to [] so it runs in presubmit
- Tweak README.md instructions
- Use symlinks to make the extension usable in Android
Studio internally, without taking any special action
- Remove unnecessary dependencies
- Simplify setup instructions in README.md
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129733466
- Support specifying a preferred text language.
- Score based selection for text/audio/other tracks.
- Prefer default tracks to non-default ones.
- Allow overriding of base select*Track methods.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129626994
When seekToPeriodPosition found that the seek destination period was already
prepared, it would not disable/re-enable renderers. This was fine if the
playing period wasn't changing, but in other cases the renderers would be left
reading the incorrect streams (and the underlying periods may have been
released).
Also, transition to the buffering state before re-enabling renderers, so that
the renderers are not started until leaving the buffering state.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129625632
- Enforce viewport constraints for fixed video track selection.
- Select best fixed video track, not the first one.
- Better handling of video tracks with unknown dimensions.
- Mini bug fix.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129226593
- Only setup a codec to allow adaptation to other compatible
formats in the stream. If something like the mimeType is
changing adaptation will never be possible, so there's no
point.
- Incorporate maxInputSize into the reconfiguration logic.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129088464
On an edge case, player may get stuck when the renderers are ready but the buffer doesn't get full enough because of a fatal error in data source. An example state can be created by starting a live DASH stream and switching between normal and slow network connections.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129084824
An override applies across periods provided they expose the
same track groups according to .equals, but the formats in
the override are then compared against the period's formats
according to ==. Use .equals consistently to fix.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129081591
For self-initializing segments, DefaultTrackOutput receives
a null format and then the actual format. This broke the
deduplication logic in InfoQueue.format, since there were
two transitions: FormatX->Null and Null->FormatX. This CL
allows deduplication to succeed in this case.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129081583
The codec cannot be reconfigured if the format rotation
changes, or if the format dimensions exceed the current
decoder's configured maximum dimensions.
Issue #1707
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129004187
This wont help much until the buttons to get the dialogs
to display are focusable! Use of MediaController seems to
make that tricky (to be continued...).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128989328
When seeking to the default position in a period, the containing source may
actually return a position in another period. Multi-period live sources can do
this to seek the player to the live edge.
ExoPlayerImplInternal uses the same functionality when the playback position
reaches the end of a period to determine what period/position to play next.
This means that when playback transitions to a multi-period live source from
some other source (playing a concatenation of those two sources), the player
will play the live edge rather than the beginning of the earliest period.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128984355
Useful functionality promoted to core library:
1. Management of SurfaceHolder.Callback lifecycle
promoted to SimpleExoPlayer
2. Ability to determine whether audio/video tracks
exist but are all unsupported promoted to
MappingTrackSelector.TrackInfo
3. Read external storage permissions check promoted
to Util
4. SubtitleView given ability to act directly as a
TextRenderer.Output to remove layer of indirection
5. SubtitleView given ability to configure itself to
user's platform wide caption styling
6. KeyCompatibleMediaController promoted to library's
UI package.
Relocation of boring stuff:
1. ID3 frame logging moved to EventLogger.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128714230
This change merges the duties of FormatEvaluator into
TrackSelection classes, so that both the static and
dynamic parts of track selection are implemented in a
single place.
New feature: Demo app now allows you to enable random
adaptation in the track selection dialog.
Notes:
- It should be quite easy to allow application side
track blacklisting in addition to source side, as an
extension to this. That would effectively allow
applications to do seamless/deferred track selection
by creating a TrackSelection with all tracks enabled,
and then toggling the blacklist flags to select the
ones they want to be active.
- It should be trivial to implement format blacklisting
for DASH and SS as an extension to this. Will do in a
follow up CL.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128707517