391 Commits

Author SHA1 Message Date
tonihei
c9ed9366ce Fix Cronet extension build and test.
Recently added Java 8 features in the cronet extension and the linked native libs
require to enable Java 8 desugaring in gradle. Moreover, junit.assertThrows is not
available in our version and its usage has been replaced by the manual check.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172077967
2017-10-13 19:54:28 +01:00
byungh
3ae4143be3 Cookie-based validation in CronetDataSource
Using cookie validation from streamer, streamer can enforce that only clients who have the cookie are able to stream the video.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171999924
2017-10-13 19:51:38 +01:00
andrewlewis
fc985fe4da Update IMA documentation for AdsLoader
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171533782
2017-10-11 12:29:39 +01:00
andrewlewis
54d3df4b63 Drop to keyframe in LibvpxVideoRenderer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171517156
2017-10-11 12:25:31 +01:00
andrewlewis
e887165955 Provide a getter for IMA's AdsLoader
Issue: #3322

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171508635
2017-10-11 12:24:07 +01:00
andrewlewis
20e43ac4f8 Allow ads to be paused/resumed
Controls are still hidden while playing ads, but if the app pauses the player,
controls will be shown. During ads, the player is not seekable.

When the player enters the background then returns to the foreground, the
content period may not be prepared, so also cache the content window duration.
This means that if the app reenters the foreground while an ad is paused the
time bar can be populated.

Issue: #3303

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171123428
2017-10-11 12:18:45 +01:00
andrewlewis
09165ab870 Rename droppedOutputBufferCount
Now this counter includes input buffers too, which are dropped as part of
skipping to keyframes for catch up.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171119930
2017-10-11 12:17:25 +01:00
andrewlewis
ad500ca871 Replace IMA ad state booleans with an @IntDef
imaPausedInAd could only be true when imaPlayingAd was true, so there are only
three possible states.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=170827974
2017-10-11 12:09:15 +01:00
tonihei
5baddfb56a Add onSeekProcessed callback to Player interface.
This is useful to determine when a seek request was processed by the player
and all playback state changes (mostly to BUFFERING) have been performed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=170826793
2017-10-11 12:07:54 +01:00
hoangtc
7665571ff9 Do not copy data to output frame in libvpx unless necessary.
In out libvpx extension, currently we always call vpxGetFrame and copy the data
from the native decoder to output frame. However, if the inputBuffer has
isDecoderOnly set, we can avoid populating the output buffer, but only setting
BUFFER_FLAG_DECODE_ONLY.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=170318527
2017-10-03 08:50:10 +01:00
tonihei
52de36c5eb Add abstract, default Player event listener.
This allows simplified listener implementations as most listeners
will not listen to all possible notifications.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=170177821
2017-10-03 08:44:33 +01:00
olly
b17a6ba51d Add TODO to respect FLAG_ALLOW_GZIP in CronetDataSource
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169927989
2017-09-26 14:05:16 +01:00
strobe
c6bc30bab7 Add NEON-accelerated HDR conversion routines to VPX.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=169919087
2017-09-26 14:03:50 +01:00
andrewlewis
58293abc11 Remove IMA dependency and add AdsMediaSource
AdsMediaSource lives in the core library so only ImaAdsLoader remains in
the ima extension. AdsMediaSource takes an AdsLoader implementation.

ImaAdsMediaSource is deprecated rather than removed for now.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168707921
2017-09-15 23:41:59 +01:00
andrewlewis
f2aed7186e Workaround the skip ad button not being focused
Issue: #3258

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168669969
2017-09-15 23:39:19 +01:00
tonihei
7d59383cc4 Add reason to onPositionDiscontinuity.
This allows listeners to easily determine the source of the discontinuity.
Reasons can be period transitions, seeks, and internal reasons.

Listeners still using the deprecated ExoPlayer.EventListener interface were
updated to Player.EventListener.

GitHub: #3252

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168549612
2017-09-15 23:36:46 +01:00
aquilescanta
f257300d8e Add tv module for USB tuner support + demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168366847
2017-09-15 23:30:41 +01:00
olly
75d5adce6f Update dependency versions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168194589
2017-09-15 23:23:16 +01:00
olly
4869a25069 Pick up rtmpClient fix
Issue: #3156

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167718081
2017-09-06 15:58:02 +01:00
olly
17232f58a3 Fix position reporting during ads when period has non-zero window offset.
Reporting incorrect positions for ad playbacks was causing IMA to
think the ad wasn't playing, when in fact it was.

Issue: #3180

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167702032
2017-09-06 15:49:34 +01:00
andrewlewis
e16610a82c Fix import formatting
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167584287
2017-09-06 15:44:01 +01:00
andrewlewis
c9f31a41cd Adding missing license header in IMA build.gradle
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167496569
2017-09-04 16:31:51 +01:00
hoangtc
0d86f4475c Remove the resampling to 16bit step from FlacDecoder.
Currently FlacDecoder/FlacExtractor always perform resampling to 16bit. In some
case (with 24bit audio), this might lower the audio quality if the system
supports 24bit audio.
Since AudioTrack implementation supports resampling, we will remove the
resampling step, and return an output with the same bits-per-sample as the original stream.
User can choose to re-sample to 16bit in AudioTrack if necessary.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167494350
2017-09-04 16:30:37 +01:00
anjalibh
7804c2b079 HDR 10 bits: Use a separate sampler for U and V dithering.
Using the same sampler introduced some minor horizontal scratches.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167347995
2017-09-04 10:27:38 +01:00
bachinger
84c13ccbf3 Support setRepeatMode (and move shuffle action to PlaybackController)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167013507
2017-08-31 16:31:10 +01:00
olly
049d41db2a Add license notes for extensions with non-Google dependencies
Issue: #3197

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166988657
2017-08-31 16:28:22 +01:00
olly
55e928f75a Make LeanbackPlayerAdapter use a ControlDispatcher + Misc cleanup
1. Make LeanbackPlayerAdapter use a ControlDispatcher. This
   allows apps to suppress control events in some circumstances,
   and is in-line with our mobile controls.
2. Misc simplifications and cleanup to LeanbackPlayerAdapter.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166852816
2017-08-29 23:13:13 +01:00
olly
44dc3c3ab3 Make all renderers DRM aware
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166852758
2017-08-29 23:11:55 +01:00
aquilescanta
aafdd2267a Add media queue support to CastPlayer
Also workaround the non-repeatable queue and fix other minor issues.

Issue:#2283

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166848894
2017-08-29 23:09:03 +01:00
bachinger
01f4819844 Introduce MediaSessionConnector.CommandReceiver interface and add TimelineQueueEditor.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166475351
2017-08-29 23:00:03 +01:00
bachinger
1305b1155b Migrate MediaSessionConnector to API 26 for shuffle mode.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166198698
2017-08-29 22:49:28 +01:00
tonihei
bd81181892 Add shortcut methods to query next or previous window index.
This functionality is most likely needed by UI modules which currently need
to obtain the timeline, the current repeat and shuffle modes and are only then
able to query the next/previous window index using this information.

Adding these methods simplifies these cumbersome requests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166181202
2017-08-29 22:40:13 +01:00
tonihei
10f1bd7396 Add shuffle mode parameter to Timeline interface methods.
This parameter is used by methods such as getNextWindowIndex
and getPreviousWindowIndex to determine the playback order.
Additionally, there are method to query the first and last
window index given the shuffle mode.

None of the timeline implementations nor the ExoPlayer
implementation supports shuffling so far.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166170229
2017-08-29 22:37:27 +01:00
tonihei
6a8c99d037 Support shuffle mode in MediaSessionConnector.
Changes to the player's shuffle mode are forwarded to the media session.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166057425
2017-08-22 16:24:45 +01:00
tonihei
b9a6a40539 Add listener callback for shuffle mode changes.
The listener implementations do not do anything yet.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166056933
2017-08-22 16:23:27 +01:00
tonihei
c1d7e5bf9d Add set/getShuffleModeEnabled to Player interface.
And implement a basic version of the methods in all implementations.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166041342
2017-08-22 16:19:25 +01:00
olly
f1b3f3a177 Fix broken link + minor doc tweak
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165920927
2017-08-22 16:15:29 +01:00
olly
106d88df41 Some no-op LeanbackPlayerAdapter cleanup
- Have a single inner class for all listeners. This is inline
  with what we do elsewhere in the library.
- Avoid repeated getCallback() calls within methods.
- Seek to default position from ended state, rather than 0.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165603927
2017-08-17 23:02:16 +01:00
olly
34960ad891 Tweak and add READMEs + remove refs to V1
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165578518
2017-08-17 22:59:34 +01:00
aquilescanta
04d76fa8fc Allow easier ExoPlayer/Cast integration
This CL adds the fundamental pieces for ExoPlayer/Cast integration and includes a
demo app to showcase this functionality. However, media queues should be supported
in the first release of this extension.

Issue:#2283

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165576892
2017-08-17 22:56:52 +01:00
andrewlewis
1cfd246cd3 Update extension README with usage instructions
Issue: #3162

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165572088
2017-08-17 22:55:37 +01:00
olly
757bcf7c63 Update instructions to include Google Maven repository
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165291982
2017-08-17 22:39:15 +01:00
olly
08d16c55d4 Some Leanback extension + minVersion bump fixes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165219604
2017-08-17 22:36:47 +01:00
susnata
c9393db878 Creating an leanback extension for ExoPlayer. Leanback added support for new
transport control, which allows developers to plug in any media player. This
extension provides the PlayerAdapter implementation for ExoPlayer.

Demo:
https://drive.google.com/open?id=0B1GHUu5ruGULZTJVV1pVNlBuVjQ

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165183497
2017-08-17 22:34:10 +01:00
olly
40f34956a8 Bump minimum and target API levels + support lib version
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164863447
2017-08-11 15:01:43 +01:00
bachinger
ab277675a1 set mediaSession flags properly and keep queue in sync when timeline changes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164774783
2017-08-10 13:21:47 +01:00
olly
b6b84839ed Add ErrorMessageProvider to util package
It's needed in multiple places. MediaSessionConnector uses it
today. Our leanback connector will also use it. Maybe
SimpleExoPlayerView should use one too, to show the message to
the user when an error occurs.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164720020
2017-08-10 13:19:12 +01:00
olly
55d1abaa21 Document usage of the RTMP extension
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164706135
2017-08-10 13:17:13 +01:00
olly
98d50c13ef Clean up terminology for MediaSession extension
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164705750
2017-08-10 13:14:27 +01:00
olly
d4c45861f4 Clean up extension READMEs
Issue: #1157

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164434768
2017-08-07 11:54:21 +01:00