- 26 Jul, 2022 2 commits
-
-
PiperOrigin-RevId: 463320634 (cherry picked from commit 3aa5f259)
christosts committed
-
- 25 Jul, 2022 3 commits
-
-
Size requires API 21. Using Pair instead will allow effects to be used from API 18 during previewing once they are moved out of transformer. PiperOrigin-RevId: 463206474 (cherry picked from commit 4adf1993)
hschlueter committed -
PiperOrigin-RevId: 463193768 (cherry picked from commit 5db7778c)
hschlueter committed
-
- 08 Aug, 2022 1 commit
-
- 25 Jul, 2022 1 commit
-
- 22 Jul, 2022 2 commits
-
-
This is needed for applying effects to a playlist. The effects are applied based on the presentation time of the frame in its corresponding media item and the offset is added back before encoding. Each time the offset changes, end of input stream is signalled to the texture processors. This is needed because the texture processors can expect monotonically increasing timestamp within the same input stream but when the offset changes, the timstamps jump back to 0. PiperOrigin-RevId: 462714966 (cherry picked from commit 30e5bc98)
hschlueter committed -
The DefaultMediaNotificationProvider caches the last loaded artwork bitmap so that the bitmap isn't loaded again when the notification is updated, e.g., the player is transiting from playing to paused. However, loading bitmap requests for bitmaps that are already being loaded are not suppressed. For example, if the notification is updated while the artwork is still downloading, the same artwork might be downloaded multiple times. This change suppresses a bitmap load request if the same artwork is still being loaded, to avoid additional artwork downloads. #minor-release PiperOrigin-RevId: 462572221 (cherry picked from commit dd2c16bc)
christosts committed
-
- 21 Jul, 2022 8 commits
-
-
We currently clear all pending messages, including the one that flushes pending commands to the MediaSession. To ensure all commands that have been called before controller.release() are still sent, we can manually trigger the flush message from the release call. Related to handling the final flush because disconnecting the controller, MediaSessionStub didn't post the removal of the controller to the session thread, creating a race condition between removing the controller and actually handling the flush. Issue: androidx/media#99 PiperOrigin-RevId: 462342860 (cherry picked from commit ee209690)
tonihei committed -
These constructors are currently very intertwined, passing `this` references from the constructor of one to the constructor of another before the first constructor is complete (and so the `this` reference isn't really valid yet). This change uses checker framework `@UnderInitialization` and `@NotOnlyInitialized` annotations to make it more clear that the references are not available yet. For the one 'direct' access needed in the second constructor (calling `getApplicationLooper()`) we now pass the `applicationLooper` directly alongside (to avoid needing to dereference the reference 'too early'). This change also ensures that where a class hierarchy has a 'dependent' class hierarchy, the 'subclass' instance is always used (by both subclass and superclass) without casting or manually hiding the superclass field, by defining an overridable `getFoo()` method instead and always using it. #minor-release PiperOrigin-RevId: 462335043 (cherry picked from commit 287c7579)
ibaker committed -
This allows us to use BT.2020 RGB linear for intermediate shaders, which also allows us to re-enable PeriodicVignetteProcessor, which should work properly in linear color-spaces. Manually tested by adding a GlEffectsWrapper, and confirming that HLG HDR editing still looks correct. PiperOrigin-RevId: 462265821 (cherry picked from commit 2f977eee)
huangdarwin committed
- 20 Jul, 2022 5 commits
-
-
Add a Builder to constructor DefaultMediaNotificationProvider. The Builder can also set the provider's: - notification ID - notification channel ID - notification channel name The change adds an API for apps to set the small icon in notifications. #minor-release Issue: androidx/media#104 PiperOrigin-RevId: 462111536 (cherry picked from commit 436ff6d8)
christosts committed -
Some commands are run asynchronously and subsequent commands need to wait until the previous one finished. This can be supported by returning a Future for each command and using the existing command execution logic to wait for each Future to complete. As some MediaSessionStub code is now executed delayed to when it was originally created, we also need to check if the session is not released before triggering any actions or sending result codes. Issue: androidx/media#85 PiperOrigin-RevId: 462101136 (cherry picked from commit 7cb7636e)
tonihei committed -
The commands currently use a task and a postTask that are chained together manually. In some cases, e.g. when adding MediaItems, the postTask is already a chain of commands in itself. To allow using the entire command handling as a single task (for simplified queueing), we can change the implementation to always create a single task. If multiple subtasks need to be chained together, we can do that by wrapping the method calls. In case a task is asynchronous, we can also use Futures to chain them together. Overall, this is just a refactoring and changes no logic. Issue: androidx/media#85 PiperOrigin-RevId: 462085724 (cherry picked from commit 45f1f5b3)
tonihei committed
- 19 Jul, 2022 9 commits
-
-
This adds two methods that are helpful when working with Futures. One is a version of postOrRun that can indicate completion by a Future and the other is a simplified version of Guava's Futures.transformAsync (which can't be used as it's in Beta). PiperOrigin-RevId: 461896598 (cherry picked from commit f9eec0c0)
tonihei committed -
PiperOrigin-RevId: 461888238 (cherry picked from commit 21016eaa)
samrobinson committed -
Otherwise, invalid ColorInfo instances generated using faulty MediaFormat#getInteger values could cause exceptions. Confirmed that b/239435670 reproduces without this CL, and does not reproduce with this CL. PiperOrigin-RevId: 461862191 (cherry picked from commit 87198fe7)
huangdarwin committed -
This will help developers self-diagnose issues like Issue: google/ExoPlayer#10392 where the NPE occurs far from the original null value because a field gets assigned to null. This change aims to ensure that every stable method on Player, ExoPlayer and ExoPlayer.Builder that takes a non-null type will fail with an NPE before returning. #minor-release PiperOrigin-RevId: 461846580 (cherry picked from commit e1fde5d5)
ibaker committed -
Some commands may be asynchronous and subsequent commands need to wait for them to complete before running. This change updates the queue to use (and listen to) Futures instead of calling Runnables directly. The commands are currently still added as Runanbles though, so this change is a no-op. Also moves the permission check in MediaSessionImpl to before queueing the command because the permission should be check at the time of calling the method. When executing the comamnds in the queue, we need to be careful to avoid recursion in the same thread (which happens when both the Future is immediate and running on the correct thread already). To avoid recursion, we detect this case and loop the commands instead. Issue: androidx/media#85 PiperOrigin-RevId: 461827264 (cherry picked from commit dee80788)
tonihei committed
- 18 Jul, 2022 6 commits
-
-
* Introduced `useHdr` for `GlEffect#toGlTextureProcessor`, so `TextureProcessor` implementations can decide how to handle HDR. * Creating FP16 color textures for HDR input. Tested via manual testing, adding a no-op GlEffectWrapper to the transformation to force use of intermediate textures, adding a linear ramp to the fragment shader, and trying to ascertain that there's a real reduction in posterization when switching from 4-bit to 8-bit unsigned bytes, and again from 8-bit unsigned bytes to 16-bit floating point. PiperOrigin-RevId: 461613117 (cherry picked from commit ba9c9bb9)
huangdarwin committed -
This may happen when a containers' color transfer incorrectly does not match the video's color transfer. An example of a file with such a mismatch is the current Transformer demo HDR10 sample file. Manually tested by confirming that no errors are emitted for SDR and HLG sample files, and that errors are emitted for our incorrect HDR10 sample file. PiperOrigin-RevId: 461583532 (cherry picked from commit 9f7a159b)
huangdarwin committed -
- Update profile selection logic to pick an HDR-compatible profile when doing HDR editing on H.264/AVC videos. - Handle doing the capabilities check for all MIME types that support HDR (not just H.265/HEVC). - Fix a bug where we would pass an HDR input color format to the encoder when using tone-mapping. - Tweak how `EncoderWrapper` works so decisions at made at construction time. Manually tested cases: - Transformation of an SDR video. - Transformation of an HDR video to AVC (which triggers fallback/tone-mapping on a device that doesn't support HDR editing for AVC). - Transformation of an HDR video with HDR editing. PiperOrigin-RevId: 461572973 (cherry picked from commit 604ab7fc)
andrewlewis committed -
The old URL doesn't correctly signal the HDR10 color info in the container. The new URL signals ST2084 (PQ) transfer function and BT.2020 color space as expected. PiperOrigin-RevId: 461560107 (cherry picked from commit 794e366b)
andrewlewis committed
-
- 15 Jul, 2022 1 commit
-
- 14 Jul, 2022 1 commit
-
-
These are providing more variety and complexity. All files are okay to be public. PiperOrigin-RevId: 460935247 (cherry picked from commit b87fa45f)
samrobinson committed
-
- 13 Jul, 2022 1 commit
-
-
Also remove VideoEncoderSettings.colorProfile as there are no concrete use cases for customizing this and it clashes with picking the color format automatically based on SDR vs. HDR. PiperOrigin-RevId: 460746987 (cherry picked from commit 7954eeb3)
hschlueter committed
-