It defaults to 5000, which allows frames to be dropped in an
attempt to seamlessly rejoin when re-enabling video during an
ongoing playback. This causes performance failures when running
the test*AdaptiveWithRendererDisabling playback tests.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133105110
- This change fixes seeking before the prepare (or more
accurately, before the timeline is set). The fix a minimal
one to fix the behavior. It's inefficient compared to
posting the pending seek onto the playback thread, which
will be the long term solution.
- As of this change, I think we can call V2 "done". There are
some loose ends to tie up, but the API is effectively
finalized and the implementation is in a state where you
can take it, use it and expect it to work.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132468107
If the live window has a small duration, we currently
end up setting the default start position to be right
at the start of the window. This increases the chance
of a BehindLiveWindowException.
With this change we impose a minimum 5s gap between
the start of the window and the default start position.
If the window is *really* small (<10s) then doing this
would push the default start position too close to the
end of the window. We don't have much time to play with
in either direction in this case, so we put the default
start position in the middle of the window and hope for
the best.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132054802
- Centralise compileSdkVersion, targetSdkVersion and
buildToolsVersion in a single place for gradle.
- Bump compileSdkVersion and targetSdkVersion to 24.
- Bump com.android.tools.build version to re-enable
instant start.
- Bump targetSdkVersion in manifests (needed for
internal builds).
- Use standard expandable_list_item from Android in
the demo app, since ours doesn't look right when
targeting API level 24. We were also setting the
theme on the wrong element in the manifest, so I'm
removing that line.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131929216
There's still some internal to clean up to do, and in particular
it remains a TODO to be able to handle seek calls before the
timeline is set (for this CL, such calls are dropped). This change
does however finalize the API.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131171318
Window is potentially confusing with Android's Window class.
Once Window is renamed, it makes sense to rename Timeline too.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130938392
Also inline a few methods/classes where they can be made
private and therefore be removed from the public API.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130935090
- Use a single constant for unset/unknown times across
all time bases. Note also that this moves away from
use of -1 for unset/unknown times in ms, which was a
bad choice (it might conflict with real times, such
as a time representing being just behind the start
of a live window).
- Add a few other unset constants, and use them.
- Fix some hardcoding of -1 where existing constants
should have been used.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130775594
- This change marks the methods that will be removed, and
renames the Window methods to remove "Window" from their
names.
- The Window methods need to be made to work (rather than
throw exceptions) when the timeline isn't set. Once that
gets done in a subsequent CL, the deprecated methods will
be removed.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130612979
- This change also enables seeking in live windows in the
ExoPlayer demo app.
- The added playlist doesn't transition properly by itself,
but for manual transitions it works correctly, and
demonstrates seeking into a default position.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130515880
Also allow use of suggestedPresentationDelay taken from the
manifest, and enable this by default.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130409924
This was always a bit of a hack; for Play Movies. It may well
no longer be necessary, and if not I'd like to think of a nicer
or more general way of doing it. We can always bring it back
if needed.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130373433
- This avoids the need to have to use the timeline to
calculate a window duration, which can be awkward.
- Window now represents a window of availability with
an isSeekable flag, rather than a window of
seekability.
- Promoted Timeline and Window to top package; they're
pretty important :).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130278509
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
- Invoked --> Called
- Gets --> Returns
- "True if X. False otherwise." --> "Whether X."
- Removed some @returns where the Javadoc is in "Returns X" form
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128678638
- Suppress spurious resource type warnings.
- Make AS happy by making private method non-final.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128584391
- TrackSelection now exposes the selected formats, ordered
by decreasing bandwidth. This removes the need for DASH,
SS and HLS to do the sorting individually.
- The change also removes the need to reconstruct TrackSelection
instances with a different group index in various places
(e.g. MergingMediaPeriod).
- This is also a step toward potentially packaging the
FormatEvaluator inside of the TrackSelection (TBD).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128159064
This also removes direct use of HttpURLConnection and
allows use of any HttpDataSource for license requests,
which means those using OkHttp can finally use the
same network stack for license requests as they're using
for everything else, without having to implement their
own callback.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127841045
There may be other ways to estimate bandwidth that don't
require listening to our own transfers.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127741651
This was possible previously, but now we support things
like multi-period DASH we need to do the injection in
the form of factories rather than concrete instances.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127735816
In V1 we received complaints that Renderer was too locked down.
In particular, it wasn't possible to implement a Renderer that
wrapped another Renderer, since most of the methods were package
private and final (e.g. enable).
This change defines Renderer as a proper interface, removing
this limitation. A method-reordering-only change will follow
this one, to get things into a nice consistent/sane order in
each of the Renderer classes.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127527995
We should only give a TrackSelector access to what it
needs, not the whole Renderer. This is particular true
if [] happens, since more Renderer methods
will become publicly visible.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127526473
1. Rename "extensions" package to "decoder". It's used by both
text and (should be used by) metadata, so it's no longer just
for extensions.
2. Move Buffer objects move into the decoder package.
3. Rename SubtitleParser and MetadataParser to SubtitleDecoder
and MetadataDecoder respectively, since they extend Decoder.
Ditto for all subclasses.
4. Subtitle and Metadata decoders now throw their own exception
types rather than ParserException.
5. Move MediaCodec classes into a mediacodec package, with the
exception of the concrete audio and video renderers.
6. Create an audio package to hold the two audio renderer classes
plus related util classes.
7. Create a video package to hold the one video renderer class
plus related util classes.
After this change the following nice properties hold:
1. Want a video renderer? Look in the video package. Ditto for
audio, text and metadata.
2. All TrackRenderer implementations use a decoder of some kind
to decode buffers received from the source, so we have
consistent terminology there.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127326805
The BandwidthMeter should only be used by MediaSource
instances and the objects they reference, so there's
really no reason for the player to need to know about it.
This change sacrifices DebugTextViewHelper showing the
estimated bandwidth, but I think that's a price worth
paying.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127316755
It doesn't look like TrackSelectionPolicy is going to be
useful other than with DefaultTrackSelector, and it's kinda
confusing dealing with both "selector" and "policy"
terminology. This change does the following:
DefaultTrackSelector -> selector.MappingTrackSelector
DefaultTrackSelectionPolicy -> selector.DefaultTrackSelector
TrackSelectionPolicy -> [deleted]
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127196326
All other MediaCodec specific classes are prefixed MediaCodec,
and we now have other decoders that aren't not related to
MediaCodec.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127093330
- The package is renamed to avoid conflicts with v1, should any
app wish to include both v1 and v2 for a period of time. This is
similar to the approach used by some other open source projects
(e.g. okhttp).
- Copyright year is updated everywhere for completeness.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126895326
Also attempt to clear up naming a little, using "buffering" to
mean the user visible buffering state, and "loading" to mean a
source being loaded.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126693592
This is required for buffering to work properly across
playlist transitions. It's also much simpler, since
specifying the buffering policy becomes independent of
the type of media being played (i.e. the source).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=126051755