5790 Commits

Author SHA1 Message Date
aquilescanta
9ec14d1ada Fix SCTE-35 timestamp adjustment
Issue:#4573

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206737252
2018-08-01 13:49:20 +01:00
andrewlewis
e2bf474c1e Extend Nexus Player mono workaround to Oreo
The platform fix was merged into O MR1, not O. Nexus Player has
not received this build.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206734342
2018-08-01 13:49:20 +01:00
andrewlewis
19d24ac633 Remove extra brackets
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206725219
2018-08-01 13:49:20 +01:00
andrewlewis
ded2b2eb2a Allow outputting audio to a WAV file
Add TeeAudioProcessor that doesn't modify the input audio but writes it to an
AudioBufferSink, and WavFileAudioBufferSink for writing audio to a .wav file.

This is intended to be used for diagnostics and debugging.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206717458
2018-08-01 13:49:20 +01:00
andrewlewis
68add98c23 Fix detection of TrueHD syncframe in MatroskaExtractor
MatroskaExtractor was checking for INDEX_UNSET as the sample count for buffers
not containing syncframes, but actually 0 was returned for these. Theoretically
this could prevent us starting to play a TrueHD stream as we wait until we can
read the sample count from a syncframe before accepting the audio in
DefaultAudioSink, but it seems that rechunking avoided this issue arising in
practice.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206575462
2018-08-01 13:49:20 +01:00
tonihei
656c2172dd Fix event reporting for merging and looping media sources.
The looping media source doesn't convert the media period id to the externally
visible media period id. And the merging media source reports media period
creations multiple times which will break listeners assuming a media period
with a specific id will only be created once.

Also amend the doc for MediaSource.createPeriod to reflect that media periods
created in parallel do not actually have the same id.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206327241
2018-08-01 13:49:20 +01:00
tonihei
a237ae1810 Fix period transition with non-zero start position.
Period transitions with non-zero start position happen too early as the
playing period is advanced as soon as the renderer offset is reached not
taking into account that the start position needs to be added to that.

Issue:#4583

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206310328
2018-08-01 13:49:20 +01:00
andrewlewis
6a2f94ec4b Document top-level limitation of AdsMediaSource
Issue: #4591

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206307948
2018-08-01 13:49:20 +01:00
andrewlewis
0c0c5942ab Fix incorrect channel configuration for 8 ch pre-M
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
2018-08-01 13:49:20 +01:00
eguven
30fecb71d2 Fix TouchTrackerTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206304655
2018-08-01 13:49:20 +01:00
aquilescanta
4eee474555 Remove minLoadableRetryCount from HLS components
Remove minLoadableRetryCount from HLS components in favor of
LoadErrorHandlingPolicy#getMinimumLoadableRetryCount.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206298419
2018-08-01 13:49:20 +01:00
andrewlewis
877837c893 Add audio/eac3-joc to FFmpeg supported formats
If compiled with eac3, audio/eac3-joc stream 5.1 bed-channels
can be decoded. The stream will be decoded as 2-D rather than
3-D.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206296930
2018-08-01 13:49:20 +01:00
tonihei
d3c2cb2aa4 Update remaining DataSource's with new addTransferListener method.
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
2018-08-01 13:49:20 +01:00
Gleb Pinigin
8f624861e1 WebvttExtractor: make public to allow create custom HlsExtractorFactory outside of library 2018-07-31 19:45:30 +07:00
Arnold Szabo
dbd25d5854 #4304 - Adjustments after code review 2018-07-27 13:41:02 +03:00
Jovche Mitrejchevski
5635ca2792 Reset aspect ratio 2018-07-27 12:03:39 +02:00
Arnold Szabo
1f12f22bb5 #4304 - Add option to show buffering view when setPlayWhenReady is false 2018-07-27 00:49:11 +03:00
Oliver Woodman
3b61a400c5 Remove stray file 2018-07-26 19:06:33 +01:00
tonihei
133f5f16b8 Pass MediaPeriodId to DeferredMediaPeriod when actual period is created.
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
2018-07-26 18:27:46 +01:00
tonihei
49ef1f3f8c Fix nullness warnings in Util and Assertions, and provide own castNonNull.
Using our own no-op castNonNull prevents linking into checkerframeworks library.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206152148
2018-07-26 18:27:46 +01:00
eguven
26a0ddcaec Disable automatic imports for inner classes
Inner classes generally has generic names and they make sense when they
are considered with the top level class they appear in.

When this setting is disabled, Android Studio inserts import for the top
level class and append the top level class's name before the reference
to the inner class name.

NO_SQ

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206127763
2018-07-26 18:27:46 +01:00
andrewlewis
217247f113 Remove naming assumption for passthrough decoders
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206119357
2018-07-26 18:27:46 +01:00
andrewlewis
5da703a588 Fix some nullness warnings in audio classes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206021873
2018-07-26 18:27:46 +01:00
hoangtc
d810352f2c Refactor FlacBinarySearchSeeker.
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
2018-07-26 18:27:46 +01:00
Jovche Mitrejchevski
72a2b82370 Suggestions from Code Review 2018-07-26 12:26:29 +02:00
Jovche Mitrejchevski
46232977f6 Convert defaultArtwork from Bitmap to Drawable
Using bitmaps is still supported, but also this will allow using other types of drawables to be set as artwork.
2018-07-26 09:50:55 +02:00
GiuseppePiscopo
7878bf6a31 chore(playlist): reorder message IDs, fix tabbing 2018-07-25 18:31:14 +02:00
GiuseppePiscopo
cc7f011ecb feat(playlist): stick to list.subList API 2018-07-25 18:30:35 +02:00
olly
8952ccac32 Don't exclude .idea from MOE input
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205988261
2018-07-25 15:16:43 +01:00
olly
14216ef53b Nullness fixes for emsg and id3 metadata classes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205972857
2018-07-25 15:14:50 +01:00
tonihei
3d55bc78f7 Use country and network based initial bitrate estimate.
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
2018-07-25 15:13:35 +01:00
Arnold Szabo
ae520a8c2c #4306 - Extract tags from SubRip subtitles, add support for alignment tags based on SSA v4+ 2018-07-25 01:29:07 +03:00
olly
a3e3f64b79 Add PRO7S to surface switch workaround
Issue: #4468

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205821059
2018-07-24 15:01:40 +01:00
olly
0287fa21f3 Add PRO7S to surface switch workaround
Issue: #4468

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205821059
2018-07-24 15:00:16 +01:00
olly
340d846d9b Remove some files from the nullness blacklist
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205816544
2018-07-24 14:59:21 +01:00
tonihei
138b222457 Prevent dummy period id in ExoPlayerImplInternal from leaking into actual use.
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
2018-07-24 14:58:04 +01:00
tonihei
ffdc17d0e0 Remove generic type parameter from TransferListener.
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
2018-07-24 14:56:45 +01:00
bachinger
9d0ec37ead Show notification whilst ads are playing but hide playback actions.
Issue:#4535

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205722036
2018-07-24 14:55:24 +01:00
eguven
9c337c8806 Add monoscopic 360 surface type to PlayerView
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
2018-07-24 14:54:05 +01:00
sammon
01b69854ff Refactoring DataSpec constructor calls to use DataSpec.withUri() and DataSpec.subrange().
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
2018-07-24 14:52:58 +01:00
GiuseppePiscopo
2c801ca267 docs(playlist): fix javadoc comments 2018-07-24 10:08:27 +02:00
GiuseppePiscopo
c9b6a73cd8 feat(playlist): add API to remove range of indices 2018-07-24 10:08:27 +02:00
Jovche Mitrejchevski
1f1762538f Support vector drawables to be used as default artwork 2018-07-24 08:16:53 +02:00
olly
a3de7bf399 Update release notes + bump version
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205660355
2018-07-23 16:04:31 +01:00
olly
61b838f414 Update release notes + bump version
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205660355
2018-07-23 15:57:51 +01:00
tonihei
5933d92394 Add simplified Dash and Ss media source factory constructors.
As the manifest and media data sources can be the same now, we can provide
a simplified constructor with just one data source factory.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205658046
2018-07-23 15:55:57 +01:00
Oliver Woodman
b0f44029b7 Clean up release notes 2018-07-23 14:49:33 +01:00
andrewlewis
f39d28135d Pass through all ID3 internal data from udta
Also switch from using a CommentFrame to a new InternalFrame type for ID3 data
stored with ID '----', to distinguish internal data from actual ID3 comments.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201315254
2018-07-23 14:36:37 +01:00
olly
224d0c2b2c Add isControllerVisible
Issue: #4385

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=200986828
2018-07-23 14:35:14 +01:00
Oliver Woodman
dcd549bd3e Fix release branch 2018-07-23 14:06:29 +01:00