5011 Commits

Author SHA1 Message Date
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
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
tonihei
c24a699b34 Update demo apps to use player-provided default bandwidth meter.
This simplifies the player setup and prevents using deprecated methods in the demo.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205642981
2018-07-23 13:35:08 +01:00
tonihei
1d636520ca Auto-register AnalyticsCollector as bandwidth meter listener.
This allows to automatically forward bandwidth estimate events to
AnalyticsListeners.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205642752
2018-07-23 13:32:44 +01:00
Oliver Woodman
3c4b0aa11b Merge branch 'dev-v2' of https://github.com/peddisri/ExoPlayer into dev-v2 2018-07-23 12:32:18 +01:00
tonihei
a67c73650e Add helper method to get uid of timeline period.
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
2018-07-23 12:22:57 +01:00
tonihei
97e66ef11b Update period index in DashMediaPeriod event dispatcher after manifest update.
Issue:#4492

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205636634
2018-07-23 12:21:44 +01:00
tonihei
0b3fa5176a Move media period end position from MediaperiodInfo to MediaPeriodId.
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
2018-07-23 12:20:28 +01:00
Oliver Woodman
41345dcb83 Simplify DASH live presentation delay override 2018-07-23 10:39:02 +01:00
ojw28
58fcf52b17
Merge pull request #4534 from Chimerapps/dev-v2
Allow specifying the default live presentation delay
2018-07-23 10:37:45 +01:00
olly
d2eb3fbefa Cleanup: Remove unnecessary generic types
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205409290
2018-07-23 10:25:23 +01:00
olly
7551d98087 Cleanup: Use lambdas for extractor factories
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205407693
2018-07-23 10:24:09 +01:00
tonihei
8be95042cc Fix typo in variable name.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205405072
2018-07-23 10:22:50 +01:00
Oliver Woodman
badd9356f8 Refine use of KEY_OPERATING_RATE 2018-07-20 16:15:30 +01:00
ojw28
f4219b55e6
Merge pull request #3634 from jinminghe/bugfix/format
Set KEY_OPERATING_RATE for MediaCodecVideoRenderer.
2018-07-20 16:12:04 +01:00
bachinger
1699876aab call stop(true) when media action stop is received
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205377624
2018-07-20 16:09:49 +01:00
tonihei
0721d372a7 Fix issue with keeping window sequence number after repeated seeks.
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
2018-07-20 16:08:51 +01:00
andrewlewis
b654806996 Add support for setting companion ad slots
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=205373398
2018-07-20 16:07:31 +01:00
hoangtc
ce62934861 Fix a bug with VideoRendererOutputCapturer when extracting frames of different size
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
2018-07-20 11:01:54 +01:00
Nicola Verbeeck
cf99963aab Typo in docs 2018-07-19 11:53:42 +02:00
Nicola Verbeeck
26a7516b55 Updated formatting 2018-07-19 11:22:03 +02:00
Nicola Verbeeck
fbc0db965a Updated formatting
Added constructor and field in source itself
2018-07-19 11:20:18 +02:00
Nicola Verbeeck
e6d32d3fb5 Updated formatting 2018-07-19 11:04:28 +02:00
Nicola Verbeeck
fbef465ca8 Allow specifying the default live presentation delay instead of using hardcoded constant 2018-07-19 10:58:58 +02:00
tonihei
a076924caa Simplify using DataSource factories without a TransferListener.
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
2018-07-17 20:40:56 +01:00
tonihei
59b18a52d2 Make passing BandwidthMeter to TrackSelector and TrackSelection non-optional.
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
2018-07-17 20:38:34 +01:00
olly
972fd0ced8 Use maxInputSize for extension decoders where possible
Issue: #3120

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204898773
2018-07-17 20:37:13 +01:00
olly
73af056da3 Widen setOutputSurface workaround
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
2018-07-17 20:35:51 +01:00
aquilescanta
f155aa2563 Add getMinimumLoadableRetryCount to LoadErrorHandlingPolicy.
This will allow deduplicating the argument from all Loader clients.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204889331
2018-07-17 20:34:36 +01:00
tonihei
6aab2bdc55 Set bandwidth meter at player level.
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
2018-07-17 20:32:59 +01:00
tonihei
74dadae520 Make values forwarded to bandwidth listener final again.
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
2018-07-17 20:30:13 +01:00
olly
b25a124239 HLS: Fill primary sample formats with track format info (e.g. bitrate)
Issue: #3297

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204732266
2018-07-17 20:28:52 +01:00
eguven
7b2da629ea Make it possible to disable DownloadService notifications
Issue: #4389

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204728270
2018-07-17 20:27:30 +01:00
olly
8f0729b5ad Add AudioListener (audio equivalent to VideoListener)
Issue: #3994

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204722997
2018-07-17 20:26:27 +01:00
aquilescanta
e247a08a36 Parameterize load error handling in HLS
Issue:#2844
Issue:#2981

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204718939
2018-07-17 20:25:18 +01:00
olly
e2059eabe1 Enhance copyWithManifestFormatInfo to handle muxed manifest formats
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204470264
2018-07-17 20:22:33 +01:00
olly
450448b220 Fix bug where sourceId wasn't set for the first chunk
The sample queues haven't been created when the first init call
occurs. In this case we need to set sourceId when we subsequently
create the queues.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204467538
2018-07-17 20:21:10 +01:00
olly
ef728178a8 Improve format derivation for chunkless preparation
1. Copy label into derived formats
2. If audio is the primary track type, copy additional fields from
   the variant formats. This is probably a no-op in practice, since
   I don't think variant formats have these fields set anyway, but
   it seems like the right thing to do in case they ever are set in
   the future.

Note: It's a bit strange to use createXContainerFormat rather than
createXSampleFormat, but in practice the methods used here are
better matched for what we're trying to do.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204467287
2018-07-17 20:19:57 +01:00
hoangtc
19cc2c822a Fix a bug with TTML using font size as % of cellResolution.
After [] we support default font size for TTML, relative to the cellResolution of the document. However, this introduced a bug that makes TTML font-size in such case always follow the cellResolution font size, even when SubtitleView.setApplyEmbeddedStyles(false) and SubtitleView.setApplyEmbeddedFontSizes(false) were used.

This CL updates the fix so that the default font-size using cellResolution works in the same way as other embedded styles, and can be turned off using setters from SubtitleView.

GitHub: #4491

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204467033
2018-07-17 20:18:52 +01:00
hoangtc
7cba5429fc Add supports for frame-capture retrying for MetadataRetriever.
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
2018-07-17 20:17:36 +01:00
olly
cba6da8906 No-op cleanup of DashTimeline
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204451894
2018-07-17 20:16:14 +01:00
olly
18ab4b9112 Fix / improve format merging
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
2018-07-17 20:13:23 +01:00
andrewlewis
a26bb350ee Add IMA and FLAC tests to the codebase
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=204302135
2018-07-17 20:10:20 +01:00
Jinming he
5cdb886db1 Address comments. 2018-07-16 21:36:00 +08:00
Jinming he
db53606c1d Merge master into bugfix/format. 2018-07-16 21:04:25 +08:00
Oliver Woodman
05a31dfd24 Format cleanup 2018-07-12 16:08:11 +01:00