337 Commits

Author SHA1 Message Date
olly
ba9114c9c7 Automatically use DummySurface when possible
Issue: #677

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157831796
2017-06-06 16:29:33 +01:00
anjalibh
7d4eaa74f7 Expose the HDR ColorInfo in the VpxOutputBuffer so the renderer can use it.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157267699
2017-05-31 11:41:01 +01:00
andrewlewis
b31ec337ed Enable neon for libvpx on arm64-v8a
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=156077889
2017-05-17 16:48:07 +01:00
tonihei
4d1826dd3d Add repeat mode mechanics to Exoplayer.
(Relating to GitHub Issue #2577)

All getter, setter and callbacks have been added and value of repeatMode is
passed to getNextXXXIndex methods.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155071985
2017-05-04 20:55:48 +01:00
aquilescanta
3a5548d72a Fix javadocs typos
Issue:#2773

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=155062917
2017-05-04 20:54:34 +01:00
vigneshv
f9c3742354 vp9_extension: Include cstring explicitly
Without this, newer android NDKs (r14+) fail to compile.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=154271517
2017-04-26 15:17:41 +01:00
vigneshv
9d76ab7133 vp9_extension: Update libyuv build configuration
Disable libjpeg dependency when building libyuv.

Partially fixes Github Issue #2661

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=154179126
2017-04-26 15:12:51 +01:00
olly
fb88087ac4 Tweak video renderer surface swaps
Fixes the following issues:

1. When a surface is set, it's expected that the renderer will
notify video size + when a frame is rendered to it. This is true
even if the surface isn't changing. Right now this is achieved
by setting renderedFirstFrame to false, but this is problematic
in the case that the surface isn't changing because (a) it will
force rendering of a subsequent frame to the output even when
paused, which is incorrect, and (b) isReady will return false
until this occurs.

2. When the surface really is changing, isReady can return false
until the first frame has been rendered into the new surface, which
will break seamless surface switching. This change allows isReady
to return true up to allowedJoiningTimeMs for this case.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=154171111
2017-04-25 16:35:40 +01:00
tasnimsunny
e1c82fbb1a Libvpx: configure a way in Medialib to drop frames instead of video lag.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=153858804
2017-04-24 21:33:01 +01:00
olly
cf4358b8fa Fix VP9 extension surface attach/detach + make it seamless
Issue: #2582

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=152494408
2017-04-11 12:15:03 +01:00
olly
035fab225d Rename skipToKeyframeBefore -> skipData and allow skipping to EOS
This change also ensures that format changes are read whilst the
renderer is enabled but without a codec. This is necessary to
ensure the drm session is updated (or replaced).

Updating the format is also needed so that the up-to-date format is
used in the case that the codec is initialized later due to the
surface being set. Previously, if an ABR change occurred between
the format being read and the surface being attached, we would
instantiate the codec and then immediately have to reconfigure it
when as a result of reading the up-to-date format. For a non-adaptive
codec this resulted in the codec being immediately released and
instantiated again!

Issue: #2582

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151608096
2017-03-31 19:11:08 +01:00
olly
9bc20d23a8 Print when frame is rendered in EventLogger + tidying
This is the boring part of a larger change that fixes
how video renderers behave when surfaces are attached and
detached whilst they're enabled or started.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151563031
2017-03-31 19:10:07 +01:00
andrewlewis
0e6ef0edf6 Add Sonic library for audio speed adjustment.
Add methods to ExoPlayer for setting/getting the playback speed, using
SonicAudioProcessor.

Remove PlaybackParams support, as the AudioTrack timestamp does not work
reliably on Marshmallow. The platform also uses Sonic and performance
should be comparable between the Java and native versions on recent Android
runtimes.

In a later change, SonicAudioProcessor will be made public so it can
be used in conjunction with other processors.

Issue: #26

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151027121
2017-03-23 19:14:48 +00:00
olly
382ba7ecf0 Generate combined Javadoc
Notes:
- Now only generating a single module Javadoc task for the
  release variant.
- Combined Javadoc now includes extensions. VP9 is excluded
  for now since it's failing for an unknown reason.

Issue: #2139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150865589
2017-03-22 19:11:28 +00:00
olly
88e74ef381 Generate Javadoc for each module individually
Notes:
- The VP9 one is failing claiming that the util package
  doesn't exist and that LibraryLoader cannot be found.
  Unsure why, since it appears to be setup exactly like
  other extensions (e.g. Opus) that does work.
- @link across modules will not work when generating
  Javadoc for a single module. This is WAI. I subsequent
  change will add an aggregated Javadoc generator that
  will generate Javadoc for all modules together and
  apply cross module @link correctly.

Issue: #2139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150864273
2017-03-22 19:10:15 +00:00
vigneshv
b6a1d0a55d extensions/vp9: Update filter & remove sort in libvpx.mk
Update the filter that selects %.asm.[sS] and remove the
"remove duplicates" step in the android makefile.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150728021
2017-03-22 19:02:44 +00:00
vigneshv
c8b9c7fe68 extensions/vp9: Control symbol visibility with libvpx.ver
This change reduces the final .so size by ~9% for armv7/arm64.

Arch : Size_before : Size_after
armeabi-v7a : 300548 : 271876
arm64-v8a : 247632 : 223056

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150648668
2017-03-22 19:01:24 +00:00
olly
ce55d1a712 Modularize ExoPlayer steps 1 + 2.
1. Move entire library from v2/library/ to v2/library/core
2. Add v2/library/all that depends on v2/library/core

Issue: #2139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150455693
2017-03-22 18:49:30 +00:00
anjalibh
8cad99ba98 Add lightweight dithering to 10->8 bit conversion.
Also optimize / 4 and % 4. I assumed the compiler would do this automatically but the performance bump implies it's not doing that.

           Before | Optimized
No dither: 4.8 ms | 3.5 ms
Dither   : 9.6 ms | 4.2 ms

Before: https://drive.google.com[]file/d/0B07DogHRdEHcaXVobi1wZ2wxeUE/view?usp=sharing
After: https://drive.google.com[]file/d/0B07DogHRdEHcVS1PN05kaU1odm8/view?usp=sharing

Known issue: The remainder from the last Y pixel will leak into the first U pixel. Also U and V remainders leak into each other but I don't think it causes any perceptual difference.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150255151
2017-03-16 16:10:46 +00:00
vigneshv
ccc5e472b0 extensions/vp9: Fix open source build scripts
Fixes github issue #2339 [https://github.com/google/ExoPlayer/issues/2339]
Fixes github issue #2551 [https://github.com/google/ExoPlayer/issues/2551]

* Update the instructions to check out specific versions of libvpx and
  libyuv that are known to work with our build scripts.
* Forcing a particular version of libyuv because recent versions of
  libyuv are dependent on libjpeg (which isn't needed for the purpose
  of this extension).
* Going forward, let's keep generate_libvpx_android_configs.sh in sync
  with whatever version is specifed in the instructions in README.md
  (as of now it is v1.6.1).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150208517
2017-03-15 18:51:10 +00:00
olly
204537ed40 Pre-modularization cleanup
- Use a variable for the (default) minSdkVersion. There will
  be more modules that need it, and it'll be easier to manage
  if it's in one place.

Issue: #2139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150050663
2017-03-15 15:44:46 +00:00
anjalibh
84def0d048 Implement VP9 profile 2 - 10 bit BT2020 support with libvpx. This code truncates the 10 bits to 8. We'll later update this to upload half-float or 16 bit short textures.
Pending: Convert BT2020 to DCI-P3 before render.

I'll add the same code to V2 after initial review.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148403349
2017-02-28 13:47:18 +00:00
olly
d99cb28e6a Correctly handle a SampleStream ending without providing a format
I'm going to introduce an EmptySampleStream that will be used in
some cases in conjunction as part of 608/EMSG support. This change
avoids EmptySampleStream having to provide a dummy format.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148383831
2017-02-28 13:47:18 +00:00
olly
3bc320faaf Fix misleading method names.
Issue: #2414

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=147325759
2017-02-15 17:00:40 +00:00
olly
1eede5d5bb Fix gradle/proguard setup
- Add proguard rules for libraries/extensions into .aar files
- Add proguard rules to retain CEA608/708 decoder constructors
- Remove lots of default config from gradle files
- Remove disabling of abort on lint error
- Enable optimizations on release builds of demo app

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144350233
2017-01-13 17:27:25 +00:00
olly
61c9c16954 Make sure we report video size after Surface is set
Issue: #2077

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139451511
2016-11-18 12:50:41 +00:00
hoangtc
74383716a6 Update exoplayerv2 vp9 extension.
Reset RenderedFirstFrame when setting OuputBufferRenderer.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139100783
2016-11-18 12:45:24 +00:00
vigneshv
ee8a7f17ff vp9_extension: Fix potential integer overflows
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138652561
2016-11-10 21:15:21 +00:00
hoangtc
4cd8c77053 Add layer of indirection for DRM.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138383979
2016-11-10 21:14:29 +00:00
olly
2c54363204 Report track groups and selections through ExoPlayer
TrackSelector no longer has a listener. Instead, tracks
change events are reported through ExoPlayer.EventListener.
Applications interested in retrieving the selection info
should retrieve it directly from the TrackSelector by
calling an exposed getter.

Pretty sure the ref'd issue is fixed as a side effect of
this change.

Issue: #1942

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137183073
2016-10-27 12:27:55 +01:00
andrewlewis
a0fe258e8d Fix/suppress some analysis warnings.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136710546
2016-10-24 11:44:49 +01:00
olly
eaf8218855 Fix shutter open/close behavior
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134389619
2016-09-28 11:26:12 +01:00
olly
de67fa5017 Allow replacement of libraries for Opus/Flac/Ffmpeg too
- Also make some of the naming more concise + misc style cleanup.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132899979
2016-09-13 17:44:10 +01:00
benm
45a5331e30 Add support to VP9 extension for overriding the native library names
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132874777
2016-09-13 17:40:41 +01:00
olly
04c28c6d7d Minimal change to fix seeking before prepare + finalize API
- This change fixes seeking before the prepare (or more
  accurately, before the timeline is set). The fix a minimal
  one to fix the behavior. It's inefficient compared to
  posting the pending seek onto the playback thread, which
  will be the long term solution.
- As of this change, I think we can call V2 "done". There are
  some loose ends to tie up, but the API is effectively
  finalized and the implementation is in a state where you
  can take it, use it and expect it to work.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132468107
2016-09-08 16:29:48 +01:00
benm
36df5bcd84 Fix a warning in libvpxJNI
v2/extensions/vp9/src/main/jni/vpx_jni.cc:63:31: warning: missing field 'w' initializer [-Wmissing-field-initializers]
  vpx_codec_dec_cfg_t cfg = {0};
                              ^

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132461351
2016-09-08 16:29:48 +01:00
olly
a779eabdc5 Update SDK / Tools.
- Centralise compileSdkVersion, targetSdkVersion and
  buildToolsVersion in a single place for gradle.
- Bump compileSdkVersion and targetSdkVersion to 24.
- Bump com.android.tools.build version to re-enable
  instant start.
- Bump targetSdkVersion in manifests (needed for
  internal builds).
- Use standard expandable_list_item from Android in
  the demo app, since ours doesn't look right when
  targeting API level 24. We were also setting the
  theme on the wrong element in the manifest, so I'm
  removing that line.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131929216
2016-09-02 16:12:55 +01:00
olly
962b5940c2 Update ExoPlayer documentation + tweak method naming
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131843222
2016-09-02 16:08:45 +01:00
olly
5f1a2c71f0 Finalize V2 ExoPlayer API
There's still some internal to clean up to do, and in particular
it remains a TODO to be able to handle seek calls before the
timeline is set (for this CL, such calls are dropped). This change
does however finalize the API.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131171318
2016-08-31 15:25:25 +01:00
olly
94c908e89c Rename Window->MediaWindow, Timline->MediaTimeline
Window is potentially confusing with Android's Window class.
Once Window is renamed, it makes sense to rename Timeline too.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130938392
2016-08-31 15:25:24 +01:00
olly
e35f9addaf Remove playWhenReadyCommitted.
This was always a bit of a hack; for Play Movies. It may well
no longer be necessary, and if not I'd like to think of a nicer
or more general way of doing it. We can always bring it back
if needed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130373433
2016-08-31 15:25:06 +01:00
olly
1a909fd163 Change SeekWindow -> Window, and add window duration.
- This avoids the need to have to use the timeline to
  calculate a window duration, which can be awkward.
- Window now represents a window of availability with
  an isSeekable flag, rather than a window of
  seekability.
- Promoted Timeline and Window to top package; they're
  pretty important :).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130278509
2016-08-31 15:25:06 +01:00
andrewlewis
23981a6fc4 Hide the shutter view when no video is being rendered.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129849825
2016-08-10 20:10:14 +01:00
andrewlewis
88bf1d0739 Expose the seekable window.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129747377
2016-08-10 20:07:56 +01:00
andrewlewis
8d122a101d Use new import ordering.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128967776
2016-08-08 11:06:48 +01:00
andrewlewis
f89e170054 Remove --disable-vp10 from vp9 extension configuration.
The option was removed in
67edc5e83b%5E%21/#F2.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128801977
2016-08-08 11:05:29 +01:00
olly
ac59bde2be Fix up a bunch more Javadoc.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128565942
2016-07-28 20:04:40 +01:00
andrewlewis
d657360341 Expose period information from MediaSources.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128357449
2016-07-28 19:39:07 +01:00
olly
ba0a4235a0 Consistent Javadoc for text package
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128160177
2016-07-22 22:41:36 +01:00
eguven
0909446133 Don't let renderer input buffer get too big if codec not available.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128082468
2016-07-22 22:41:36 +01:00