14449 Commits

Author SHA1 Message Date
olly
2283b9425e Add AV1 support to the getCodecMaxInputSize function.
PiperOrigin-RevId: 445973162
2022-05-09 11:50:42 +01:00
olly
ad25c2a8c3 Add MIDI mime types to decoder_midi and api.txt
PiperOrigin-RevId: 445445952
2022-05-09 11:47:28 +01:00
ibaker
b9a8da4e3e Allow stable API users to use DebugTextViewHelper
This is used from the main demo app.

PiperOrigin-RevId: 445420580
2022-05-09 11:41:07 +01:00
ibaker
b0df946f67 Use cronet for DRM requests in the main demo app
This ensures that both content and licenses are requested using the
same HTTP stack.

#minor-release

PiperOrigin-RevId: 445378940
2022-05-09 11:34:42 +01:00
hschlueter
75c72f3b6d Return recommended output size for FrameProcessorChain.
Also add warning for what can happen if this is ignored.

Previously the return value was overridden by setOutputSurface, now
setOutputSurface only overrides the values using internally.

PiperOrigin-RevId: 445377036
2022-05-09 11:30:58 +01:00
ibaker
a840f9732f Add copies of PlayerControlView's public listeners to PlayerView
Developers are expected to (eventually) only use methods on
PlayerView (and not PlayerControlView) to interact with the UI
controller.

PiperOrigin-RevId: 445361488
2022-05-09 11:21:14 +01:00
ibaker
a433163b51 Prefix @ContentType values with CONTENT_
PiperOrigin-RevId: 445356625
2022-05-09 11:17:50 +01:00
ibaker
07d08ba85b Rename CONTENT_TYPE_ @AudioContentType values to AUDIO_CONTENT_TYPE_*
This is consistent with the IntDef name, and frees up the CONTENT_TYPE_
prefix for the @ContentType values (which are currently just TYPE_*,
and therefore ambiguous with lots of other 'type' values in C).

PiperOrigin-RevId: 445356476
2022-05-09 11:14:41 +01:00
ibaker
c5ad28a96c Remove empty <p> tag from WebvttDecoder
PiperOrigin-RevId: 445217294
2022-05-09 11:10:58 +01:00
ibaker
bec9431856 Fix Util.inferContentTypeForExtension to handle .ism (smooth streaming)
This method was introduced in 754eb1527a
as a replacement for Util.inferContentType(String) but it incorrectly
didn't return TYPE_SS when passed "ism" or "isml".

PiperOrigin-RevId: 445217167
2022-05-09 11:07:46 +01:00
olly
8da8c5e781 Upgrade Robolectric dependency to 4.8
PiperOrigin-RevId: 445196313
2022-05-09 11:04:31 +01:00
huangdarwin
c67d69100d Transformer: Misc nits
* Add a /* paramName= */ comment
* Remove an unnecessary comma.
* Remove extra "internal " for a b/### link

PiperOrigin-RevId: 445169649
2022-05-09 11:01:12 +01:00
ibaker
d71140527b Remove unneeded warning suppression from FrameworkMediaDrm
PiperOrigin-RevId: 445162900
2022-05-09 10:57:47 +01:00
claincly
be634bfb19 Change video asset used in TranscodeQualityTest
The old video has a `irregular' resolution of 1080x720. Change to a 1920x1080
video.

PiperOrigin-RevId: 445124065
2022-05-09 10:54:32 +01:00
huangdarwin
404192e4bd Transformer: Restrict frame buffer size for all omx decoders API >= 29.
PiperOrigin-RevId: 445119411
2022-05-09 10:51:18 +01:00
claincly
a161482ca8 Add device capability based test skipping.
Change test name prefix from `transform` to `transcode` for consistency.

PiperOrigin-RevId: 445106224
2022-05-09 10:47:32 +01:00
bachinger
ebcd3b0301 Add format when building a URI for an IMA SSAI media item
PiperOrigin-RevId: 445098397
2022-05-09 10:44:00 +01:00
olly
825976c987 Reading AV1 initialization data.
We add an entire class like we do for parsing other codec initialization formats; it's currently not doing any parsing though (... initialization data is really simple for AV1 though: just the entire contents of the box).

For testing, we add the sample file, having been re-encoded with ffmpeg (and we also happen to have another av1 file, too).

PiperOrigin-RevId: 444890282
2022-05-09 10:40:44 +01:00
hschlueter
3874245d3d Fix PeriodicVignetteFrameProcessor javadoc.
The parameter was removed in a previous CL but wasn't removed
from the javadoc yet.

PiperOrigin-RevId: 444879675
2022-05-09 10:37:11 +01:00
bachinger
4c2ea75c66 Fix incorrect JavaDoc
PiperOrigin-RevId: 444874326
2022-05-09 10:33:55 +01:00
ibaker
91b0d55fb3 Fix calculations that may lose precision compared to their target type
PiperOrigin-RevId: 444861268
2022-05-09 10:30:39 +01:00
claincly
5d1af64605 Ignore mandatory SDP fields as ExoPlayer doesn't use them
Issue: google/ExoPlayer#10049
PiperOrigin-RevId: 444833508
2022-05-09 10:27:25 +01:00
ibaker
754eb1527a Clean up Util.inferContentType methods
This fixes some small niggles:
1. `inferContentType(String)` is documented to take a path, but in the
   tests we're passing full URIs.
2. A `String` parameter is usually a path, but also a MIME type or an
   extension. In the new methods, the meaning of a `String` parameter
   is always clear from the name of the method.
3. `inferContentType(String)` is always passed an extension in
   'production' code (which has to be manually prefixed with a dot).
4. `inferContentType(Uri, @Nullable String)` always ignores the Uri if
   the String is non-null. IMO this logic is clearer to a reader if it's
   just in-lined at the call-site.

These methods are used from the demo apps, so will be part of the stable
API.

PiperOrigin-RevId: 444826053
2022-05-09 10:23:38 +01:00
Ian Baker
925a907c5f Merge pull request #9967 from jruesga:cea708-handle-multiple-service-blocks
PiperOrigin-RevId: 444816821
2022-05-09 10:20:22 +01:00
huangdarwin
a5adc8d7d0 Transformer Demo: Add video with pixelWidthHeightRatio != 1.
This can allow apps to test and demonstrate support for videos with
pixelWidthHeightRatio != 1.

PiperOrigin-RevId: 444815182
2022-05-09 10:16:12 +01:00
Ian Baker
a8c0a1bdfd Merge pull request #10150 from egor-n:dev-v2-8435-outlinecolour
PiperOrigin-RevId: 444787307
2022-05-09 10:12:53 +01:00
Oliver Woodman
c25a3af009 Merge pull request #10214 from cedricxperi:dev-v2
PiperOrigin-RevId: 444585404
2022-04-26 18:28:38 +01:00
huangdarwin
1eadde528c Transformer GL: Add support for pixelWidthHeightRatio.
To ensure frame processor operations operate on square pixels,
make the frame taller or wider for non-square input pixels.

In addition to automated tests, this was tested by changing the
inputFormat.pixelWidthHeightRatio in the TransformerVideoRenderer.

PiperOrigin-RevId: 444553517
2022-04-26 18:24:46 +01:00
bachinger
6708b43bfb Fix incorrect format variable
PiperOrigin-RevId: 444530943
2022-04-26 13:30:27 +01:00
huangdarwin
b29d49637e Transformer: remove unused bitmap test option.
Remove unused saveTestBitmapToCacheDirectory throwOnFailure option.

#cleanup

PiperOrigin-RevId: 444516857
2022-04-26 12:05:30 +01:00
huangdarwin
22c9b8168d Transformer: remove unused bitmap test option.
Remove unused saveTestBitmapToCacheDirectory throwOnFailure option.

#cleanup

PiperOrigin-RevId: 444516857
2022-04-26 12:05:30 +01:00
huangdarwin
877ba22b20 Transformer GL: save actual bitmap before checking pixel diffs.
This allows the actual bitmap to be saved, even if output
dimensions are different than expected. Otherwise, differing
output dimensions would throw an exception, preventing the bitmap
from being saved.

PiperOrigin-RevId: 444512210
2022-04-26 11:37:03 +01:00
huangdarwin
3cf7f58edf Transformer GL: save actual bitmap before checking pixel diffs.
This allows the actual bitmap to be saved, even if output
dimensions are different than expected. Otherwise, differing
output dimensions would throw an exception, preventing the bitmap
from being saved.

PiperOrigin-RevId: 444512210
2022-04-26 11:37:03 +01:00
samrobinson
d88bd149aa Add 30 second high motion clips to AndroidTestUtil.
30 second clips at higher resolutions are useful for testing encoder
behaviour compared to shorter clips.

PiperOrigin-RevId: 444505865
2022-04-26 10:59:07 +01:00
samrobinson
c87d03e78e Add 30 second high motion clips to AndroidTestUtil.
30 second clips at higher resolutions are useful for testing encoder
behaviour compared to shorter clips.

PiperOrigin-RevId: 444505865
2022-04-26 10:59:07 +01:00
samrobinson
059c359fd7 Revert of 8c07f1e1a07e4e94731144e5a918f6b84aded592
PiperOrigin-RevId: 444347415
2022-04-25 20:59:35 +01:00
samrobinson
d536fe35c6 Rollback of 8da6c35bbb
*** Original commit ***

Keep AudioTrack on flush as default

***

PiperOrigin-RevId: 444327724
2022-04-26 17:02:35 +01:00
samrobinson
8da6c35bbb Keep AudioTrack on flush as default
PiperOrigin-RevId: 444264961
2022-04-26 16:59:06 +01:00
huangdarwin
0760520b23 FrameProcessor: Avoid early rounding in Presentation output dimensions.
PiperOrigin-RevId: 444253425
2022-04-26 16:55:44 +01:00
ibaker
40c27c43c8 Fix warning about potential integer overflow in DefaultAudioSink
PiperOrigin-RevId: 444221415
2022-04-26 16:52:12 +01:00
hschlueter
928a69d5f1 Use last frame processor to draw on debug surface view.
The last frame processor could use a different drawing command
than a four vertex triangle strip. So we need call its drawing
method again instead of assuming the shape.

PiperOrigin-RevId: 444217274
2022-04-26 16:48:39 +01:00
huangdarwin
4f272cc9bf Transformer GL: Avoid no-op ScaleToFit / Presentation FrameProcessors
Avoid no-op FrameProcessors in VideoTranscodingSamplePipeline, to avoid
creating resources for and executing GL for a no-op vertex+fragment shader.

EncoderCompatibilityFrameProcessor will still always be exercised.

PiperOrigin-RevId: 443675833
2022-04-26 16:45:09 +01:00
claincly
85bd080a17 Catch unchecked exception in RtspSessionTiming parsing.
Issue: google/ExoPlayer#10165
#minor-release
PiperOrigin-RevId: 443653894
2022-04-26 16:41:11 +01:00
andrewlewis
6443d5b840 Add an SSIM test with 360p input
This test should run on all devices from API 21 (the media uses Baseline
profile level 3.0 H.264) to give us coverage of the full pipeline (forcing
re-encoding) and SSIM calculation on all devices.

PiperOrigin-RevId: 443650002
2022-04-26 16:37:44 +01:00
andrewlewis
5a3ed3421b Fix encoder configuration before API 25
Float I-frame intervals are only supported from API 25 onwards (see https://developer.android.com/reference/android/media/MediaFormat#KEY_I_FRAME_INTERVAL).

Setting a null value for profile/level can cause a native crash when configuring the decoder.

PiperOrigin-RevId: 443647924
2022-04-26 16:34:18 +01:00
claincly
3abc5472d2 Remove a completed TODO item
PiperOrigin-RevId: 443620931
2022-04-26 16:30:42 +01:00
ibaker
f08dea266e Update the playback speed details in the live streaming dev guide
ExoPlayer's default behaviour changed in b12918d1e6.

Issue: google/ExoPlayer#10170
#minor-release
PiperOrigin-RevId: 443611196
2022-04-26 16:27:20 +01:00
huangdarwin
20dac7cb0b FrameProcessor: Create EncoderCompatibilityFrameProcessor.
Split rotationDegrees changes to EncoderCompatibilityFrameProcessor, a new
FrameProcessor.

This removes automatic rotationDegrees adjustments from Presentation, which
allows Presentation to be used for changes before the end of a
FrameProcessorChain pipeline.

PiperOrigin-RevId: 443387226
2022-04-26 16:23:32 +01:00
claincly
084dfc04c5 Fix Basic authentication header
Issue: google/ExoPlayer#9544

The header must include the word "Basic", but the word is missing.

#minor-release

PiperOrigin-RevId: 443386880
2022-04-26 16:20:01 +01:00
andrewlewis
3867f8e005 Expand Samsung/1+ workaround to API 31 + 32
The issue with decoding getting stuck is still reproducible on `samsung/beyond1lteeea/beyond1:12/SP1A.210812.016/G973FXXUEGULB:user/release-keys`.

PiperOrigin-RevId: 443368546
2022-04-26 16:16:34 +01:00