AudioTrack checks the channel configuration against a mask of allowed channels.
Before Android M the check in getMinBufferSize would always fail for 8 channel
output.
For Android L constants are available to build the required channel
configuration for a conventional 7.1 setup and these constants are part of the
allowed channels mask, so switch to using them.
Before Android L the constants for 7.1 aren't in the allowed channels mask, so
discard channels to give a 5.1 stream.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206307892
Remove minLoadableRetryCount from HLS components in favor of
LoadErrorHandlingPolicy#getMinimumLoadableRetryCount.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206298419
The new method allows to add TransferListeners after the DataSource
has been created. Most implementations just forward to their wrapped
upstream DataSource. Implementation which directly read data implement
BaseDataSource instead.
Also removes the temporary default no-op implementation in DataSource.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206289986
This helps to distinguish between the MediaPeriodId the deferred media period is being
created with and the MediaPeriodId which is used to create the actual underlying period.
This serves two purposes:
1. The error reporting of ad prepare errors uses the correct media period id (the
externally visible ad media period id).
2. The transition to using media period uid instead of indices is simplified.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206160463
Using our own no-op castNonNull prevents linking into checkerframeworks library.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206152148
Rewrite FlacBinarySearchSeeker and extract out the core binary search algorithm
into BinarySearchSeeker class so it can be re-used for other formats.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206012900
This changes the default initial bitrate estimate to be country (group) and
network type specific. The existing overwrite still works as before and new
overwrites for the country or specific network types are provided for
customization.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205972705
While the timeline is empty, we keep a dummy MediaPeriodId in PlaybackInfo with
a period index of 0. We leak this MediaPeriodId in actual use in these
situations:
1. When issuing an IllegalSeekPosition after preparation. The timeline becomes
non-empty, but the media period id stays at its dummy value.
2. When re-adding sources to a previously empty timeline. The dummy period id
is used as the start position for the new non-empty timeline.
This change makes:
- the constructor of PlaybackInfo using those dummy values more explicit
- prevents the issues above by using the correct default position in the new
non-empty timeline for the above mentioned cases.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205803006
All known instances use DataSource as generic type and thus code can be simplified
by removing the generic type altogether.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205798542
Using this surface it's possible to play 360 videos in a non-VR Activity that is
affected by phone and touch input.
RELNOTES=true
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205720776
This reduces the number of calls to the DataSpec constructor and minimizes the number of files that need to be updated when adding a new DataSpec parameter (ex: followup []
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205719005
This allows to automatically forward bandwidth estimate events to
AnalyticsListeners.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205642752
This removes the need to populate the entire period for the common usage of
getting the uid from the period.
Also add default implementation to get period by uid.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205638265
The end position is needed to make the MediaPeriodId unique as multiple
content periods may only vary in this parameter.
This also simplfies some other comparisons where the end position needed to
be compared in addition to the media period id.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205634508
The number is shelved in calls to queue.clear() to keep it for the next
media period. However, the queue may also become empty by repeated calls to
advancePlayingPeriod which may happen when seeking to an unprepared period.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205376036
Currently, when the VideoRendererOutputCapturer updates output size, it will
set the new surface, then release the old surface. This can lead to problem
when both surface depends on EGL, since the second release() can release EGL
resources of the first surface.
This CL reverses this process, and ensures that the old surface is released before the new one is created.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205235451
Setting the transfer listener on the data source factories is only needed for debug
purposes, logging and for custom bandwidth metering which doesn't use the
player-provided bandwidth meter. As such, it is not compulsary and it should be easy
to set up the data source factory without a transfer listener.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204926083
This was only needed temporatily until we could ensure that the player always
provides a BandwidthMeter.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204903640
As part of this change:
- Don't apply the workaround on API level 27+. GTS coverage
should prevent such devices from existing.
- Use Util.DEVICE consistently.
- Remove the "// Device name", which don't really add much
but make extra work when updating the list.
Issue: #4468
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204889657
This will allow deduplicating the argument from all Loader clients.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204889331
This bandwidth meter is then forwarded to the track selection and as a transfer
listener to media and data sources.
When no bandwidth meter is specified in the ExoPlayerFactory methods, a static
singleton instance will be used.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204881497
When notifying the bandwidth listeners of new samples, the forwarded values
need to be final to prevent concurrent access. Putting the event forwarding
into a separate method ensures the values are final.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204877650
For the MetadataRetriever, for certain queries, after setting up the player to
render a frame (by seeking to the position), sometimes the player will seek to
the same position and ignore the seek, leading to the frame not being captured,
leaving the retriever in deadlock, waiting for the frame forever. This CL adds
a retry timer to avoid this and make sure we can return query result after some
time.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204460200
1. Prefer label and language values in the manifest to those in
the media. This is particularly helpful if the sample format
contains "und" as the language.
2. Copy label when deriving formats in HlsSampleStreamWrapper
3. When there's only one variant in HlsSampleStreamWrapper, use
the regular copyWithManifestFormatInfo. This allows more
information to be retained from the sample format.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204340008
That allows to add listeners after the BandwidthMeter has been created which is
helpful as the BandwidthMeter instances are often long-lived static instances.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204255299