374 Commits

Author SHA1 Message Date
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
andrewlewis
c449bae51a Log IMA LOG AdEvent ad data
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164267555
2017-08-04 18:00:00 +01:00
andrewlewis
287b999723 Fix detection of postroll when seeking to duration
Also mark all ads as played when the postroll plays, in the case the
player is backgrounded then resumed and the user seeks back.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164262738
2017-08-04 17:58:32 +01:00
olly
40f3f1cb78 Decrease number of Vpx input buffers
I think they're excessively sized also, but changing that
is a little more risky. And we should look at investigating
the input buffer size for all our decoder extensions,
rather than just this one.

Issue: #3120

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164234087
2017-08-04 12:38:03 +01:00
tonihei
6f7dc974c9 Add forwarding timeline to prevent repetition of boiler-plate code.
Multiple timelines work as a wrapper around another timeline and forward
most of the method calls to the wrapped timeline. Added a base class meant to
be overridden which handles all the boiler-plate forwarding.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164117264
2017-08-04 12:28:19 +01:00
olly
78cdd08684 Add some missing @param Javadoc to extensions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164105607
2017-08-03 14:45:45 +01:00
olly
147d5bb3b2 Fix targetSdkVersion to be consistent with gradle builds
The manifest value is always overridden in gradle builds,
so this is for internal builds only. The value should be
the same (i.e. 25!).

Also fix IMA build to force the right support library
version, attempt 2!

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164103183
2017-08-03 14:44:26 +01:00
aquilescanta
a5f9f40bf0 Replace README reference to source with reference to javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164090619
2017-08-03 14:41:48 +01:00
olly
412138b2ea Some extractor fixes
- Fix Ogg extractor to work without sniffing.
- Fix extractors to handle seek() before init().
- Add tests for both issues.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163992343
2017-08-02 17:44:41 +01:00
olly
13513b9c3e Clean up MediaSessionExt documentation
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163828712
2017-08-01 16:23:39 +01:00
olly
957158b7ff Fix 2.5.0 lint errors
- Publish IMA extension
- Force IMA to use the correct version of the support library
- Add missing sr translations for repeat mode strings

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163705883
2017-07-31 21:19:42 +01:00
andrewlewis
cdeea27973 Handle release() while initializing the ads manager
Also don't detach any attached player in release() to prevent a possible
NullPointerException if ImaAdsLoader.release() runs first, then the MediaSource
is released and detaches the player. This is safe because if the loader was
attached it's guaranteed to be detached.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163673750
2017-07-31 21:13:00 +01:00
andrewlewis
1f0c85bd73 Allow apps to handle ad clicked/tapped events
Issue: #3106

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163455563
2017-07-31 21:09:00 +01:00
eguven
9936bc6702 Replace iterable foreach loops with indexed for loops
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163193118
2017-07-31 20:55:34 +01:00
eguven
cdb71a80aa Remove empty line after copyright text
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163186057
2017-07-31 20:52:49 +01:00
olly
4436e94ba8 Hardcode libopus output frequency to 48000Hz
Issue: #3080

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162746202
2017-07-21 17:37:56 +01:00
andrewlewis
cdfe57833d Update IMA extension README
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162742982
2017-07-21 17:36:31 +01:00
bachinger
6f600a8fa5 Take care playback preparer and queue navigator can not register overlapping
playback actions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162736210
2017-07-21 16:10:10 +01:00