15006 Commits

Author SHA1 Message Date
Jorge Antonio Diaz-Benito Soriano
28e32072b6
Cap concurrent removal DownloadManager.Tasks 2022-07-21 14:38:47 +02:00
andrewlewis
604ab7fcda Make minor fixes to HDR handling
- 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
2022-07-21 12:38:41 +00:00
andrewlewis
794e366b36 Update demo HDR10 video URL
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
2022-07-21 12:37:39 +00:00
Manisha Jajoo
ef57a061b7 Pass local copy of input to RtpH263ReaderTest's consume method
This change is done to keep the frame data unchanged.
RtpH263Reader changes the header data in input, so to send the same
RTP packet across multiple tests, each test copies the frame data
into a new packet and sends that to the reader.
2022-07-19 11:45:39 +05:30
Manisha Jajoo
c7fbf3437f Revert "Keep the input data constant in consume method"
This reverts commit 3bacb1646c9ecd01e403465c7643888e83a9e79d.
2022-07-19 11:40:01 +05:30
Manisha Jajoo
69a716f633 fix review comments in RtpH263ReaderTest 2022-07-18 10:44:51 +05:30
Manisha Jajoo
3bacb1646c Keep the input data constant in consume method
Earlier, the consume method of RtpH263Reader was changing the bytes of the
input bitstream during header parse. This commit copies the input into
local context and changes the local variable as per the specifications
thus keeping the input constant.
2022-07-18 10:43:41 +05:30
olly
9271572e95 Add TODOs for registerReceiver calls without flag
PiperOrigin-RevId: 461165173
2022-07-15 12:19:04 +00:00
rohks
be27daebc4 Version bump to exoplayer:2.18.1 and media3:1.0.0-beta02
#minor-release

PiperOrigin-RevId: 461162552
2022-07-15 10:20:58 +00:00
samrobinson
b87fa45fea Add additional video files.
These are providing more variety and complexity.

All files are okay to be public.

PiperOrigin-RevId: 460935247
2022-07-15 10:19:56 +00:00
Manisha Jajoo
da47771d10 Add test for Rtp H263 Reader
Change-Id: I57d57881ef5c158d41be1bf1e3714332d50cd3a9
2022-07-14 09:36:32 +05:30
hschlueter
7954eeb3c2 Use COLOR_Format32bitABGR2101010 for HDR encoder configuration.
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
2022-07-13 17:49:24 +00:00
tonihei
adc50515e9 Fix setDataSourceFactory handling in DefaultMediaSourceFactory
The call doesn't currently reset the already loaded suppliers and
factories. Also fix the supplier loading code to use a local copy
of the current dataSourceFactory to avoid leaking an updated
instance to a later invocation.

Issue: androidx/media#116

#minor-release

PiperOrigin-RevId: 460721541
2022-07-13 17:48:16 +00:00
tonihei
9a616c0cee Use SingleThreadExecutor to release AudioTracks
We currently start a simple Thread to release AudioTracks
asynchronously. If many AudioTracks are released at the same
time, this may lead to OOM situations because we attempt to
create multiple new threads.

This can be improved by using a shared SingleThreadExecutor.
In the simple case of one simmultaneous release, it's exactly
the same behavior as before: create a thread and release it
as soon as it's done. For multiple simultanous releases we
get the advantage of sharing a single thread to avoid creating
more than one at the same time.

Issue: google/ExoPlayer#10057
PiperOrigin-RevId: 460698942
2022-07-13 17:47:20 +00:00
samrobinson
f903869eb8 Fix assertion error when using high quality targeting API.
Add test that verifies SSIM with API enabled.

#minor-release

PiperOrigin-RevId: 460692420
2022-07-13 17:46:38 +00:00
Rohit Singh
bd8723e35a Merge pull request #10185 from TiVo:p-custom-logger
PiperOrigin-RevId: 460689252
2022-07-13 17:45:54 +00:00
samrobinson
a88426ae58 Clarify format is supported by encoder.
#cleanup
#minor-release

PiperOrigin-RevId: 460688226
2022-07-13 17:44:37 +00:00
claincly
40fd3ffa6c Fix two typos in RtpVp8Reader and test
PiperOrigin-RevId: 460662425
2022-07-13 17:43:29 +00:00
bachinger
f9a39201aa Add migration script
Note: This was already reviewed in <unknown commit>. This doesn't mean we cannot apply further changes though.
PiperOrigin-RevId: 460542835
2022-07-13 17:42:28 +00:00
bachinger
b61a06ba2f Don't set the tag in CastTimeline
Leaving the media item that has been passed in unchanged, ensures that the
media item in the timeline is equal to the media item that the user has
passed into the player. The value of the tag is the uid of the window,
meaning this is redundant information.

#minor-release

PiperOrigin-RevId: 460542246
2022-07-13 17:41:37 +00:00
Rohit Singh
9d9bbe3d33 Merge pull request #110 from ittiam-systems:rtp_vp8_test
PiperOrigin-RevId: 460513413
2022-07-13 17:40:18 +00:00
claincly
e56219f1f6 Fix a mis-match in encoder priority.
PiperOrigin-RevId: 460500666
2022-07-13 17:39:16 +00:00
rohks
704aa2531a Ignore reserved bit in parsing NAL unit type
`HevcConfig.parse` misreads reserved bit to determine NAL unit type. This is currently meant to be always set to 0, but could be given some kind of meaning in a future revision.

Issue: google/ExoPlayer#10366
PiperOrigin-RevId: 460487613
2022-07-13 17:38:02 +00:00
tonihei
549496f1fa Add method to check if tunneling is enabled.
Issue: google/ExoPlayer#2518
PiperOrigin-RevId: 460482615
2022-07-13 17:36:42 +00:00
bachinger
6922bd58ee Enable onMediaMetadataChanged in CastPlayer
Issue: androidx/media#25
PiperOrigin-RevId: 460476841
2022-07-13 17:35:36 +00:00
tonihei
223922fb11 Fix DefaultAudioSinkTest flakiness.
Some calls to handleBuffer return false while a previous
flush is still handled in the background.

Fix this by either asserting the method returns true if
we don't expect any delay, or calling it repeatedly until
it returns true (within a timeout).

PiperOrigin-RevId: 460474419
2022-07-13 17:34:49 +00:00
Manisha Jajoo
a38059d109 Update H263 Reader to handle missing frames/fragments.
Change-Id: I43dfbabcbe686c31cb54e6b95688af1fa35a3d24
2022-07-13 17:46:31 +05:30
claincly
776c8a5544 Verified encoding performance, removing TODO.
PiperOrigin-RevId: 460459378
2022-07-12 15:15:03 +00:00
ibaker
ad46cb1c81 Group COMMAND_SET_MEDIA_ITEM and COMMAND_CHANGE_MEDIA_ITEMS together
I don't think it's useful to keep these in numerical order, it makes
more sense to keep them grouped into a 'logical' ordering.

#minor-release

PiperOrigin-RevId: 460453464
2022-07-12 15:14:12 +00:00
hschlueter
66e1229988 Set ColorInfo in decoder configuration format.
Pass the color info and HDR static metadata when configuring the decoder
using MediaFormatUtil.maybeSetColorInfo.

PiperOrigin-RevId: 460424985
2022-07-12 15:13:13 +00:00
hschlueter
a5ff4ef17f HDR: Check whether EXT_YUV_target extension is supported.
This extension is needed for editing HDR input with OpenGL, as the
ExternalTextureProcessor samples raw YUV values from the
external texture for HDR and converts them to RGB itself rather than
relying on the OpenGL driver to do this automatically as for SDR.

PiperOrigin-RevId: 460424154
2022-07-12 15:11:21 +00:00
bachinger
30fbc3a27d Use the public MediaItem in the timeline of CastPlayer
The media item needs to be assigned to `Window.mediaItem` in `CastTimeline.setWindow`. For this the `MediaItem` needs to be available in the timeline.

When a `MediaItem` is passed to the `set/addMediaItems` method, we can't yet know the Cast `MediaQueueItem.itemId` that is generated on the device and arrives with an async update of the `RemoteMediaClient` state. Hence in the `CastTimelineTracker`, we need to store the `MediaItem` by Casts's `MediaItem.contentId`. When we then receive the updated queue, we look the media item up by the content ID to augment the `ItemData` that is available in the `CastTimeline`.

Issue: androidx/media#25
Issue: google/ExoPlayer#8212

#minor-release

PiperOrigin-RevId: 460325235
2022-07-12 15:10:24 +00:00
hschlueter
7dc54efdb9 Merge MatrixTransformationProcessor and ExternalTextureProcessor.
This saves an intermediate texture copy step for use-cases
where matrix transformations are the first or only effects
in the chain.

PiperOrigin-RevId: 460239403
2022-07-12 15:09:22 +00:00
claincly
18f4068c06 Apply priority/operating rate settings for video encoding.
- Added setter to disable this feature.
- Added accompanying tests.
- Plan to run tests on the same set of settings on H265.

PiperOrigin-RevId: 460238673
2022-07-12 15:08:22 +00:00
christosts
4eb34e4c58 Listen to playWhenReady changes in LeanbackPlayerAdapter
#minor-release

Issue: google/ExoPlayer#10420
PiperOrigin-RevId: 460223064
2022-07-12 15:07:10 +00:00
Manisha Jajoo
db5ff90167 Update VP9 Reader to handle missing frames/fragments.
Change-Id: I3cdc738b25fda1292ae07769656a3b18721b2402
2022-07-08 17:14:05 +05:30
rohks
05e728a31e Add tests for extracting MP4 with large bitrates
Also added the test to `MP4PlaybackTest`.

PiperOrigin-RevId: 459492188
2022-07-07 16:49:08 +00:00
samrobinson
91f1777741 Move Encoder quality API to VideoEncoderSettings.
Some other minor nits and adjustments to the API logic.

PiperOrigin-RevId: 459490431
2022-07-07 16:48:03 +00:00
christosts
cb87b7432f Add missing Nullable annotation
PiperOrigin-RevId: 459485334
2022-07-07 16:47:17 +00:00
tonihei
a83ab05aec Don't block AudioTrack when waiting for previous release
We wait until a previous AudioTrack has been released before
creating a new one. This is currently done with a thread
block operation, which may cause ANRs in the extreme case
when someone attempts to release the player while this is
still blocked.

The problem can be avoided by just returning false from
DefaultAudioSink.handleBuffer to try again until the previous
AudioTrack is released.

Reproduction steps to force the issue:
1. Add Thread.sleep(10000); to the AudioTrack release thread.
2. Add this to the demo app:
    private int positionMs = 0;

    Handler handler = new Handler();
    handler.post(new Runnable() {
      @Override
      public void run() {
        player.seekTo(positionMs++);
        if (positionMs == 10) {
          player.release();
        } else {
          handler.postDelayed(this, 1000);
        }
      }
3. Observe Player release timeout exception.

These steps can't be easily captured in a unit test as we can't
artifically delay the AudioTrack release from the test.

Issue: google/ExoPlayer#10057
PiperOrigin-RevId: 459468912
2022-07-07 16:46:24 +00:00
huangdarwin
7078ce312d HDR: Remove ColorInfo.SDR constant
The SDR constant also specified a color space and range, in addition to
C.COLOR_TRANSFER_SDR. However, it turns out that SDR videos may use different color
space and range values, so following prior ExoPlayer conventions to have `null`
mean "generic SDR" is preferable here.

PiperOrigin-RevId: 459296746
2022-07-07 16:45:00 +00:00
bachinger
87adb88f57 Fix incorrect link tags
PiperOrigin-RevId: 459215618
2022-07-07 16:44:05 +00:00
Rohit Singh
f00f93a96e Merge pull request #10260 from sr1990:clearkey_parse_licenseurl
PiperOrigin-RevId: 459215225
2022-07-07 16:43:14 +00:00
huangdarwin
ab7747d953 HDR: Throw error if attempting HDR editing under API 31.
HDR editing is not supported under API 31

PiperOrigin-RevId: 459211106
2022-07-07 16:42:21 +00:00
tonihei
656eaf74d1 Exclude HEVC 10bit profile on Pixel 1.
This profile is declared as supported although it isn't.

Issue: google/ExoPlayer#10345
Issue: google/ExoPlayer#3537

#minor-release

PiperOrigin-RevId: 459205512
2022-07-07 16:41:34 +00:00
bachinger
0a9f9007c6 Use mediaId as contentId if available
This is to be consistent with what cast `QueueMediaItem` is doing. If a contentId is
not available the contentUrl is used as the ID.

#minor-release

PiperOrigin-RevId: 459133323
2022-07-07 16:40:15 +00:00
huangdarwin
1869855c90 HDR: Remove unused EGL_GL_COLORSPACE_KHR attribute.
PiperOrigin-RevId: 459106221
2022-07-07 16:39:27 +00:00
Shraddha Basantwani
1de4ee3af5 Add RTP VP8 Reader Test
Update VP8 Reader to handle missing frames/fragments.

Change-Id: I9eede8f1e3a20fb0ff2e7add0dfc60f0780ec769
2022-07-06 14:25:14 +05:30
Shraddha Basantwani
ff3d7dff12 Fix VP8 Reader
Update VP8 header to check if the S bit is set.

Variable fragmentedSampleSizeBytes is initialised with -1, and reader
is directly adding fragmentSize to this variable.
Updated it to check if the size is unset.

Bug: 238153477
Test: manual
Change-Id: I9d5735422a4a0eeb2967af93809b879b434e3c57
2022-07-06 14:25:14 +05:30
birdbird
6016418c33
Support file schemes in SimpleBitmapLoader
Fixes #108
2022-07-06 07:17:46 +02:00