- 01 May, 2020 24 commits
-
-
Expose this through ExtractorAsserts via a new AssertionConfig object PiperOrigin-RevId: 308980701
ibaker committed -
adPlaybackState is now non-null, and the uninitialized case is covered by a new boolean hasAdPlaybackState. Position progress updates are now non-null and initialized with IMA's VIDEO_TIME_NOT_READY constant. Also fix some misc code issues: - Remove empty branch for SmoothStreaming (Android Studio warns about this). - Tidy onTimelineChanged and onPositionDiscontinuity and the methods they call to improve naming. - Remove logging for IMA events after release, as these methods are expected to be called in the current IMA SDK behavior. PiperOrigin-RevId: 308977116
andrewlewis committed -
The player's initial PlaylistTimeline has no ad cue points, so its first MediaPeriodId has no nextAdGroupIndex. When the AdsMediaSource provides its first timeline, the cue points become known. For the case where a preroll cue point appeared, the preroll was detected due to isAd changing on the MediaPeriodId. For the case where a midroll/postroll cue point appeared, the MediaPeriodId was actually treated as the same, which leads to keeping the unclipped original MediaPeriod. Fix this behavior by checking for nextAdGroupIndex becoming set or decreasing. PiperOrigin-RevId: 308974490
andrewlewis committed -
PiperOrigin-RevId: 308918151
bachinger committed -
PiperOrigin-RevId: 308854072
ibaker committed -
PiperOrigin-RevId: 308846313
aquilescanta committed -
PiperOrigin-RevId: 308844678
olly committed -
PiperOrigin-RevId: 308843488
olly committed -
PiperOrigin-RevId: 308841370
insun committed -
Its only real purpose is to encapsulate a download ID, but it doesn't actually save any code, and arguably makes it more complicated by having multiple lists of Downloader instances, indexed by key, and also because it's another (undocumented) class to understand. This CL retains the multiple Downloader lists, but they will be flattened in a child CL. PiperOrigin-RevId: 308838026
olly committed -
PiperOrigin-RevId: 308835671
olly committed -
This is equivalent to the method ExoPlayer provides. It's nice for consistency, and for retrieving the looper from test code. PiperOrigin-RevId: 308830288
olly committed -
DownloadRunner.getDownloader was creating Downloader instances before the actual DownloadManager under test would have created them. Tests were then asserting and manipulating these Downloader instances, which is quite confusing. In particular FakeDownloader.assertDoesNotStart() is an assertion on a Downloader instance that only makes sense when called on an instance that DownloadManager would not have created by itself. This change replaces FakeDownloader.assertDoesNotStart() with an assertion on DownloadRunner that no Downloader instance has been created. PiperOrigin-RevId: 308822398
olly committed -
- Assertion chaining is generally discouraged. For example, because it's harder to determine which assertion failed given a line number. - Also removed chaining of the form obj.actionX().assertY(), because it's easy for someone editing the test to accidentally delete actionX() when deleting assertY(), where-as actionX() may often be important for subsequent assertions. PiperOrigin-RevId: 308820503
olly committed -
- Remove assertReleased and replace it with a proper condition variable that's opened when Downloader.download or Download.remove finish. As far as I can tell assertReleased was basically implementing "sleep for 10 seconds after the Downloader starts". Note fixing this properly also makes the tests run much faster! - Use ConditionVariable instead of CountDownLatch(1). - Use AtomicInteger instead of volatile int because it's clearer and allows removal of explanatory comments. PiperOrigin-RevId: 308819204
olly committed -
The mocking setup is quite messy/unclear compared to the fakes, but it seems worth switching over because IMA API changes have already required changes to fakes in the past, and there are more API changes in the version we are about to upgrade to. This change should generally remove the need to keep the fakes up-to-date. PiperOrigin-RevId: 308819176
andrewlewis committed -
PiperOrigin-RevId: 308815613
olly committed -
- Improve documentation explaining the benefits of ExoPlayer's ConditionVariable over the one that the platform provides - Allow Clock injection - Create TestUtil method for obtaining a ConditionVariable whose block(long) method times out correctly when used in a Robolectric test - Add basic unit tests for ConditionVariable PiperOrigin-RevId: 308812698
olly committed -
This allows users to verify their own usage before the default value is changed to an opt-out. issue:#4463 PiperOrigin-RevId: 308808722
tonihei committed -
Android scheduler has performance issues when a device has a combiation of big/medium/little cores. Add a heuristic to set the default number of threads used for deocding to the number of "performance" (i.e. big) cores. PiperOrigin-RevId: 308683989
vigneshv committed -
To be used by the LoadErrorHandlingPolicy. PiperOrigin-RevId: 308657905
aquilescanta committed -
This will make it a bit easier to push manifest loads to an Executor. Issue: #5978 PiperOrigin-RevId: 308608155
olly committed -
A previous change added these getters to CacheDataSource, but it can also be useful to retrieve these components directly from the factory. This is useful for tasks where we're going to need to build multiple CacheDataSource instances (e.g., to make requests in parallel), and also need to operate directly on the same components. It's a bit more natural to retrieve them from the factory than from an arbitrary CacheDataSource in this case, since it can avoid unnatural code where you create a CacheDataSource instance earlier than you would otherwise just to use its getters, and/or create one just to use its getters and then throw it away. PiperOrigin-RevId: 308606020
olly committed -
PiperOrigin-RevId: 308597964
olly committed
-
- 27 Apr, 2020 16 commits
-
-
- Executor is a superclass of ExecutorService, so this is arguably a little more flexible. - It removes the need to use null for direct execution, because Runnable::run is a direct executor that can be trivially used instead. - Removing the error-prone "cannot be a direct executor" restriction in the parallel version of SegmentDownloader requires not relying on the futures returned from ExecutorService.submit() anyway. Issue: #5978 PiperOrigin-RevId: 308586620
olly committed -
When pausing and resuming a playback using an AdsLoader it is necessary to call setPlayer again. This fixes an issue where playback was stuck in the buffering state when pausing and resuming an ad playback in the demo app. PiperOrigin-RevId: 308582143
andrewlewis committed -
Notes: this doesn't fix the current issue where the component containing the ad overlay view leaks, but is good practice anyway. PiperOrigin-RevId: 308582036
andrewlewis committed -
PiperOrigin-RevId: 308229206
Ian Baker committed -
Currently, this method is only supposed to be called before removing the listener from the player or when releasing the player. If called at other times, it will throw an exception later when a playback session is ended automatically. issue:#7193 PiperOrigin-RevId: 308254993
tonihei committed -
PiperOrigin-RevId: 308246116
tonihei committed -
The error type thrown when acquiring a license that has already been released changed from MediaDrmStateException to IllegalStateException from API 29. Update the tests to assert the correct type of error based on API version. PiperOrigin-RevId: 308239508
tonihei committed -
Issue: #7273 PiperOrigin-RevId: 308238035
aquilescanta committed -
The method is used to finish a brief "seeking" state that can be removed entirely now state changes for seeking are masked. PiperOrigin-RevId: 308237009
tonihei committed -
sneelavara committed
-
sneelavara committed
-
Sadashiva Neelavara committed
-
This changes fixes issue #7181. Removing CEA-608 captions that timeout after 16 seconds without a clear.
Sadashiva Neelavara committed -
This makes the distinction more clear between the methods that test a specific behaviour (and are meant to be used with parameterized tests) and those that test everything in one go. Also add a TODO to FlacExtractorTest to migrate it when we can PiperOrigin-RevId: 308228421
ibaker committed -
Also mark the two assertOutput methods private, to make the API surface smaller. PiperOrigin-RevId: 308228186
ibaker committed -
Unmarshal from json to MediaItem instead of Sample. Further the playlist of MediaItems is converted to Intent extras which are read by the PlayerActivity. PiperOrigin-RevId: 308141231
bachinger committed
-