3732 Commits

Author SHA1 Message Date
Danny Brain
219ad8a73e #3215 Additional secure DummySurface device exclusions 2017-09-09 00:45:30 +01:00
Shyri Villar
3137fcd1ca Add support for new codecs parameter string 2017-09-09 00:45:23 +01:00
andrewlewis
64b1566ad4 Use Math.abs in Sonic.java
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166820970
2017-09-09 00:44:29 +01:00
andrewlewis
bbb0308295 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-09-09 00:43:35 +01:00
Bei Yi
b80e3af2c9 Support zoom mode for AspectRatioFrameLayout 2017-09-09 00:43:08 +01:00
Bei Yi
9aa4aa8ff5 Support aspect ratio fill mode for AspectRatioFrameLayout 2017-09-09 00:43:02 +01:00
olly
8524fb343b Use flavorDimensions for external demo app
- This is soon becoming mandatory.
- It also looks like future versions of com.android.tools.build
  are being distributed via Google's Maven repository.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166058299
2017-09-09 00:42:27 +01:00
olly
cc5cfd46c0 Handle size==0 in MP4 atoms
Issue: #3191

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165925148
2017-09-09 00:42:06 +01:00
olly
85bc8a08db Fix broken link + minor doc tweak
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165920927
2017-09-09 00:41:59 +01:00
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
andrewlewis
4c51d386d5 Allow the app to specify extra ad markers
Issue: #3184

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165895259
2017-09-09 00:40:53 +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
04131a1ee1 Update instructions to include Google Maven repository
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165291982
2017-09-09 00:35:25 +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
Bei Yi
7bde58a46d Support crop mode for AspectRatioFrameLayout 2017-09-09 00:34:28 +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
bachinger
cf6c247bec set mediaSession flags properly and keep queue in sync when timeline changes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164774783
2017-09-09 00:32:54 +01:00
olly
5fedbf76db Document usage of the RTMP extension
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164706135
2017-09-09 00:32:38 +01:00
olly
154f17ef1e Fix minor Javadoc error
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164706078
2017-09-09 00:32:24 +01:00
olly
bc0829503a Clean up terminology for MediaSession extension
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164705750
2017-09-09 00:32:09 +01:00
olly
74e8acf14f Minimal change to expose segment indices in DefaultDashChunkSource
Issue: #3037

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164614478
2017-09-09 00:31:39 +01:00
olly
5a4155f09f Destroy EGLSurface during DummySurface cleanup
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168020525
2017-09-08 22:28:10 +01:00
olly
40d443dc02 Enable rtmp in external demo app with extensions
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168007345
2017-09-08 22:26:54 +01:00
tonihei
ec38d0d8ab Check thread is still alive before sending message in Loader.
The release callback handler in Loader might not be alive
anymore. Catch this case to prevent warnings about sending
messages on dead threads.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167996538
2017-09-08 22:25:37 +01:00
tonihei
8f43dcd424 Clear buffer in fake renderer in each iteration.
This simulates reading from the buffer (which is what actual
renderers would do). Otherwise the buffer always gets expanded
and might cause memory issues.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167994899
2017-09-08 22:24:19 +01:00
tonihei
b2627d63fd Allow ExoPlayerTestRunner to end when Player.stop() is called.
In this case the playback state transitions to IDLE, which isn't
caught so far. (This code is equivalent to the one in ExoHostedTest.java)

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167980981
2017-09-08 22:22:57 +01:00
andrewlewis
7c3fe19d3f Migrate remaining tests to Robolectric
Remaining instrumentation tests either use android.os.Handler or rely on assets.
In the latter case, the tests are difficult to migrate due to differences
between the internal and external build systems, and configuration needed in
Android Studio. In addition, SimpleCacheSpanTest remains as an instrumentation
test because it fails due to a problem with string encoding on the internal
build (and two other tests in its package are kept with it because they depend
on it).

This test removes a dependency from testutils on Mockito, as a different
version of Mockito needs to be used for instrumentation tests vs Robolectric
tests, yet both sets of tests need to rely on testutils. Mockito setup is now
done directly in the tests that need it.

Move OggTestData to testutils so it can be used from both instrumentation and
Robolectric tests.

It may be possible to simplify assertions further using Truth but this is left
for possible later changes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167831435
2017-09-08 22:21:33 +01:00
Oliver Woodman
7053284b02 Merge branch 'release-v2' into dev-v2 2017-09-06 19:05:37 +01:00
olly
4869a25069 Pick up rtmpClient fix
Issue: #3156

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167718081
2017-09-06 15:58:02 +01:00
olly
7d4190f3c8 Regroup final/non-final vars
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167717715
2017-09-06 15:56:48 +01:00
olly
c6fa034eba DecryptionException cleanup + add missing header
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167711928
2017-09-06 15:55:21 +01:00
olly
d66143d96d Add full stops
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167711267
2017-09-06 15:53:57 +01:00
olly
e7992513d3 Remove references to MediaDrm from DefaultDrmSession classes
Everything should go through the ExoMediaDrm layer. We still
need to abstract away the android.media exception classes, but
this is left as future work.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167710213
2017-09-06 15:52:28 +01:00
olly
013379fd3e Workaround for SurfaceView not being hidden properly
This appears to be fixed in Oreo, but given how harmless
the workaround is we can probably just apply it on all
API levels to be sure.

Issue: #3160

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167709070
2017-09-06 15:51:01 +01:00
olly
17232f58a3 Fix position reporting during ads when period has non-zero window offset.
Reporting incorrect positions for ad playbacks was causing IMA to
think the ad wasn't playing, when in fact it was.

Issue: #3180

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167702032
2017-09-06 15:49:34 +01:00
andrewlewis
8ef6a2e7bd Clear gapless playback metadata for clipped media
Also pass an unresolved end point to ClippingMediaPeriod. This removes some
assertions checking timestamps in the ClippingMediaPeriod, but makes it
possible to identify when the end point is at the end of the media.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167683358
2017-09-06 15:48:05 +01:00
olly
fb023da529 Fix attr inheritance in SimpleExoPlayerView
When creating PlaybackControlView inside SimpleExoPlayerView,
we want certain attributes to be passed through. This lets you
set control attributes on the SimpleExoPlayerView directly. We
don't want all attributes to be propagated though; only our own
custom ones.

Not sure if there's a cleaner way to do this. Pragmatically this
solution seems ... ok :)?

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167619801
2017-09-06 15:46:44 +01:00
zhihuichen
b62eab63a4 Implement multi session to support DRM key rotation.
Spec: https://storage.googleapis.com/wvdocs/Widevine_DRM_Android_Using_Key_Rotation.pdf

1. Implement multisession to support drm key rotation
2. Put MediaDrmEventListener back to manager since this is a per mediaDrm thing.
3. It seems diffrenciate between single/multi session is unnecessary.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167602965
2017-09-06 15:45:22 +01:00
andrewlewis
e16610a82c Fix import formatting
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167584287
2017-09-06 15:44:01 +01:00