If a surface was previously passed to the player then an output buffer
renderer was set, we would remove surface callbacks but not clear the
surface on renderers that accept MSG_SET_SURFACE.
PiperOrigin-RevId: 274532266
download calls through to CacheUtil#cache, which handles skipping already downloaded bytes.
It is useful for callers to know that ProgressiveDownloader has this behavior - otherwise, they might reimplement the logic themselves.
I hope this behavior is something that can be part of the public API :)
PiperOrigin-RevId: 274202995
This is a proof of concept for cleanup we should do for all of
our DataSource implementations as we move toward stabilizing
parts of the API.
- Move all XDataSourceFactory classes to be inner classes.
- Remove chained constructors for XDataSourceFactory classes. Keep
required args going through constructors. Use setters for the
rest.
- Not applicable in this case, but we probably want to deprecate
all but the no-arg method for instantiating eac XDataSource
instance (with the all-arg method kept but with the intention
of making it package private).
PiperOrigin-RevId: 274162076
- Verifies that playWhenReady doesn't become true if audio focus
is denied.
- Also verifies there's no suppression reason in this case, because
the denial is permanent rather than temporary.
PiperOrigin-RevId: 274141099
Currently, ndk cpu-features is being used.
This is now deprecated and google open-source
cpu_features library is recommended.
PiperOrigin-RevId: 273987647
If a user has checked out libgav1 they almost certainly want to
build the extension, so fail if CMake is not present but
libgav1 is present. Also add a note to the README linking to
instructions for installing CMake.
Also remove the NDK check, as ndk.dir is apparently deprecated
and Android Studio appears to install this automatically anyway.
PiperOrigin-RevId: 273918142
When the user calls setRepeatMode, the state modifications are
observed as immediate, in spite of being sent to the receiver app
as asynchronous operations.
PiperOrigin-RevId: 273754931
Also move the masking internal state update before the message
dispatch, so as to ensure the result of the operation prevails
over the masking state.
PiperOrigin-RevId: 273740585
This doesn't offer anything on top of the functionality in the main demo app.
There's less code but we have a blog post and presentations that walk through
how to use the extension, so it seems fine to delete the code so we don't need
to maintain it. This also avoids potential confusion about what the demo app
means on IMA-related GitHub issues.
PiperOrigin-RevId: 273501720
When newIndex overlaps oldIndex with newstarttime < oldstarttime, according to the segNum of endtime
in newIndex and oldIndexLastSegnum to calculate the segmentNumShift.
When the user calls setPlayWhenReady, the state modifications are
observed as immediate, in spite of being sent to the receiver app
as asynchronous operations.
PiperOrigin-RevId: 273289768
It's confusing that app:played_color also modifies the colors
that derive from it, but the corresponding setter does not. It
seems generally clearer just to define constants.
PiperOrigin-RevId: 273249557
Move reusable code from LibvpxVideoRenderer to SimpleDecoderVideoRenderer.
Pass outputBuffer to renderOutputBuffer method instead of keeping the reference in the renderer.
PiperOrigin-RevId: 272899549
It's confusing that seekTo(player, windowIndex, positionMs) does
clamping, because it only makes sense if windowIndex is the current
window.
Note: This doesn't actually fix anything (other than code clarity).
In cases where we were passing other windowIndices, we always
passed 0 as the position and so the clamping logic wouldn't have
had any effect.
PiperOrigin-RevId: 272857104
Keeping the ones inside loops, because theoretically they
can be useful there (in practice, for this use case, it's
highly unlikely to make any difference).
PiperOrigin-RevId: 272834073
We currently set it to shouldContinueLoading, which isn't correct if
shouldContinueLoading is set to false and we still have an ongoing load.
Change it to also be true if the media period is still loading.
PiperOrigin-RevId: 272823473