342 Commits

Author SHA1 Message Date
tonihei
351b8a60d1 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-09-09 00:41:47 +01:00
Oliver Woodman
47e3b4dc3e Minor style tweaks 2017-09-09 00:40:29 +01:00
Dulmandakh
51dac5838d expose setPropertyByteArray, setPropertyString
export setPropertyByteArray, setPropertyString of DefaultDrmSessionManager for easy customization.
2017-09-09 00:40:26 +01:00
olly
d824aa9db7 Improve MediaSource/MediaPeriod documentation
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165628229
2017-09-09 00:37:30 +01:00
aquilescanta
38bc289e71 Improve FORMAT_UNSUPPORTED_DRM related documentation and logging
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165580016
2017-09-09 00:37:16 +01:00
olly
7e9b1fc8ae Work around issue with Xiaomi JB devices
Issue: #3171

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165577562
2017-09-09 00:36:34 +01:00
andrewlewis
94a5e9bc3a 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-09-09 00:35:59 +01:00
olly
0e16c43f0c Destroy GL context when releasing dummy surface
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165293386
2017-09-09 00:35:31 +01:00
olly
a2a2acfd6a Disable secure dummy surface on all Samsung N devices
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165291627
2017-09-09 00:35:12 +01:00
mdoucleff
e198667251 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-09-09 00:35:00 +01:00
Danny Brain
85d6c0f0a9 Fix possible subrip timing line NPE 2017-09-09 00:34:14 +01:00
WeiChungChang
44fa0b446e Support H262 video in MP4 2017-09-09 00:34:01 +01:00
Oliver Woodman
b9ead4b7d1 Restrict usage of secure DummySurface for all Samsung devices. 2017-09-09 00:33:50 +01:00
olly
1f20e6f31e Fix maskingX variables when timeline becomes empty
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164840037
2017-09-09 00:33:31 +01:00
olly
99f603c404 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-09-09 00:33:18 +01:00
ojw28
61078078df Revert "expose setPropertyByteArray, setPropertyString" 2017-08-17 23:11:44 +01:00
Dulmandakh
65e212c409 expose setPropertyByteArray, setPropertyString
export setPropertyByteArray, setPropertyString of DefaultDrmSessionManager for easy customization.
2017-08-09 15:42:58 +09:00
olly
a6fd4bdaf0 Support clip end greater than the child's duration
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164577001
2017-08-08 16:50:00 +01:00
olly
13bcc0062e 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:49:50 +01:00
olly
c1827b10b6 Bump to 2.5.1
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164595874
2017-08-08 16:49:32 +01:00
olly
371f675ae8 Fix missing source info refresh notification
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164502580
2017-08-08 16:49:03 +01:00
eguven
e713ddc22d 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:43:03 +01:00
olly
f88149385a 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 13:42:57 +01:00
olly
15bcdf3b71 Don't use TextureView's SurfaceTexture unless available
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164434943
2017-08-07 13:42:48 +01:00
olly
df05195f5f Set correct Content-Type for ClearKey requests
Issue: #3138

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164434858
2017-08-07 13:42:42 +01:00
olly
13a580fdbc Finalize r2.5.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164434615
2017-08-07 13:42:28 +01:00
andrewlewis
42eaee3db8 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 18:13:44 +01:00
andrewlewis
c72278d23e Separate handling of oldTimeline == null case
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164254522
2017-08-04 18:13:37 +01:00
olly
de1f538e14 Bump version
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164126494
2017-08-04 12:54:27 +01:00
andrewlewis
5fbb58c62f 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-04 12:54:20 +01:00
olly
c2049ba1a7 Fix some lint warnings
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164105662
2017-08-04 12:54:14 +01:00
tonihei
19aa69e0f4 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 20:23:54 +01:00
olly
a3df29a246 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 20:23:45 +01:00
olly
cad25e5a4d Further fix H262 segmentation
Issue: #2891

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163951910
2017-08-02 13:34:01 +01:00
andrewlewis
e604daaa09 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:33:55 +01:00
Oliver Woodman
0717782fdc Minor cleanup 2017-08-02 13:33:46 +01:00
olly
18bb04d6d9 Bump version to 2.5.0-beta2
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163830353
2017-08-02 13:33:34 +01:00
andrewlewis
395249a950 Fix sequence extension position calculation
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163814942
2017-08-02 13:33:20 +01:00
Michael Goffioul
893c7f34ba Fix H262 segmentation.
Prepend sequence headers to the next frame, instead of appending them to
the previous frame. Tested decoders like FFMPEG and Google's
Android/MPEG2 expects to read the sequence headers before the first
frame they apply to. When sequence headers are appended to the previous
frame, these are ignored and this leads to incorrect decoding.
2017-08-02 13:33:11 +01:00
Oliver Woodman
9c2528a70f Correctly handle reading 0 bits 2017-07-31 21:28:22 +01:00
olly
85445536c3 Fix 2.5.0 lint errors
- Publish IMA extension
- Force IMA to use the correct version of the support library
- Add missing sr translations for repeat mode strings

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163705883
2017-07-31 21:25:27 +01:00
olly
bf4a460e4c Fix typo in Id3Decoder
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163694825
2017-07-31 21:25:20 +01:00
olly
2b5bd800e3 Robustness fix for malformed ID3 metadata
Issue: #3116

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163693235
2017-07-31 21:25:14 +01:00
olly
ecbcf09804 Check for null entries in ConcatenatingMediaSource
We do this in the dynamic case, and I think we've seen
a few GitHub issues where developers do this and don't
understand what they've done wrong (because the failure
comes later).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163688557
2017-07-31 21:25:07 +01:00
olly
13732fe618 Release notes + version bump for 2.5.0-beta1
There's no way to represent a beta in our integer versioning
scheme. I propose we just set it the same for all betas + the
stable release. The versioning for the demo app isn't that
important, so I've just put it directly to 2.5.0 as well.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162749130
2017-07-21 17:39:12 +01:00
olly
3eb85446a2 Fully document DefaultTrackSelector
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162740498
2017-07-21 16:12:41 +01:00
olly
9bb8b240d2 Improve Player/ExoPlayer Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162740451
2017-07-21 16:11:29 +01:00
olly
89181cf4bc Fully document MappingTrackSelector
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162721489
2017-07-21 11:24:29 +01:00
andrewlewis
07de4d1b2c Handle ad skipping and content resume
SKIPPED can't be handled as CONTENT_RESUME_REQUESTED because after skipping an
ad there may be further ads to play in its ad group.

Remove workaround for handling unexpected playAd without stopAd, as the player
can instead recover when IMA sends CONTENT_RESUME_REQUESTED. This in turn fixes
handling of the case where playAd is called twice but IMA expects only the
first ad to play, when skipping a particular ad. (Add an ad tag where this
occurs to internal samples.)

Check whether a currently playing ad has been marked as played in
ExoPlayerImplInternal, and handle this case as a seek. This ensures that any
loaded ad periods are discarded in the case of CONTENT_RESUME_REQUESTED.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162610621
2017-07-21 11:23:10 +01:00
andrewlewis
554a399407 Switch to non-deprecated player constants
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=162605429
2017-07-21 11:20:07 +01:00