- 09 Mar, 2022 6 commits
-
-
Overriding onTouchEvent was causing multiple issues, and appears to be unnecessary. Removing the override fixes: 1. StyledPlayerView accessibility issue where "hide player controls" actually toggled play/pause. 2. Delivery of events to a registered OnClickListener when useController is false. 3. Delivery of events to a registered OnLongClickListener in all configurations. 4. Incorrectly treating a sequence of touch events that exit the bounds of the view before ACTION_UP as a click, both for delivery to OnClickListener and for toggling the controls. Note: After this change, control visibility will not be toggled if the application developer explicitly sets the view to be non-clickable. I think that's probably working as intended though. It seems correct that a non-clickable view would not respond to clicks. Issue: google/ExoPlayer#8627 Issue: google/ExoPlayer#9605 Issue: google/ExoPlayer#9861 PiperOrigin-RevId: 433016626
olly committed -
This change rewrites the UI module's track selection components to depend on the Player API, allowing us to finally remove the UI module's dependency on ExoPlayer as a concrete player implementation. PiperOrigin-RevId: 432989318
olly committed -
The change will be useful in testing transcoding performance PiperOrigin-RevId: 432956283
claincly committed -
PiperOrigin-RevId: 432937645
samrobinson committed -
PiperOrigin-RevId: 432928418
samrobinson committed -
Previously, we've used getSupportedHeights/Widths() to find the supported resolution. However, the height/width can be over-reported when using these APIs. For example, getSupportedWidths and getSupportedHeights can both return 3840, but the supported height when using 3840 as width is only 2160. PiperOrigin-RevId: 432926192
claincly committed
-
- 05 Mar, 2022 1 commit
-
-
This makes the reading period advance early as expected at the end of an ad period. Before this change the reading position of the metadata renderer prevented advancing the period until metadata arrived after the start position of the following period. Only then the reading position of the metadata renderer is updated and beyond the start position of the following period which is a condition to advance the reading period. Because transitioning to the next period is a virtual transition and the SharedMediaPeriod keeps reading from the same underlying sample streams, the metadata renderer can safely be ignored for this check. #minor-release PiperOrigin-RevId: 432646037
bachinger committed
-
- 04 Mar, 2022 8 commits
-
-
PiperOrigin-RevId: 432485797
olly committed -
We will be migrating our track selection UI components to be based on TracksInfo. We need DownloadHelper to expose TracksInfo to make it compatible with such components. PiperOrigin-RevId: 432474487
olly committed -
This change fixes two bugs where MediaSessionServe shows a notification with the Play icon but tapping it will not start playback: 1. After playback ends: we need to seek to the beginning of the media item. 2. After adding media items to the player but not starting playback: We need to call Player.prepare() too. PiperOrigin-RevId: 432469953
christosts committed -
PiperOrigin-RevId: 432461547
claincly committed -
addTrackSelectionForSingleRenderer takes a list of legacy overrides, which are then set on the supplied parameters one at a time to run track selection. This allows multiple overrides for a single track type to be applied in the download use case, despite it not being possible to place such overrides directly into a single parameters. For new style overrides, multiple overrides for the same track type can be placed directly into a single parameters. Therefore we'll be able to replace use of addTrackSelectionForSingleRenderer with use of addTrackSelection, which is a much cleaner API. For this to work, we need to make DownloadHelper apply multiple overrides in this case. PiperOrigin-RevId: 432459834
olly committed -
This will allow for easier customisation of the additional tasks performed by the test runner, such as calculating metrics like SSIM. PiperOrigin-RevId: 432434850
samrobinson committed -
PiperOrigin-RevId: 432430345
christosts committed -
These were added in https://github.com/androidx/media/commit/b57aa34b66554097b0ea2296b05c828847e1fdd2 and then not removed when the rest of the code was removed in https://github.com/androidx/media/commit/0b0277af5001e5e669b007d33dcfffbf6e9d26db PiperOrigin-RevId: 432419684
ibaker committed
-
- 07 Mar, 2022 4 commits
-
-
These should have been removed as part of https://github.com/androidx/media/commit/1391b7c65dab1856dad363dff7c0a250245f1671, 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
ibaker committed -
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
christosts committed -
#minor-release PiperOrigin-RevId: 432189509
andrewlewis committed -
This method is no longer needed since we added SubtitleConfiguration#id in https://github.com/androidx/media/commit/59d98b9a4e2381647f3e4552b6935bcca1be6f89. Issue: google/ExoPlayer#10016 #minor-release PiperOrigin-RevId: 432169262
ibaker committed
-
- 03 Mar, 2022 8 commits
-
-
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
olly committed -
#minor-release PiperOrigin-RevId: 432154626
ibaker committed -
PiperOrigin-RevId: 431969914
bachinger committed -
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
olly committed -
PiperOrigin-RevId: 431658068
hschlueter committed -
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
hschlueter committed -
Destroying the context destroys all of OpenGL (see https://www.khronos.org/opengl/wiki/OpenGL_Context), so deleting textures is redundant. PiperOrigin-RevId: 431653728
hschlueter committed -
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
hschlueter committed
-
- 01 Mar, 2022 13 commits
-
-
Test list can be structured so tests don't need to be in different classes, cleaning up the location of new test cases. PiperOrigin-RevId: 431492941
samrobinson committed -
PiperOrigin-RevId: 431479473
claincly committed -
PiperOrigin-RevId: 431451974
hschlueter committed -
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
olly committed -
PiperOrigin-RevId: 431395359
Ian Baker committed -
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
bachinger committed -
PiperOrigin-RevId: 431376857
ibaker committed -
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
bachinger committed -
There's no media3 equivalent to the `com.google.android.exoplayer:exoplayer` dependency. PiperOrigin-RevId: 430955037
ibaker committed -
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
claincly committed -
PiperOrigin-RevId: 430946606
ibaker committed -
When investigating how 'bad' a failure is, it's useful to see the diff between input and output bitmaps. PiperOrigin-RevId: 430917732
samrobinson committed -
PiperOrigin-RevId: 430911179
ibaker committed
-