198 Commits

Author SHA1 Message Date
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
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
fb55254f90 Fix a bunch more Javadoc
Also inline a few methods/classes where they can be made
private and therefore be removed from the public API.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130935090
2016-08-31 15:25:24 +01:00
olly
1579b68cf6 Sanitize constants
- Use a single constant for unset/unknown times across
  all time bases. Note also that this moves away from
  use of -1 for unset/unknown times in ms, which was a
  bad choice (it might conflict with real times, such
  as a time representing being just behind the start
  of a live window).
- Add a few other unset constants, and use them.
- Fix some hardcoding of -1 where existing constants
  should have been used.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130775594
2016-08-31 15:25:18 +01:00
olly
c009028dad Prepare for removal of period based ExoPlayer methods
- This change marks the methods that will be removed, and
  renames the Window methods to remove "Window" from their
  names.
- The Window methods need to be made to work (rather than
  throw exceptions) when the timeline isn't set. Once that
  gets done in a subsequent CL, the deprecated methods will
  be removed.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130612979
2016-08-31 15:25:17 +01:00
olly
b35648eafb Add window based methods to ExoPlayer
- This change also enables seeking in live windows in the
  ExoPlayer demo app.
- The added playlist doesn't transition properly by itself,
  but for manual transitions it works correctly, and
  demonstrates seeking into a default position.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130515880
2016-08-31 15:25:07 +01:00
olly
e0773f705f Allow applications to specify the live edge offset.
Also allow use of suggestedPresentationDelay taken from the
manifest, and enable this by default.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130409924
2016-08-31 15:25:06 +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
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
olly
5783272444 Fix missing generics
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129624395
2016-08-10 20:04:19 +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
olly
f66b90e34b Eliminate cruft from the demo apps's PlayerActivity
Useful functionality promoted to core library:

1. Management of SurfaceHolder.Callback lifecycle
   promoted to SimpleExoPlayer
2. Ability to determine whether audio/video tracks
   exist but are all unsupported promoted to
   MappingTrackSelector.TrackInfo
3. Read external storage permissions check promoted
   to Util
4. SubtitleView given ability to act directly as a
   TextRenderer.Output to remove layer of indirection
5. SubtitleView given ability to configure itself to
   user's platform wide caption styling
6. KeyCompatibleMediaController promoted to library's
   UI package.

Relocation of boring stuff:

1. ID3 frame logging moved to EventLogger.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128714230
2016-07-28 20:04:41 +01:00
olly
3501332dd3 Converge track selection to a single place.
This change merges the duties of FormatEvaluator into
TrackSelection classes, so that both the static and
dynamic parts of track selection are implemented in a
single place.

New feature: Demo app now allows you to enable random
adaptation in the track selection dialog.

Notes:

- It should be quite easy to allow application side
track blacklisting in addition to source side, as an
extension to this. That would effectively allow
applications to do seamless/deferred track selection
by creating a TrackSelection with all tracks enabled,
and then toggling the blacklist flags to select the
ones they want to be active.

- It should be trivial to implement format blacklisting
for DASH and SS as an extension to this. Will do in a
follow up CL.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128707517
2016-07-28 20:04:40 +01:00
olly
2f20fd7c03 Simple language + Javadoc consistency
- Invoked --> Called
- Gets --> Returns
- "True if X. False otherwise." --> "Whether X."
- Removed some @returns where the Javadoc is in "Returns X" form

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128678638
2016-07-28 20:04:40 +01:00
olly
242bdffc80 Fix a few warnings.
- Suppress spurious resource type warnings.
- Make AS happy by making private method non-final.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128584391
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
692d756ee6 Simplification: Move common logic to TrackSelection
- TrackSelection now exposes the selected formats, ordered
  by decreasing bandwidth. This removes the need for DASH,
  SS and HLS to do the sorting individually.
- The change also removes the need to reconstruct TrackSelection
  instances with a different group index in various places
  (e.g. MergingMediaPeriod).
- This is also a step toward potentially packaging the
  FormatEvaluator inside of the TrackSelection (TBD).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128159064
2016-07-22 22:41:36 +01:00
olly
fc457e4c1b Move default DRM callback implementation to library
This also removes direct use of HttpURLConnection and
allows use of any HttpDataSource for license requests,
which means those using OkHttp can finally use the
same network stack for license requests as they're using
for everything else, without having to implement their
own callback.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127841045
2016-07-22 22:41:35 +01:00
mishragaurav
a61828a675 Merge widevine playback tests to v2.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=127825954
2016-07-22 22:41:35 +01:00