3285 Commits

Author SHA1 Message Date
aquilescanta
a04663372f Detect playlist stuck and playlist reset conditions in HLS
This CL aims that the player fails upon:

- Playlist that don't change in a suspiciously long time,
  which might mean there are server side issues.
- Playlist with a media sequence lower that its last snapshot
  and no overlapping segments.

This two error conditions are propagated through the renderer,
but not through MediaSource#maybeThrowSourceInfoRefreshError.

Issue:#2872

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160899995
2017-07-05 15:02:39 +01:00
olly
dda3616f5a Fix reporting of width/height
1. maybeRenotifyVideoSizeChanged should report reported* variables
2. Add check into maybeNotifyVideoSizeChanged to suppress reporting
   in the case that the width and height are still unknown.

Issue: #3007

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160879625
2017-07-05 15:02:39 +01:00
eguven
37faead26e Rename some assert methods in CacheAsserts to better reflect what they do
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160873280
2017-07-05 15:02:39 +01:00
tonihei
05a77eef5d Move Extractor test assertion methods to ExtractorAsserts class.
This cleans up test the TestUtil class that in large parts consisted of
assertions for Extractor tests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160829066
2017-07-05 15:02:39 +01:00
olly
ad3d1e0cf2 Add reset() to SampleQueue. Deprecate reset(boolean) and disable()
The deprecated methods will be removed as soon as HLS is migrated
to use the new ones.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160827936
2017-07-05 15:02:39 +01:00
andrewlewis
d733bb4101 Fix video tunneling state transition to ready
Issue: #2985

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160827532
2017-07-05 15:02:39 +01:00
tonihei
960315c4d5 Move extractTimelineFromMediaSource to test util class.
This also ensures that TimelineAsserts only contains assert methods.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160827271
2017-07-05 15:02:39 +01:00
aquilescanta
a82e51070b Add playback tests for CENC/DASH streams.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160825705
2017-07-05 15:02:39 +01:00
tonihei
a9efb4553d Merge TimelineAsserts.FakeTimeline into FakeTimeline.
They serve the same purpose. One was defined as single window, multi-period
timeline, while the other was a multi-window, single-period-each timeline.

The combined FakeTimeline uses TimelineWindowDefinitions which allow multi-
window, multi-period fake timelines.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160808844
2017-07-05 15:02:39 +01:00
Oliver Woodman
19a3d94022 Remove offline classes for now (not ready yet) 2017-06-30 22:24:40 +01:00
ojw28
2bebd526e1 Merge pull request #3009 from google/dev-v2-r2.4.3
r2.4.3
2017-06-30 19:07:03 +01:00
olly
1b64d62e61 Update release notes + bump version number
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160663100
2017-06-30 18:57:16 +01:00
andrewlewis
43daf0f2bb Update MIME type in FLAC test data
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159104188
2017-06-30 18:54:37 +01:00
olly
4ee0b2e1c8 Update release notes + bump version number
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160663100
2017-06-30 18:54:35 +01:00
olly
a579b8d82d Fix DvbParser bug
Issue: #2957

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160628086
2017-06-30 18:41:34 +01:00
olly
79f7db7fcd Prefer Google over MediaTek for PCM decoding pre-O.
Issue: #2873

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160520136
2017-06-30 18:40:54 +01:00
tonihei
df84f2930c Clarify JavaDoc of MediaPeriod.
Two of MediaPeriod's methods are only called after the media period has been
prepared. Added this to JavaDoc of these method to simplify implementations.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160510373
2017-06-30 18:40:48 +01:00
andrewlewis
c33d16d6ae Show larger scrubber handle when focused
Also remove updateScrubberState as it doesn't do anything useful.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160496133
2017-06-30 18:40:39 +01:00
aquilescanta
efd17f86c5 Add URLs EXT-X-STREAM-INF uris only once
This prevents ExoPlayer from thinking there are many more video tracks
than there actually are. And will prevent downloading multiple times
the same rendition once offline support for HLS is added.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160285777
2017-06-30 18:40:13 +01:00
eguven
6c24d93805 Fix FLAC extension native part compilation
In the latest NDK version (r15) compilation fails because 'memset' isn't defined. Included cstring header.

Issue: #2977

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160139022
2017-06-30 18:39:25 +01:00
olly
2f7de7d3e8 Merge ContentDataSource fixes + tests from GitHub
https://github.com/google/ExoPlayer/pull/2963/files
8bb643976f

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160128047
2017-06-30 18:39:16 +01:00
hoangtc
a5eba0162b Update DrmSessionException.
Make DrmSessionException takes in Throwable cause instead of Exception cause, which is more limiting and doesn't add any benefit.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160121486
2017-06-30 18:39:04 +01:00
Oliver Woodman
045a153cb7 Clean up okhttp datasource. 2017-06-30 18:38:56 +01:00
Alex Birkett
d4e598f417 Make OkHttpDataSource userAgent parameter optional 2017-06-30 18:38:47 +01:00
olly
fd9b162d0f Fix setSelectionOverride(index, tracks, null)
Issue: #2988

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159958591
2017-06-30 18:37:11 +01:00
Oliver Woodman
d293cc4989 Mini cleanup 2017-06-30 18:37:03 +01:00
Oliver Woodman
5eb64dbe12 Fix ContentDataSource and enhance tests to validate read data 2017-06-30 18:36:56 +01:00
Karol Wrótniak
795e3be440 null AssetFileDescriptors support added in ContentDataSource 2017-06-30 18:36:48 +01:00
Karol Wrótniak
66c461e65b Comments from https://github.com/google/ExoPlayer/pull/2963#discussion_r122669328 applied 2017-06-30 18:36:41 +01:00
Karol Wrótniak
a0a50ac979 InputStream creation for ContentDataSource changed 2017-06-30 18:36:33 +01:00
Karol Wrótniak
4b8cddbefd Introduced failing unit test for ContentDataSource 2017-06-30 18:36:21 +01:00
olly
76faa5b6d2 Move clearing of joining deadline back to onStopped
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159421000
2017-06-30 18:34:46 +01:00
olly
92206b9fc2 TTML: Ignore regions that don't declare origin and extent
Issue: #2953

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159218386
2017-06-30 18:33:51 +01:00
olly
e618080c73 Adjust incorrect looking max-channel counts
Issue: #2940

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159099602
2017-06-30 18:33:42 +01:00
andrewlewis
e8ee868a9f Add support for mono input to the GVR extension
Issue: #2710

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=159082518
2017-06-30 18:31:02 +01:00
olly
facfa52677 Log frame counts when we see a spurious audio timestamp
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158977741
2017-06-30 18:30:51 +01:00
olly
c7924bfe22 Clean up parseSampleEntryEncryptionData
It was a bit strange how it returned something via the return
value and something else via the "out" variable, and doing it
this way wasn't even saving any allocations.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160645640
2017-06-30 16:54:31 +01:00
olly
51b98e817c Make Android Studio happy (make State public)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160638478
2017-06-30 16:53:20 +01:00
tonihei
177a33bbee Merge TimelineAsserts.StubMediaSource into FakeMediaSource.
The StubMediaSource was a subset of the FakeMediaSource.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160638245
2017-06-30 16:52:12 +01:00
andrewlewis
b3a7f8774f Upgrade IMA dependencies and README
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160632943
2017-06-30 16:51:06 +01:00
tonihei
9db0b8cce0 Move fake ExoPlayer component test classes to testutils.
Fake ExoPlayer componenets used within ExoPlayerTest.java can be useful for
other test classes and are therefore made available in testutils.
They can also be merged with other existing fake components.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160632908
2017-06-30 16:49:59 +01:00
tonihei
d54df32f25 Correct JavaDoc in TimelineAsserts.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160631095
2017-06-30 16:48:51 +01:00
tonihei
3b2cfa148c Move Timeline assertions to testutils.
Some parts of TimelineTest provided common assertions and helper classes for
other tests. As such, they better fit into testutils. In line with other
assertion methods, the TimelineVerifier class has been converted to a set of
static assertion methods.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160629797
2017-06-30 16:47:41 +01:00
olly
04b57f9c8e Fix DvbParser bug
Issue: #2957

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160628086
2017-06-30 16:46:31 +01:00
hoangtc
28030b6c7e Temp workaround for [Internal: b/63092960]
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160543009
2017-06-30 16:45:21 +01:00
tonihei
84f4fe5cf9 Recover from empty timelines.
(Related to GitHub #1706)

When the timeline becomes empty, the playback state transitions to "ended".
When the timeline becomes non-empty again, exceptions are thrown because MSG_DO_SOME_WORK is still regularly sent and media periods are getting prepared.

This change ensures that no MSG_DO_SOME_WORK messages are sent in "ended" state.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160537147
2017-06-30 16:44:14 +01:00
olly
ba0e5246d6 Properly handle replacement of the DRM session in LibvpxVideoRenderer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160537100
2017-06-30 16:43:09 +01:00
olly
db177db6d9 DrmSession cleanup
These changes are in part related to handling playback of mixed clear
and encrypted content, where we might want to use a secure decoder
throughout, but only have drm init data and only care about the state
of the DrmSession during playback of encrypted parts.

- requiresSecureDecoderComponent became unnecessary when we added
  ExoMediaCrypto, which provides a layer in which requiresSecureDecoderComponent
  can be overridden.
- Relaxed requirements for obtaining the MediaCrypto. It's helpful
  to allow retrieval in the error state, since it can be used to
  instantiate a decoder and play clear samples.
- Deferred throwing of errors in renderer implementations. As long as
  we can get a MediaCrypto, we should init the codec. We can also
  play clear samples without failing if playClearSamplesWithoutKeys is
  true, regardless of the errors state.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160536365
2017-06-30 16:42:01 +01:00
eguven
beb0734107 Extract base class from DashDownloaderFactory
This base class will be used to extend HlsDownloaderFactory from.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160523335
2017-06-30 16:40:53 +01:00
aquilescanta
e344e9cbb7 Add SinglePeriodTimeline constructor to fill missing window information
Issue:#2930

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160520480
2017-06-30 16:39:41 +01:00