These should have been removed as part of 1391b7c65d, since we no
longer officially support overriding the layout file for this class.
This class is known as StyledPlayerView in exoplayer2.
#minor-release
PiperOrigin-RevId: 432411322
The MockPlayer has a single CountDownLatch field and multiple boolean
flags that track if a player method was called. Upon calling the methods
the latch count. Tests set the latch count to match exactly with the
number of expected player interactions then block the test thread until
the latch reaches zero and assert the respective method flags are true.
This is subject to false positives. If the underneath implementation
changes and call more player method, then the test thread will unblock
as soon as a certain number of interactions is performed, which may be
less than what the test expected originally. However, the test may stil
pass if the player thread had enough time to update the expected method
flag.
This change removes the single CountDownLatch and the boolean flags and
instead it adds APIs to query the MockPlayer if a method has been called
and await until a method is called. Internally, the MockPlayer has a
ConditionVariable per method.
PiperOrigin-RevId: 432399077
This method is no longer needed since we added SubtitleConfiguration#id
in 59d98b9a4e.
Issue: google/ExoPlayer#10016
#minor-release
PiperOrigin-RevId: 432169262
DownloadHelper is in the ExoPlayer module, so there's no reason
why it can't use ExoPlayer specific track selections. That said,
we want our UI components to operate on generic
TrackSelectionParameters, and we want such UI components to be
useful for selecting tracks for download. To keep this interop,
it's necessary to have DownloadHelper accept generic
TrackSelectionParameters, or to require application code to
convert them. The first approach seems preferable!
PiperOrigin-RevId: 432158846
This constructor always does the wrong thing for non-adaptive groups
containing more than 1 track, because it'll incorrectly generate an
adaptive selection. Replace it with a constructor for specifying a
single track within the group instead.
PiperOrigin-RevId: 431673458
Only log GL exceptions in GlUtil if they aren't thrown. Otherwise,
it's up to the caller whether or not to log them to avoid logging them
twice.
PiperOrigin-RevId: 431657397
This test tests the same cases as the FrameEditorDataProcessingTest
as currently the main FrameEditor functionality is to apply a
transformation matrix using a TransformationFrameProcessor.
PiperOrigin-RevId: 431642066
As evidenced by the somewhat awkward logic in PlayerControlView, the
previous design wasn't very friendly to expected usage. There will be
more usage when the track selection dialog components are migrated,
which would be similarly awkward without this change.
PiperOrigin-RevId: 431407675
This is consistent with the new MediaSessionStub that accepts page index 0
and the JavaDoc of legacy and new service callbacks.
Issue: androidx/media#32
PiperOrigin-RevId: 431390454
When a live stream is joined while ads are already playing, the LOADED event is
missed and we don't have ad information for those ads in the ad group that are
before the ad index at which we joined. This way we can clip the duration when we
receive the LOADED event for the last ad in the group. This fixes the problem of
the playback controls being hidden when content resumes after the ad group.
#minor-release
PiperOrigin-RevId: 431269627
We use SSIM to measure the transcoding quality between. SSIM is a widely used
tool that compares the luma channel between two images, and generates a score
from 0 to 1 that indicates "how similar" the two images are.
In `SsimHelper`, we decode the two videos, extract matching frames and
calculates the mean SSIM (SSIM averaged all matching frames) for both videos.
Matching frames are referred to as "comparisonFrame" in the CL, which is
selected based on the frame number and a user-set comparison interval.
For instance, if the interval is 7, then every seventh frames are compared.
We use MediaCodec/MediaExtractor to decode the video, and use ImageReader to
extract the decoded frame.
The SSIM calculation logic is a inspired by and modified from the CTS
[MSSIMMatcher](https://cs.android.com/android/platform/superproject/+/master:cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapcomparers/MSSIMComparer.java;l=1?q=mssimcom)
that has some errors and extra features we don't need (like handling RGB
images).
Adds TranscodeQualityTest to ensure high quality transcoding.
PiperOrigin-RevId: 430951206
The command is not needed, because the specified branch is already the
default branch on GitHub so will be checked out by clone automatically.
PiperOrigin-RevId: 430910549
*** Original commit ***
Rollback of caf62842c4
*** Original commit ***
Rollback of c2cb22a056
*** Original commit ***
Rollback of 1521e50307
*** Original commit ***
PiperOrigin-RevId: 430905772
The AsyncronousMediaCodecAdapter should call MediaCodec.start()
on the same thread it calls MediaCodec.flush(), i.e. the playback
thread. This change removes the experimental flag that allowed
calling MediaCodec.start() from the callback thread.
The flag was flipped to true already.
PiperOrigin-RevId: 430689665
This can fix the following warning caused by commit a7aa84a:
Warning: com.google.android.exoplayer2.drm.UnsupportedDrmException.Reason:
The typedef annotation should have @Retention(RetentionPolicy.SOURCE)
Author: Tony Guo <tony.guo.peng@gmail.com>
Date: Mon Feb 28 10:56:52 2022 +0800
We need to access internal state to work around resources not being released on
old API versions. Add a reference to the bug about this and suppress the lint
warning.
#minor-release
PiperOrigin-RevId: 430190794