It's no longer necessary to stash a reference to the
error yourself. This also correctly handles the case
where setPlayer is called with a player that's already
in an error state.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194828387
Cronet now returns an unmodifiable list, so we need to copy it
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194790506
- Redefine Scheduler interface to better describe what implementations
do. The previous version was too general, in that it allowed concrete
DownloadService implementations to pass different Requirements to
the base class and to the Scheduler. It's also difficult to see how
that version could ever support dynamic updates to Requirements, which
is probably a feature we'll need to add quite soon.
- Fix a (probably theoretical) problem where static fields in
DownloadService assumed only a single concrete implementation.
- Stop using PlatformScheduler pre-API-21 in demo app, because it will
fail.
- Define default Requirements that require network.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194785751
Supports extracting data from AMR container format for both narrow and wide
band formats. Also added AmrExtractor as one of the default extractor to be
used in DefaultExtractorsFactory.
GitHub: #2527.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194407507
LibFlac internally can skip ID3 tags correctly. Therefore, we don't need to keep track of the whole ID3 header section and skip through this section in Java code. We can just set the whole stream to the native library, and it will handle skipping ID3 tags correctly.
The only thing that the Java part need to do is peeking and parsing ID3 tags (if present), in order to populate the track format metadata.
GitHub: #4055.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193327602
Also add testing media to verify FLAC extension can play these sample rates.
Github: #3769.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192783193
Support parsing ID3 tags at the beginning of FLAC files, even though FLAC spec
does not require this.
GitHub: #4055.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192127929
These don't seem to be needed anymore. All tests run without them in gradle
and Blaze.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191867518
This field (formerly "id") is almost impossible to use so far. Having setters
in the factories allows to specify custom tags for all media sources.
Also added a ExoPlayer.getCurrentTag() method to retrieve the tag of the
currently playing media source in a convenient way.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191738754
- Upgrade to latest version
- Use api dependency, since application code that uses the
extension more has to use OkHttp directly to make an
OkHttpClient instance
- Add proguard configuration
Issue #4059
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191422594
Video renderers assume that the player position is advancing linearly while in
the started state. MediaCodecVideoRenderer schedules frames for rendering in the
future in the expectation that the player position is advancing.
This assumption is not currently true when using a position from the AudioTrack:
the player position can be fixed for (in the worst case) up to about 100 ms
before it starts increasing. This leads to an effect where the first frame is
rendered then a few other frames are rendered, then there's a pause before
frames start being rendered smoothly.
Work around this issue by checking whether the position has started advancing
before scheduling frames to be rendered in the future.
It might be preferable to make the audio renderer only become ready when its
timestamp can start advancing, but this is likely to be complicated.
Issue: #3841
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190937429
- Ensure that no memory is used by audio processors that are always inactive, by
only allocating in flush() if active. If data was already allocated but a
processor becomes inactive we assume that the allocation may be needed in
future so do not remove it (e.g., in the case of ResamplingAudioProcessor).
- Make SilenceSkippingAudioProcessor set up its buffers in flush(), and clarify
that it is always necessary to call flush() if configure() returns true.
- Make reset() reset all state for all processors.
- Use @Nullable state or empty arrays for inactive audio processor buffers.
- Miscellaneous style/consistency cleanup.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190895783
Also remove logic for tracking the next output buffer in LibvpxVideoRenderer, as
this allowed many consecutive frames to be rendered that were actually late
after dropping to keyframe. It looks better to show frames at a consistent
100 ms rate.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188144739
To support Google Assistant media apps need to support the action
ACTION_SET_RATING. Before this change developers have to use a QueueEditor for
this which does not have any other mandatory actions required for Assistant.
With this change developers can implement the rating action with the
PlaybackPreparer which they need to implement anyway to support Assistant.
https://developer.android.com/guide/topics/media-apps/interacting-with-assistant.html#transport_controls
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=188056722
1. Allow retaining a decoder without any reconfiguration, in addition
to retaining with reconfiguration (and not retaining)
2. Fix retention logic for video decoders to take into account changing
ColorInfo
3. Allow retention of audio decoders when possible
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187500285
- Change 'compile' configuration (deprecared) to using 'implementation'
and 'api' configurations instead.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187311778
The non-dynamic media source has a strict subset of features of the dynamic one and
thus can be replaced.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187299432
This is achieved by adding a BaseMediaSource which keeps a reference count of the
number of times the source has been prepared and forwards to the actual implementations
only once, such that only minimal changes are needed for each media source.
Issue:#3498
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187186691
The util package is, in practice, for things that are misc enough
to not warrant their own package. If something is deserving of a
package, it's IMO best placed somewhere else (I know you could
argue it's a util, but you could argue that about almost anything
else as well).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187010018
AdsMediaSource must be top-level. Currently the (deprecated) ImaAdsMediaSource
can't be used because it prepares its contained AdsMediaSource as a child
source.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186990882
Occasionally the player could transition from playing content to playing an ad
after IMA called playAd. The discontinuity triggered faking the content
position, and the fake position was passed to IMA when content resumed causing
the wrong ad group to be loaded. Fix this by only faking the position if the
player transitions before playAd.
Also fix the calculation of the expected ad group index for a postroll ad, and
wait for the player to transition back from ad to content before passing a
content progress update.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185994229
If an exception is thrown in an IMA callback it crashes the process with lots of
logging from WebView (including several stack traces, etc.). This change wraps
ImaAdsLoader code that might throw, skips any remaining ads (as the errors are
not recoverable, in general) and notifies a new load error callback so that the
application can implement its own handling. The intention is to make the loader
robust to unexpected requests from IMA and avoid crashes.
Also handle IMA loading an ad in an ad group that has no available ads. In rare
cases IMA will try to load an ad for which an error was previously notified, so
this drops those load requests allowing playback of the content to continue.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185985850
If there was no preroll and the pending content position was set before the
first midroll, the pending content position was never cleared so loading the ad
was never triggered.
Only set a pending content position if we know that we need to trigger playing
an ad for the current position and IMA will poll for an ad (because there is a
midroll ad group). Clearing the pending content position happens when IMA pauses
content to play the ad.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185818315