4670 Commits

Author SHA1 Message Date
bachinger
c879bbf64c move transparency of shuffle mode off button to bitmap
PiperOrigin-RevId: 266795413
2019-09-16 16:56:55 -07:00
Oliver Woodman
525d0320a7 Fix exception message
PiperOrigin-RevId: 266790267
2019-09-16 16:56:32 -07:00
bachinger
4712bcfd53 use isPlaying to determine which notification action to display in compact view
PiperOrigin-RevId: 266782250
2019-09-16 16:54:18 -07:00
kimvde
284a672bb3 Bypass sniffing for single extractor
Sniffing is performed in ProgressiveMediaPeriod even if a single
extractor is provided. Skip it in that case to improve performances.

Issue:#6325
PiperOrigin-RevId: 266766373
2019-09-16 16:51:07 -07:00
olly
f05d67b7c7 Simplify androidTest manifests & fix links to use https
PiperOrigin-RevId: 266396506
2019-09-02 14:39:02 +01:00
olly
407dbf075e Add HttpDataSource.getResponseCode to provide the status code associated with the most recent HTTP response.
PiperOrigin-RevId: 266218104
2019-09-02 14:38:24 +01:00
olly
ad699b8ff6 seenCacheError should be set for all errors
PiperOrigin-RevId: 265662686
2019-09-02 14:37:40 +01:00
christosts
c3d6be3afd Add HTTP request parameters (headers) to DataSpec.
Adds HTTP request parameters in DataSpec. Keeps DataSpec behavior to be immutable as before.

PiperOrigin-RevId: 265087782
2019-09-02 14:37:24 +01:00
tonihei
46bf710cb3 Do not compare bitrates of audio tracks with different languages.
The last selection criteria is the audio bitrate to prefer higher-quality
streams. We shouldn't apply this criterium though if the languages of the
tracks are different.

Issue:#6335
PiperOrigin-RevId: 265064756
2019-09-02 14:37:12 +01:00
olly
7cefb56eda Update comment to indicate correct int value of "FLAG_ALLOW_CACHE_FRAGMENTATION" in ExoPlayer2 upstream DataSpec
Currently the value of FLAG_ALLOW_CACHE_FRAGMENTATION is defined as "1 << 4" but commented as "8". Either the value of FLAG_ALLOW_CACHE_FRAGMENTATION should be "1 << 3", or the comment should be 16. Here I am modifying the comment since it does not affect any current behavior.

PiperOrigin-RevId: 265011839
2019-09-02 14:36:05 +01:00
andrewlewis
886fe910a8 Avoid potential ArrayStoreException with audio processors
The app is able to pass a more specialized array type, so the Arrays.copyOf call
produces an array into which it's not valid to store arbitrary AudioProcessors.

Create a new array and copy into it to avoid this problem.

PiperOrigin-RevId: 264779164
2019-09-02 14:35:52 +01:00
ibaker
c60b355f9c Add support for the AOM scheme_id for ID3-in-EMSG
https://developer.apple.com/documentation/http_live_streaming/about_the_common_media_application_format_with_http_live_streaming

PiperOrigin-RevId: 264126140
2019-09-02 14:35:00 +01:00
ibaker
47e0580d80 Unwrap SCTE-35 messages in emsg boxes
PiperOrigin-RevId: 263768428
2019-09-02 14:34:35 +01:00
ibaker
d3d192e36e Extend EventMessage.toString to include durationMs
This field is used in .equals(), so it makes sense to include it in toString() too.

PiperOrigin-RevId: 263768329
2019-09-02 14:34:30 +01:00
ibaker
9ec346a2e1 Modify EventMessageDecoder to return null if decoding fails (currently throws exceptions)
This matches the documentation on MetadataDecoder.decode:
"@return The decoded metadata object, or null if the metadata could not be decoded."

PiperOrigin-RevId: 263767144
2019-09-02 14:34:19 +01:00
ibaker
5100e67c83 Support unwrapping nested Metadata messages in MetadataRenderer
Initially this supports ID3-in-EMSG, but can also be used to support SCTE35-in-EMSG too.

PiperOrigin-RevId: 263535925
2019-09-02 14:33:45 +01:00
ibaker
2de1a204e2 Add Metadata.toString that prints the contents of entries
entries are used in .equals(), so it's good to have them printed in toString() too (for test failures) and it makes logging easier too.

PiperOrigin-RevId: 263335503
2019-09-02 14:33:26 +01:00
ibaker
dcac4aa67f Add description to TextInformationFrame.toString() output
This field is used in .equals(), we should print it in toString() too

PiperOrigin-RevId: 263335432
2019-09-02 14:33:21 +01:00
tonihei
90b62c67fb Change default video buffer size to 32MB.
The current max video buffer is 13MB which is too small for high quality
streams and doesn't allow the DefaultLoadControl to buffer up to its default
max buffer time of 50 seconds.

Also move util method and constants only used by DefaultLoadControl into this
class.

PiperOrigin-RevId: 263328088
2019-09-02 14:33:14 +01:00
tonihei
a381cbf536 Make reset on network change the default.
PiperOrigin-RevId: 262886490
2019-09-02 14:32:54 +01:00
olly
921ff02c90 Only read from FormatHolder when a format has been read
I think we need to start clearing the holder as part of the
DRM rework. When we do this, it'll only be valid to read
from the holder immediately after it's been populated.

PiperOrigin-RevId: 262362725
2019-09-02 14:32:40 +01:00
ibaker
a08b537e8e Simplify EventMessageEncoder/Decoder serialization
We're no longer tied to the emsg spec, so we can skip unused fields
and assume ms for duration.

Also remove @Nullable annotation from EventMessageEncoder#encode, it
seems the current implementation never returns null

PiperOrigin-RevId: 262135009
2019-09-02 14:32:33 +01:00
ibaker
bb6b0e1a5a Expose a method on EventMessageDecoder that returns EventMessage directly
PiperOrigin-RevId: 262121134
2019-09-02 14:32:27 +01:00
tonihei
acdb19e99d Clean up documentation of DefaultTrackSelector.ParametersBuilder.
We don't usually refer to other classes when documenting method parameters
but rather duplicate the actual definition.

PiperOrigin-RevId: 262102714
2019-09-02 14:32:21 +01:00
tonihei
c4ac166f2f Add allowAudioMixedChannelCountAdaptiveness parameter to DefaultTrackSelector.
We already allow mixed mime type and mixed sample rate adaptation on request,
so for completeness, we can also allow mixed channel count adaptation.

Issue:#6257
PiperOrigin-RevId: 261930046
2019-09-02 14:32:10 +01:00
ibaker
9f486336be Migrate literal usages of 1000 to (new) C.MILLIS_PER_SECOND
This only covers calls to scaleLargeTimestamp()

PiperOrigin-RevId: 261878019
2019-09-02 14:31:21 +01:00
ibaker
97183ef558 Add inband emsg-v1 support to FragmentedMp4Extractor
This also decouples EventMessageEncoder's serialization schema from the emesg spec (it happens to still match the emsg-v0 spec, but this is no longer required).

PiperOrigin-RevId: 261877918
2019-09-02 14:31:15 +01:00
tonihei
d1ac2727a6 Update stale TrackSelections in chunk sources when keeping the streams.
If we keep streams in chunk sources after selecting new tracks, we also keep
a reference to a stale disabled TrackSelection object. Fix this by updating
the TrackSelection object when keeping the stream. The static part of the
selection (i.e. the subset of selected tracks) stays the same in all cases.

Issue:#6256
PiperOrigin-RevId: 261696082
2019-08-05 20:36:04 +01:00
tonihei
936a7789c9 Check if controller is used when performing click directly.
Issue:#6260
PiperOrigin-RevId: 261647858
2019-08-05 20:35:56 +01:00
olly
b0c2b1a0fa Bump annotations dependency
PiperOrigin-RevId: 261353271
2019-08-02 19:08:20 +01:00
olly
cd7fe05db7 Constraint seek targetGranule within bounds + simplify tests
PiperOrigin-RevId: 261328701
2019-08-02 17:31:26 +01:00
olly
f497bb9610 Move DefaultOggSeeker tests into a single class
PiperOrigin-RevId: 261320318
2019-08-02 17:31:20 +01:00
olly
3c8c5a3346 Fix DefaultOggSeeker seeking
- When in STATE_SEEK with targetGranule==0, seeking would exit
  without checking that the input was positioned at the correct
  place.
- Seeking could fail due to trying to read beyond the end of the
  stream.
- Seeking was not robust against IO errors during the skip phase
  that occurs after the binary search has sufficiently converged.

PiperOrigin-RevId: 261317035
2019-08-02 17:31:07 +01:00
andrewlewis
80bc50b647 Revert to using header bitrate for CBR MP3s
A previous change switched to calculation of the bitrate based on the
first MPEG audio header in the stream. This had the effect of fixing
seeking to be consistent with playing from the start for streams where
every frame has the same padding value, but broke streams where the
encoder (correctly) modifies the padding value to match the declared
bitrate in the header.

Issue: #6238
PiperOrigin-RevId: 261163904
2019-08-02 17:26:19 +01:00
Oliver Woodman
88b68e5902 Fix ExoPlayerTest 2019-08-01 21:06:56 +01:00
olly
f5e92134af Shorten data length if it exceeds length of input
Issue: #6241
PiperOrigin-RevId: 261126968
2019-08-01 21:05:24 +01:00
olly
6d20a5cf0c WavExtractor: Skip to data start position if position reset to 0
PiperOrigin-RevId: 260970865
2019-08-01 21:04:45 +01:00
olly
c373ff0a1c Don't print warning when skipping RIFF and FMT chunks
They're not unexpected!

PiperOrigin-RevId: 260907687
2019-08-01 21:04:37 +01:00
andrewlewis
7ec7aab320 Move E-AC3 workaround out of MediaCodecUtil
PiperOrigin-RevId: 244173887
2019-08-01 21:02:52 +01:00
olly
7162bd8153 Propagate non-standard MIME type aliases
Issue: #5938
PiperOrigin-RevId: 261150349
2019-08-01 21:01:12 +01:00
olly
23ace19369 Standardize ALAC initialization data
Android considers ALAC initialization data to consider of the magic
cookie only, where-as FFmpeg requires a full atom. Standardize around
the Android definition, since it makes more sense (the magic cookie
being contained within an atom is container specific, where-as the
decoder shouldn't care what container the media stream is carried in)

Issue: #5938
PiperOrigin-RevId: 261124155
2019-08-01 20:52:22 +01:00
olly
520275ec71 Make OggSeeker.startSeek take a granule rather than a time
PiperOrigin-RevId: 261102180
2019-08-01 20:52:15 +01:00
olly
740502103f Some no-op cleanup for DefaultOggSeeker
PiperOrigin-RevId: 261102008
2019-08-01 20:52:09 +01:00
bachinger
4438cdb282 return lg specific mime type as codec supported type for OMX.lge.alac.decoder
ISSUE: #5938
PiperOrigin-RevId: 261097045
2019-08-01 20:52:01 +01:00
Oliver Woodman
309d043cee Merge pull request #6239 from ittiam-systems:vorbis-picture-parse
PiperOrigin-RevId: 261087432
2019-08-01 20:51:40 +01:00
olly
e159e3acd0 Mp3Extractor: Avoid outputting non-zero position seek frame as a sample
Checking inputPosition == 0 isn't sufficient because the synchronization
at the top of read() may advance the input (i.e. in the case where there's
some garbage prior to the seek frame).

PiperOrigin-RevId: 261086901
2019-08-01 20:50:53 +01:00
olly
3e99e7af54 Clean up some Ogg comments & document granulePosition
PiperOrigin-RevId: 260947018
2019-08-01 20:50:37 +01:00
olly
b5ca187e85 Mp3Extractor: Avoid outputting seek frame as a sample
This could previously occur when seeking back to position=0

PiperOrigin-RevId: 260933636
2019-08-01 20:50:29 +01:00
olly
58e70e8351 Update javadoc for TrackOutput#sampleData to make it more clear that implementors aren't expected to rewind with setPosition()
PiperOrigin-RevId: 260718614
2019-08-01 20:49:45 +01:00
andrewlewis
f5980a54a3 Ensure the SilenceMediaSource position is in range
Issue: #6229
PiperOrigin-RevId: 260500986
2019-07-29 22:34:21 +01:00