2986 Commits

Author SHA1 Message Date
andrewlewis
8115e11489 Allow subclasses to customize the MediaFormat
Make getMediaFormat protected so that subclasses can set additional MediaFormat
keys. For example, if the decoder output needs to be read back via an
ImageReader as YUV data it is necessary to set KEY_COLOR_FORMAT to
COLOR_FormatYUV420Flexible.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166195211
2017-08-29 22:45:28 +01:00
tonihei
9fd19d0e7c Add shuffle logic to concatenated timelines.
The implementation in the abstract base class takes care to forward the queries
to the correct methods given the shuffle mode and a given shuffle order.

All concatenated timeline implementations use an unshuffled order so far. The
handling of the shuffle orders will follow in other changes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166191165
2017-08-29 22:42:56 +01:00
tonihei
4883a9ba9a Add shuffle support to infinitely looping timeline.
In addition, let unit test assert window indices for both shuffle modes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166191069
2017-08-29 22:41:39 +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
2c8d5f846e Pass shuffle mode to timeline assertion helper methods.
This allows to test the expected behaviour of timeline with different shuffle modes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166181091
2017-08-29 22:38:50 +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
5214bfa7b1 Update ExoPlayerImplInternal with shuffle mode changes.
The shuffle mode is saved using a message on the playback thread.
After setting the shuffle mode, the same media period holder verification
as for repeat mode changes gets executed.

Note: the shuffle mode is not used yet to change the playback order.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166060231
2017-08-22 16:27:18 +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
f1a97317d9 Handle size==0 in MP4 atoms
Issue: #3191

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165925148
2017-08-22 16:16:48 +01:00
tonihei
cb45a47da1 Remove isFirstWindow/isLastWindow from Timeline.
These methods are only used in one place, and offer duplicate
functionality to checking getNext(Previous)WindowIndex == C.INDEX_UNSET.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165910258
2017-08-22 16:14:02 +01:00
mansfieldmark
8e67837afe Adding conservative @Nullable annotations to Exoplayer v2 Cache + CacheSpan
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165715928
2017-08-22 16:09:53 +01:00
eguven
a1add8f9e6 Fix downcasting in DownloadAction.Serializers
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165699826
2017-08-22 16:07:18 +01:00
aquilescanta
1e4f899548 Add support for the data URI scheme
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165699328
2017-08-22 16:05:58 +01:00
Oliver Woodman
4fa307d654 Minor style tweaks 2017-08-17 23:13:34 +01:00
Dulmandakh
7e586c3a8f expose setPropertyByteArray, setPropertyString
export setPropertyByteArray, setPropertyString of DefaultDrmSessionManager for easy customization.
2017-08-17 23:11:30 +01:00
ojw28
6b7e0cb606 Merge pull request #3182 from WeiChungChang/Support_MP4_in_h262
Support H262 video in MP4
2017-08-17 23:10:05 +01:00
ojw28
7ddcc46cbd Merge pull request #3185 from dbrain/subrip_timing_line_crash
Fix possible subrip timing line NPE
2017-08-17 23:09:50 +01:00
olly
2470b39d95 Split metadata and text outputs from their renderer classes
There will be non-ExoPlayer players that can output text
and metadata, so the outputs should be standalone. There
may also be ExoPlayer instances that use non-standard
text and metadata renderers, for which this change also
makes sense.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165628420
2017-08-17 23:05:44 +01:00
olly
4917929a3a Improve MediaSource/MediaPeriod documentation
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165628229
2017-08-17 23:04:21 +01:00
aquilescanta
e3f305b5c0 Improve FORMAT_UNSUPPORTED_DRM related documentation and logging
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165580016
2017-08-17 23:00:56 +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
olly
4d7f37f5a9 Work around issue with Xiaomi JB devices
Issue: #3171

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165577562
2017-08-17 22:58:10 +01:00
zhihuichen
c2d2d967e9 Refactor DrmSession part into a separate class to prepare for multi session scenario. NO_SQ=flaky
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165497666
2017-08-17 22:52:33 +01:00
eguven
978019a1a3 Add ProgressiveDownloadAction
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165447436
2017-08-17 22:51:14 +01:00
andrewlewis
8e45bd27df Add nullable annotations to Renderer constructors
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165437929
2017-08-17 22:49:58 +01:00
andrewlewis
bbc3b182bb Restore the interrupted flag after blocking operations
If the main thread was interrupted during
ExoPlayerImplInternal.blockingSendMessage/release, the interrupted flag was
immediately set but then wait() was called on the next iteration. wait() would
immediately throw InterruptedException, causing the main thread to spin until
the blocking operation completed.

Instead of resetting the flag immediately, reset it after the blocking
operation completes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165426493
2017-08-17 22:48:15 +01:00
andrewlewis
e0b69b8115 Add Format.copyWithRotationDegrees
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165314250
2017-08-17 22:46:57 +01:00
olly
f8e47553e8 Destroy GL context when releasing dummy surface
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165293386
2017-08-17 22:40:32 +01:00
olly
00547c5783 Disable secure dummy surface on all Samsung N devices
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165291627
2017-08-17 22:38:01 +01:00
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
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
Danny Brain
571f98f546 Fix possible subrip timing line NPE 2017-08-17 21:30:46 +10:00
WeiChungChang
469780f7ea Support H262 video in MP4 2017-08-17 13:49:41 +08: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
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
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