2585 Commits

Author SHA1 Message Date
mdoucleff
d9cd4641f2 Add flag to CachedContentIndex to disable encryption. This allows the encryption feature
to be disabled gracefully: encrypted index files may be read, but plaintext will be written.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165196508
2017-08-17 22:35:27 +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
fb83872365 Remove unused method
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165168924
2017-08-17 22:30:26 +01:00
olly
870c8ae4df Fix canAcquireSession for ClearKey
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165159376
2017-08-17 22:29:13 +01:00
Oliver Woodman
1829d71d29 Restrict usage of secure DummySurface for all Samsung devices. 2017-08-11 15:47:03 +01:00
Oliver Woodman
730d2dd18f Formatting cleanup 2017-08-11 15:46:49 +01:00
ojw28
2e950633c7 Merge pull request #3161 from DolbyLaboratories/dev-v2-eac3-7.1
Support 7.1 EAC3 in MP4, DASH and HLS formats
2017-08-11 15:43:43 +01:00
olly
c661ed42de Add possibility of forcing a specific license URL in HttpMediaDrmCallback
Resubmit of https://github.com/google/ExoPlayer/pull/3136

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164971900
2017-08-11 15:03:02 +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
ybai001
fc9a58529a Support 7.1 EAC3 in MP4, DASH and HLS formats 2017-08-11 07:38:43 +08:00
olly
1b28d83f16 Fix maskingX variables when timeline becomes empty
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164840037
2017-08-10 13:28:04 +01:00
olly
88bae5d975 Support multiple video/text/metadata outputs
We've seen more than one issue filed where a developer has
registered a video listener and been confused by the fact
their SimpleExoPlayerView no longer works properly. There
are also valid use cases for having multiple metadata/text
outputs.

Issue: #2933
Issue: #2800
Issue: #2286
Issue: #2240

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164839882
2017-08-10 13:26:48 +01:00
olly
5ab0c620bf Clean up ClearKey UUIDs
- There is a proper ClearKey UUID now. This change requires
  it to be used instead of the Common PSSH UUID when instantiating
  DRM components.
- Internally, we'll map the ClearKey UUID onto the Common PSSH
  UUID where necessary to (a) access the ClearKey CDM on older
  devices, and (b) access drm init data stored under the Common
  PSSH UUID in the stream.

Issue: #3138

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164839213
2017-08-10 13:25:32 +01:00
eguven
2d0044fee4 Generic DownloadManager and DownloadService
Downloader specific parameters and constructor is moved to DownloadAction class.

DownloadAction objects need to be serialized so they can be passed in Intents and can be stored to
filesystem (to be implemented). So  DownloadAction.Serializer is added. Didn't use Serializable interface
because of the concerns over incompabilities when the new versions of classes are used.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164831115
2017-08-10 13:24:10 +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
ebbf9f635b Fix minor Javadoc error
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164706078
2017-08-10 13:15:51 +01:00
olly
91adba5d1b Minimal change to expose segment indices in DefaultDashChunkSource
Issue: #3037

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164614478
2017-08-10 13:12:49 +01:00
Oliver Woodman
ceb1e87219 Revert "Add possibility of forcing a specific license URL in HttpMediaDrmCallback"
This reverts commit 768a73b377d842aeefdd466cf7a5904f858cc8a4.
2017-08-10 12:57:06 +01:00
ojw28
3f31cec742 Merge pull request #3136 from jeoliva/force-drm-license-url
Add possibility of forcing a specific license URL in HttpMediaDrmCallback
2017-08-08 17:21:37 +01:00
olly
026ac1d69b Don't release a surface until we've stopped using it
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164596062
2017-08-08 16:44:08 +01:00
olly
b8c6ed6701 Bump to 2.5.1
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164595874
2017-08-08 16:42:42 +01:00
olly
072788c88a Support building of version 1 PSSH atoms
Issue: #3138

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164590835
2017-08-08 15:50:58 +01:00
olly
24bf2aa0e2 Support clip end greater than the child's duration
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164577001
2017-08-08 15:49:45 +01:00
olly
e45345e21b Fix missing source info refresh notification
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164502580
2017-08-08 15:48:22 +01:00
aquilescanta
38360f6267 Add support for HLS's FRAME-RATE attribute
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164482135
2017-08-08 15:46:53 +01:00
eguven
427411befb Disable test coverage again
https://issuetracker.google.com/issues/37019591 causes local variables can't be found while debugging.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164449443
2017-08-07 13:38:15 +01:00
olly
87012f22f2 Avoid rollover calculating sample offsets
I considered using Util.scaleLargeTimestamp for this, but
given sample offsets are relative and should always be
small (<<1s), it really shouldn't be necessary.

Issue: #3139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164443795
2017-08-07 11:59:25 +01:00
olly
865d74cde0 Don't use TextureView's SurfaceTexture unless available
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164434943
2017-08-07 11:57:01 +01:00
olly
05179b4f1b Set correct Content-Type for ClearKey requests
Issue: #3138

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164434858
2017-08-07 11:55:42 +01:00
olly
9ecec92b56 Finalize r2.5.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164434615
2017-08-07 11:53:04 +01:00
andrewlewis
576f362912 Update playbackInfo even if there's no period holder
This is required to correctly update the playbackInfo.periodId when
seeking close to the end of a period with ads, as the seek operation
leads to an immediate source info refresh when midroll ads are marked as
played.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164257099
2017-08-04 17:55:35 +01:00
andrewlewis
08e58af6e7 Separate handling of oldTimeline == null case
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164254522
2017-08-04 17:54:01 +01:00
olly
b664e92bb4 Remove shuffle button since it doesn't work yet
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164141326
2017-08-04 12:36:39 +01:00
olly
1109bf50dd Bump version
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164126494
2017-08-04 12:33:50 +01:00
tonihei
53bc59b9d2 Add UI resources for shuffle mode.
Including strings, icon, and button.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164126101
2017-08-04 12:32:24 +01:00
aquilescanta
72daef7a4c Don't read GaSpecificConfig unless required
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164125579
2017-08-04 12:31:01 +01:00
tonihei
ccd05cbd04 Add fake simple exo player.
This implementation runs as fast as possible by triggering a simplified
playback loop continuously without waiting. The class only supports a basic
use case with a single-period timeline, no timeline update, no seeks or other
user-initiated actions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164120420
2017-08-04 12:29:40 +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
J. Oliva
768a73b377 Add possibility of forcing a specific license URL in HttpMediaDrmCallback
- Renamed some license URL related variables to keep consistency across the code.
- Added a new parameter to HttpMediaDrmCallback that enables forcing defaultLicenseURL as the license acquisition URL.
2017-08-04 13:25:10 +02:00
tonihei
3c6ad40481 Add shuffle order interface and default implementation.
These classes maintain a shuffled order of indices allowing to query the
next, previous, first, and last indices. And also support inserting and
removing elements without changing the shuffled order of the rest.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164116287
2017-08-03 14:49:32 +01:00
andrewlewis
cb00b0209f Take into account init data size for input buffer size
Issue: #2900

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164110904
2017-08-03 14:48:21 +01:00
olly
db99187381 Fix some lint warnings
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164105662
2017-08-03 14:47:04 +01:00
olly
1f019ca808 Fix build.gradle to use modulePrefix
Issue: #3131

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164004981
2017-08-02 20:19:19 +01:00
tonihei
5ca84ebfd8 Remove child data holder helper from AbstractConcatenatedTimeline.
This helper class required a scratch instance to write on. Such a scratch
instance may violate the immuatability of the timelines if used by multiple
threads simultaneously.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163992458
2017-08-02 17:45:52 +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
49b83c01ca Throw ParserException if parsing unsupported media
This is for consistency with what we do elsewhere;
specifically in FragmentedMp4Extractor.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163974960
2017-08-02 17:43:28 +01:00
olly
8e08d982ab Further fix H262 segmentation
Issue: #2891

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163951910
2017-08-02 13:26:05 +01:00
andrewlewis
962a71314a Fix handling of H.262 CSD
The start code for H.262 codec-specific data may be across a packet boundary.
Before this change the offset passed to CsdBuffer.onData may have been before
the start point of the data in the newData buffer.

After this change, start codes are added directly to the CSD buffer when it's
filling and any start code bytes added by onData (at the end of a packet) are
discarded.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163943584
2017-08-02 13:24:47 +01:00
Oliver Woodman
1a95a35434 Minor cleanup 2017-08-01 18:20:54 +01:00
olly
c01c8cd2a6 Bump version to 2.5.0-beta2
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163830353
2017-08-01 16:23:39 +01:00