- 20 Mar, 2020 2 commits
-
-
This was missed in https://github.com/google/ExoPlayer/commit/f08eed4145613527c0a4907e035ba483db6df253 Part of issue:#6765 PiperOrigin-RevId: 301796232
ibaker committed -
Also add a couple of tests to enforce the documentation. PiperOrigin-RevId: 301796102
ibaker committed
-
- 19 Mar, 2020 38 commits
-
-
Issue: #2159 PiperOrigin-RevId: 301705371
olly committed -
- This change also adds support for VideoFrameMetadataListener in the AV1 renderer - This is a preliminary step prior to adding FfmpegVideoDecoder Issue: #2159 PiperOrigin-RevId: 301702460
olly committed -
This is a necessary step for Decoder implementations to support audio and video. MediaCodecRenderer.DecoderException is renamed MediaCodecDecoderException and extends the new DecoderException Issue: #2159 PiperOrigin-RevId: 301698238
olly committed -
We have two known scenarios where the app could create an OOM error and we want to handle it gracefully: 1. The app continues to allocate memory but doesn't make any progress in the buffered position. OOM should be prevented by the default load control and it should eventually throw an exception. 2. An extractor tries to allocate a large amount of memory on the Loader thread based on information it read in faulty media files. In this case we should attempt to play remaining media and then throw an exception. Both cases are already handled correctly, but we don't have any tests ensuring that we don't introduce regressions. PiperOrigin-RevId: 301585700tonihei committed -
This removes a workaround that always continues buffering and instead detects if the LoadControl returns false even though we don't have any buffer. If enabled by a flag, this condition throws an exception. PiperOrigin-RevId: 301584239
tonihei committed -
This allows to customize the DrmSessionManager, e.g. with a LoadErrorHandlingPolicy. Issue:issue:#7078 PiperOrigin-RevId: 301571783
tonihei committed -
Issue: #7097 PiperOrigin-RevId: 301456951
bachinger committed -
The restriction that these classes only work with SimpleDecoders is unnecessary. An FfmpegVideoRenderer will not be able to use a SimpleDecoder, because the SimpleDecoder assumption that each input buffer can be decoded immediately into a corresponding output is not true for all video codecs that Ffmpeg supports (e.g., H264 does not have this property). Generalizing SimpleDecoderVideoRenderer to DecoderVideoRenderer will allow FfmpegVideoRenderer to still use the base class, without having to use a SimpleDecoder. This is a preliminary change toward being able to merge a version of https://github.com/google/ExoPlayer/pull/7079. Issue: #2159 PiperOrigin-RevId: 301412344
olly committed -
PiperOrigin-RevId: 301406108
tonihei committed -
PiperOrigin-RevId: 301397420
olly committed -
The test is flkay (2/1000 runs) because the decoder initialization before and after the seek are not perfectly deterministic. I couldn't find a way to make them deterministic, so slightly chaning the test setup instead. The test setup change doesn't affect the scenario being tested. PiperOrigin-RevId: 301390491
tonihei committed -
When no tracks are selected (or only tracks of unknown type), the target buffer size is calculated to be 0. This means the player won't request to buffer more data, nor can it start playback and will be stuck forever. PiperOrigin-RevId: 301374229
tonihei committed -
The FakeSampleStream is currently always ready even if it doesn't have any samples to read. Fix that by checking for the conditions under which read() will be successful. PiperOrigin-RevId: 301371031
tonihei committed -
The assertion about the expected formats doesn't really belong in a fake, the assertions should be closer to the test method. This gets in the way when I try and write a new test in AnalyticsCollectorTest that doesn't use the expected, constant Format (because i want to specify drmInitData) - but changing the expected Format is tricky because it's hard-coded into the FakeVideoRenderer inner class. I replaced the assertion in FakeRenderer with assertions in test methods that used to assert on the format count. PiperOrigin-RevId: 301353072
ibaker committed -
Follow-up to https://github.com/google/ExoPlayer/commit/42b8fe2681758b60f2d1e6df79d0727ce4a953d4 PiperOrigin-RevId: 301352557
ibaker committed -
PiperOrigin-RevId: 301352482
kimvde committed -
Issue: #2159 PiperOrigin-RevId: 301351495
olly committed -
Issue: #2159 PiperOrigin-RevId: 301345559
olly committed -
PiperOrigin-RevId: 301336818
ibaker committed -
PiperOrigin-RevId: 301224632
bachinger committed -
Previously calling removeListener would remove all instances of that listener. Now it only removes a single instance. This probably should have been part of introducing the Multiset: https://github.com/google/ExoPlayer/commit/2bd4d61b9b8c838fb7dc81e7d6f513c4a4e00c76 PiperOrigin-RevId: 301191940
ibaker committed -
PiperOrigin-RevId: 301187369
kimvde committed -
Without this change there's confusing behaviour if you pass e.g. AnalyticsCollector (which implements both DrmSessionEventListener and MediaSourceEventListener) to MediaSource.addEventListener: It will receive DRM events too, even though you never passed it to MediaSource.addDrmEventListener. Also add some tests for MediaSourceEventDispatcher. PiperOrigin-RevId: 301169915
ibaker committed -
Issue: #7069 PiperOrigin-RevId: 300738492
olly committed -
This is a partial revert of <unknown commit>. The split and the order is important. For example, as things are currently, if playback fails for a test that makes additional assertions in onTestFinished, the visible reason the test failed is quite likely to be one of the additional assertions, rather than the error that actually caused the playback to fail. I think we probably also don't want to log metrics if playback fails. PiperOrigin-RevId: 300733109
olly committed -
PiperOrigin-RevId: 300727785
samrobinson committed -
This prevents OOM errors for high bitrate streams that attempt to fill the buffer regardless of the memory usage. Also change the max buffer sizes to ensure this is a no-op for video streams < 20Mbps and audio streams < 260kbps. Issue:#6647 Issue:#7006 PiperOrigin-RevId: 300720299
tonihei committed -
Issue: #6761 PiperOrigin-RevId: 300715682
andrewlewis committed -
After this change users of ExoPlayerImpl and SimpleExoPlayer can use the media item base playlist API which converts the media item to a media source. It adds the media item based methods to the ExoPlayer instead of the Player interface. This avoids a big change in the CastPlayer which requires migrating the cast extension to the MediaItem of the core module (follow up CLs). PiperOrigin-RevId: 300575567
bachinger committed -
PiperOrigin-RevId: 300554337
bachinger committed -
This CL removes the prefixes to the tests added after https://github.com/google/ExoPlayer/commit/a6d0caaa3c95746beb4e82c1005c06cbb14b6f6c. This CL is generated by following command $ find -name '*Test.java' | xargs -I{} sed -i 's/^\ \ public\ void\ test\([A-Z]\)\(.*\)$/ public void \L\1\E\2/' {} PiperOrigin-RevId: 300547504
olly committed -
Related to issue:#6765 PiperOrigin-RevId: 300539527
ibaker committed -
This is one step toward following the google3's test naming convention. See go/java-testing/getting_started#basic-test-template for details why prefix test isn't necessary. This CL is generated by following command $ find -name '*Test.java' | xargs -I{} sed -i 's/^\ \ public\ void\ test\([A-Z]\)\(.*\)$/ public void \L\1\E\2/' {} PiperOrigin-RevId: 300537212olly committed -
This is one step toward following the google3's test naming convention. See go/java-testing/getting_started#basic-test-template for details why prefix test isn't necessary. This CL is generated by following command $ find -name '*Test.java' | xargs -I{} sed -i 's/^\ \ public\ void\ test\([A-Z]\)\(.*\)$/ public void \L\1\E\2/' {} PiperOrigin-RevId: 300530329olly committed -
This avoids duplicate events being dispatched to object foo if addListener(foo) is called more than once. Part of issue:#6765 PiperOrigin-RevId: 300529733
ibaker committed -
We currently have the following logic to update renderers during period transitions: 1. Wait for the currently reading period to finish reading all its streams. a. Advance reading period. b. Set all streams that can't be replaced to final. c. If streams can be replaced, replace them now. 2. Wait until playback position reaches the transition point a. Disable all unneeded renderers (or those that need re-enabling). b. Advance playing period. c. Enable all new renderers (i.e. all except the ones where we replaced streams directly in step 1c. This logic causes delays because steps 2a and 2c can easily happen before 2b. Doing this allows a smooth transition for cases where renderers change or where they need to be re-enabled. The new order after this change is: 1. Wait for currently reading period to finish reading. a. Advance reading period. b. Set all streams that can't be replaced to final. 2. Update reading renderers iteratively. a. If streams can be replaced, replace them asap. b. If renderes need to be disabled, do so as soon as the respective renderer ended. c. Once step b is fully finished, enable or re-enable all new renderers. 3. Wait unril playback position reaches the transition point AND all tasks in step 2 are done (i.e. all renderers are set up for the playing period). a. Advance playing period. As a nice side effect, decoder enabled and disabled events are now always reported for the reading period, which is more consistent with other renderer callbacks. PiperOrigin-RevId: 300526983tonihei committed -
This means DataSource.read now may throw InterruptedException. PiperOrigin-RevId: 300523430
aquilescanta committed -
PiperOrigin-RevId: 300519989
ibaker committed
-