170 Commits

Author SHA1 Message Date
olly
a24f2b75b0 Host GTS content ourselves + prevent spurious test passes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165561808
2017-08-17 22:54:12 +01:00
olly
cf6534ea5b SegmentDownloader loadManifest cleanup.
- HlsDownloader.loadManifest (previously called getHlsPlaylist)
  suppressed errors for the offline case, where-as the DashUtil
  equivalent method did not. This change makes them consistent
  and moves both other to use ParsingLoadable.
- Enable GZIP for manifest loads in both cases.
- Use Uri rather than String to represent Uris. Previously the
  strings were parsed into Uris quite deep in the code, which
  isn't ideal if the parsing fails; you'd probably prefer the
  error to occur early at the top level.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165181398
2017-08-17 22:32:57 +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
aquilescanta
a82e51070b Add playback tests for CENC/DASH streams.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160825705
2017-07-05 15:02:39 +01:00
olly
4a59c7cf40 Make it easier to use ExoPlayer modules in other projects II
With this change, it becomes possible to depend on ExoPlayer
locally in settings.gradle by doing:

gradle.ext.exoplayerRoot = 'path/to/exoplayer/root'
apply from: new File(gradle.ext.exoplayerRoot, 'core_settings.gradle')

You can optionally add a prefix onto ExoPlayer's module names
by adding:

gradle.ext.exoplayerModulePrefix = 'prefix'

Issue: #2851
Issue: #2974

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160277967
2017-06-28 22:26:05 +01:00
olly
2a8eb5a2a1 Make it easier to use ExoPlayer modules in other projects
It's currently difficult to use ExoPlayer modules in other gradle
projects because they rely on constants and dependencies defined
in our own top level gradle file. This change moves the constants
into a separate file referenced directly from each module. It also
removes the need for the top level gradle file to declare a
dependency on com.novoda:bintray-release. This is now only needed
if "exoplayerPublishEnabled = true" is specified.

Issue: #2851
Issue: #2974

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160272072
2017-06-28 22:26:05 +01:00
tonihei
cdad6a4ef1 Move playback test utils to testutils.
This allows other tests to reuse the util classes without having to link to playbacktests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158214560
2017-06-12 10:18:50 +01:00
tonihei
edbc2046e2 Clean-up manifest merge attributes.
1. Remove tools:replace in manifest files. This attribute is only needed to establish priority when two manifests are merged and have the same attribute with different values.
As this is not happening here, the attributes can be removed.

2. Some BUILD files also define a deprecated manifest merge strategy different from the android default merge strategy. For consistency these are set to "android'.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158075128
2017-06-06 16:38:45 +01:00
olly
e98bee6163 Add surface attach/detach to *WithRendererDisabling tests
This will cause the test to exercise the code path of
instantiating a DummySurface, rendering to it for 10
seconds, then re-targeting the real surface again. For
secure content tests the code path is only exercised if
DummySurface.SECURE_SUPPORTED is true. The logic for
checking this is within MediaCodecVideoRenderer itself,
rather than being part of the test.

Issue: #677

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=157833026
2017-06-06 16:30:41 +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
olly
1e12c07954 Move renderer building into a factory class.
To inject custom renderers into SimpleExoPlayer, developers
currently need to extend SimpleExoPlayer and override the
renderer building methods. This is in contrast to the rest
of the library, where we use proper injection. This change
restores consistency. I think it's fine to make
SimpleExoPlayer final again, but if we find people extending
it for non-renderer purposes, we can revert that part of the
change.

ExoPlayerFactory now has analogous methods for the simple
and non-simple cases, which is a nice outcome.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=154295726
2017-04-26 15:49:35 +01:00
eguven
103c3b631b Add DashDownloader helper class to download dash streams
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151456161
2017-03-31 19:07:59 +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
7ce8125194 Split DASH into a separate module
Issue: #2139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150762237
2017-03-22 19:09:04 +00:00
olly
b1a2ae1856 Remove DRM->DASH dependency in prep for DASH module split
Also renamed releaseResources->release to be consistent with the
rest of the library, and added some synchronization to ensure
correct usage.

Issue: #2139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150753414
2017-03-22 19:07:53 +00:00
olly
25a093b37c Split HLS into a separate module
Issue: #2139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150643456
2017-03-22 18:59:56 +00:00
eguven
2fe478ad6a Invert DashHostedTest and inner class Builder to make the design more natural
Builder class was renamed to DashTestRunner and DashHostedTest moved
into it as an inner class.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150307988
2017-03-16 16:15:22 +00:00
aquilescanta
ce5c0c18f9 Rename AdaptiveVideoTrackSelection to AdaptiveTrackSelection
This will allow us to use the same class for Audio adaptation.

Issue:#1975

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150302561
2017-03-16 16:13:03 +00:00
olly
70926057c5 Fix some more incorrect playback test stream IDs
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150080957
2017-03-15 15:49:13 +00:00
olly
a26cb9cc3c No-op fix for playback tests
super.onQueueInputBuffer is no longer a no-op in all
configurations. It doesn't make any difference in practice
for these tests, but for completeness we should call up.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150056224
2017-03-15 15:47:03 +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
olly
4b1410bced Simplify + Fix WV encrypted playback tests
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149993442
2017-03-15 15:42:36 +00:00
mishragaurav
15aad266b6 Use separate Widevine license keys to package test audio for Exoplayer GTS.
Android doesn't support secure decoding for audio. Hence use Audio keys that always require L3 support only.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149764063
2017-03-13 15:54:10 +00:00
eguven
af98ca661a Refactor DashTest class
Moved DashHostedTest to top level classes. Added DashHostedTest.Builder. Move widevine offline tests to separate class with custom setUp and tearDown methods.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146118310
2017-02-15 16:36:24 +00:00
olly
25c18ca1b4 Re-add playback tests to Moe migration
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145583193
2017-01-25 20:56:20 +00:00
eguven
9ac0add4be Add a BUILD file with mobile harness target to playbacktests/src/androidTest folder
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145267137
2017-01-24 14:25:47 +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
e125ed705e Report tunneling support via RendererCapabilities API
Also revert ability to query for a decoder that explicitly
supports tunneling, since in the new design we'll just be
querying the first decoder provided by the MediaCodecSelector
and then reporting what it supports. This is in line with
what we do when reporting support for adaptive switching.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144315746
2017-01-13 17:27:25 +00:00
eguven
9d5c750fe9 Support offline drm key downloading and restoring
Renamed StreamingDrmSessionManager to DefaultDrmSessionManager and added functionality to download, restore, renew and release offline keys. Added a utility class, OfflineLicenseHelper, to facilitate use of DefaultDrmSessionManager for downloading, renewing and releasing offline keys.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143769955
2017-01-06 16:56:31 +00:00
olly
9f81b72291 Fix GTS playback test timestamp verifications
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143549680
2017-01-04 23:07:57 +00:00
olly
46245251e1 Fix bad indent + clean up Format formatting
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143469714
2017-01-04 23:04:07 +00:00
ojw28
163a3a7bb8 Delete HlsTest.java 2016-12-21 00:51:30 +00:00
Oliver Woodman
86adc64403 Delete CS classes 2016-12-14 23:00:10 +00:00
olly
88d2a6a348 Bump version + update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142015031
2016-12-14 16:22:48 +00:00
eguven
d5ac93f426 Move playback tests to androidTest folder
This change makes Android Studio recognize tests as "android test" and run them on device by default.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=142008012
2016-12-14 14:23:38 +00:00
eguven
fc93940463 Fix widevine playback tests
Passes drmSessionManager to DebugMediaCodecVideoRenderer.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141997225
2016-12-14 14:23:38 +00:00
olly
4db6f1e495 Expose whether decoders support tunneling
This is a first step toward supporting tunneled playback

Issue: #1688

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141167501
2016-12-06 20:04:44 +00:00
olly
894ae1a310 Improve SimpleExoPlayer flexibility
- Allow extension and overriding of renderer creation.
  Several developers have asked for this, so that they
  can use their own renderers (typically extensions to
  the core ones) without losing the ability to use
  SimpleExoPlayer.
- Add option to not attempt extension renderer creation,
  for efficiency.
- Align build variants for internal and external demo
  apps. This is slightly unfortunate, but convergence
  seems necessary for useExtensionRenderers.
- Fix DASH playback tests to use the debug video
  renderer.

Issue #2102

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140140915
2016-11-25 20:18:32 +00:00
olly
9d7d8adc9c Allow changing of video scaling mode
Issue #2016

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139803888
2016-11-21 19:14:39 +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
f56b05f0d7 Bump version to r2.0.4
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136697697
2016-10-20 12:20:10 +01:00
olly
cecb1f5f76 Bump version + update release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136339035
2016-10-17 15:43:57 +01:00
olly
2cf339e095 Bump version to 2.0.2 + document inclusion of OkHttp extension
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135260806
2016-10-05 21:20:34 +01:00
olly
f2beec4c82 Fix playback tests
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135100455
2016-10-04 23:40:10 +01:00
olly
21626c417e Bump version to 2.0.1
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134662367
2016-09-29 16:30:10 +01:00
olly
e4cc2d6acd Set allowedVideoJoiningTimeMs to 0 to fix playback test failures
It defaults to 5000, which allows frames to be dropped in an
attempt to seamlessly rejoin when re-enabling video during an
ongoing playback. This causes performance failures when running
the test*AdaptiveWithRendererDisabling playback tests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133105110
2016-09-14 16:32:18 +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
olly
f8c05ebd93 Better selection of default start position for live
If the live window has a small duration, we currently
end up setting the default start position to be right
at the start of the window. This increases the chance
of a BehindLiveWindowException.

With this change we impose a minimum 5s gap between
the start of the window and the default start position.
If the window is *really* small (<10s) then doing this
would push the default start position too close to the
end of the window. We don't have much time to play with
in either direction in this case, so we put the default
start position in the middle of the window and hope for
the best.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132054802
2016-09-02 16:20:44 +01:00
eguven
860c6588c0 created DefaultHttpDataSourceFactory
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131931668
2016-09-02 16:15:18 +01:00