13435 Commits

Author SHA1 Message Date
ibaker
d5482fe343 Don't call MediaDrm.setLogSessionId in FrameworkMediaDrm
This method throws an UnsupportedOperationException on some Android 12
devices.

PiperOrigin-RevId: 430647264
2022-03-01 09:33:05 +00:00
ibaker
f92ae23dd8 Version bump to exoplayer:2.17.0 and media3:1.0.0-alpha02
#minor-release

PiperOrigin-RevId: 430456963
2022-02-23 16:22:43 +00:00
ibaker
e8096f07b9 Update gradle wrapper to 7.4
#minor-release

PiperOrigin-RevId: 430454251
2022-02-23 16:21:30 +00:00
hschlueter
6779290724 Move bitmap helpers to new BitmapTestUtil class.
These helpers will also be useful for future frame processor tests
outside FrameEditorDataProcessingTest.

PiperOrigin-RevId: 430409172
2022-02-23 16:19:26 +00:00
hschlueter
650f71d022 Clarify instructions for updating expected output bitmaps.
Also replace the bitmaps with bitmaps obtained by following
the instructions.

PiperOrigin-RevId: 430232369
2022-02-23 16:17:57 +00:00
andrewlewis
5867a3a29c Fix typos
PiperOrigin-RevId: 430220416
2022-02-22 17:05:01 +00:00
ibaker
805959df8b Suppress @VisibleForTesting violation in Transformer
#minor-release

PiperOrigin-RevId: 430200331
2022-02-22 17:03:56 +00:00
andrewlewis
0490839fce Suppress framework muxer lint warning
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
2022-02-22 17:03:06 +00:00
ibaker
42340bf5ac Fix DefaultAnalyticsCollectorTest failure when run with JaCoCo
#minor-release

PiperOrigin-RevId: 430189385
2022-02-22 17:01:55 +00:00
hschlueter
e8977d00c5 Split out ExternalCopyFrameProcessor.
All (later customizable) GlFrameProcessors after the
ExternalCopyFrameProcessor receive their input from a normal OpenGL
texture not an external texture, so they won't need to worry about
the textureTransformMatrix.

PiperOrigin-RevId: 430165652
2022-02-22 17:01:04 +00:00
olly
bdc3af1416 Remove deprecated Player track methods
getCurrentTrackGroups and getCurrentTrackSelections are
retained for now, but moved from Player to ExoPlayer, to
ease the transition for some application code that currently
uses these methods.

PiperOrigin-RevId: 430036355
2022-02-22 10:35:04 +00:00
samrobinson
3851ef3d69 Reduce the length of the FrameEditorDataProcessingTest TAG.
As per f2ad8ccd3c, log tags can not be longer than 23 chars.

PiperOrigin-RevId: 430032243
2022-02-22 10:34:16 +00:00
huangdarwin
3e9d45f0ea Transformer: Work around Samsung/OnePlus decoder dequeueBuffer failed.
#mse-bug-week

PiperOrigin-RevId: 430028245
2022-02-22 10:32:46 +00:00
claincly
a196b5ec43 Re-enable RepeatedTranscodeTransformationTest.
There are two major blockers to this test:

- H265 muxing is not available for API<24, so setting video mimeType to H265
  will fail on those devices.
- AMR audio encoding is buggy on some device and it's not a widely used format.

The solution: use a video that is encoded with AVC/MP3, to ensure transcoding
to AVC/AAC.

PiperOrigin-RevId: 429648598
2022-02-22 10:31:07 +00:00
samrobinson
d7adb94669 Add a new sample file to assets, which has increasing timestamps.
Re-enable tests that have no muxer support for timestamps going backwards.

Tests running on the B-frame sample will be added in a future commit.

#mse-bug-week

PiperOrigin-RevId: 429599177
2022-02-22 10:30:18 +00:00
ibaker
ad35995d54 Redefine VERSION_INT to include alpha/beta/rc/stable
#minor-release

PiperOrigin-RevId: 429596966
2022-02-22 10:29:12 +00:00
ibaker
99d2b11329 Rollback of caf62842c4
*** Original commit ***

Rollback of c2cb22a056

*** Original commit ***

Rollback of 1521e50307

*** Original commit ***

Wire up MediaMetricsListener and add configuration to...

***

PiperOrigin-RevId: 429585773
2022-02-22 10:28:20 +00:00
samrobinson
4b72335d51 Add a TestTransformationResult class for additional test values.
This class will contain additional details such as frame count, once implemented.

#mse-bug-week

PiperOrigin-RevId: 429567678
2022-02-18 16:42:07 +00:00
Ian Baker
f3eb6e1376 Merge pull request #36 from ittiam-systems:rtp-h265
PiperOrigin-RevId: 429566102
2022-02-18 16:41:12 +00:00
claincly
99074f703a Improve exception message.
We use the `createForCodec` method that does not take a `MediaFormat` during
transformation, the error message always includes "no configured MediaFormat",
which is false.

PiperOrigin-RevId: 429553573
2022-02-18 16:40:19 +00:00
olly
9238dc758d Add Matroska Extractor Test Sample For Opus
PiperOrigin-RevId: 429386479
2022-02-18 14:56:25 +00:00
olly
c80d30ebce Avoid Clearing Supplemental Data Flag In MatroskExtractor
PiperOrigin-RevId: 429368911
2022-02-18 14:56:25 +00:00
olly
f1e59f8001 Libopus Support For WebM DiscardPadding
PiperOrigin-RevId: 429364728
2022-02-18 14:56:25 +00:00
hschlueter
cf85d1bdc8 Only allow HEVC output MIME selection in demo for API>=24.
The muxer doesn't support HEVC below API 24. The is documented in
the TransformationRequest javadoc and the Transformer.Builder will
throw if HEVC is requested below API 24 so the option should not
be part of the demo for those devices.

#mse-bug-week

PiperOrigin-RevId: 429343805
2022-02-18 14:56:25 +00:00
olly
fdd3973a09 Fix potential NPE in test_utils WebServerDispatcher
PiperOrigin-RevId: 429338648
2022-02-18 14:56:01 +00:00
Ian Baker
38717ce969 Reformat some javadoc 2022-02-18 14:54:02 +00:00
samrobinson
061aac7ab2 Add new public 4k60 portrait video to the demo application.
#mse-bug-week

PiperOrigin-RevId: 429323642
2022-02-18 14:52:48 +00:00
olly
f22025cc5e Simplify TracksInfo API
isTypeSupportedOrEmpty is very specific and a little hard to
understand unless you know the one thing it's useful for. This
commit replaces it with isTypeSupported, which can be used in
conjunction with the recently added containsType method.

PiperOrigin-RevId: 429312712
2022-02-17 16:15:14 +00:00
olly
265dd079e9 Move track type from TrackGroupInfo to TrackGroup
The track type is derived solely from the content. It does
not depend on any runtime properties such as the player's
capabilities of user track selection. Hence it belongs in
TrackGroup rather than TrackGroupInfo.

Note that this avoids TrackSelectionOverride from having to
re-derive the track type internally.

PiperOrigin-RevId: 429303312
2022-02-17 16:14:16 +00:00
aquilescanta
6b606b9987 Depend on llvm-xy bin utils instead of GNU's binutils
NDK 23 removes GNU's bin utils. More info in
https://android.googlesource.com/platform/ndk/+/master/docs/BuildSystemMaintainers.md#binutils.

LLVM bin utils are available in all modern NDK versions.

#minor-release
Issue: google/ExoPlayer#9933
PiperOrigin-RevId: 429299806
2022-02-17 15:08:04 +00:00
samrobinson
7a5b3b3e5c Save the bitmap produced by the FrameEditorDataProcessingTest to cache.
The bitmap can then be retrieved through ADB.

#mse-bug-week

PiperOrigin-RevId: 429293231
2022-02-17 15:02:09 +00:00
olly
09772908b3 Make sure native library loads use correct class loader
Merge of https://github.com/google/ExoPlayer/pull/9934

#minor-release

PiperOrigin-RevId: 429259055
2022-02-17 15:00:31 +00:00
hschlueter
61354497e3 Add enable fallback option to transformer demo.
Also invert disableFallback parameter in DefaultEncoderFactory
to enableFallback. Fallback is still enabled by default.

PiperOrigin-RevId: 429253266
2022-02-17 14:59:32 +00:00
bachinger
15995d3dc5 Use service context in DefaultActionFactory
We need to use a Service to create the pending intents in the
`DefaultActionFactory`.

PiperOrigin-RevId: 429115746
2022-02-17 11:52:24 +00:00
andrewlewis
b96787d374 Avoid attempting to mux out of order pre-API 25
Calling `MediaMuxer.writeSampleData` can block indefinitely on old API versions. It is better not to call this method to fail quickly with an exception rather than getting stuck.

Based on on-device testing media muxer doesn't generally handle out of order samples before API 25. There are a small number of devices where this does succeed but it seems preferable to turn this off everywhere to keep the code simple and have consistent behavior. Once we switch to in-app muxing this limitation will no longer apply.

#mse-bug-week

PiperOrigin-RevId: 429070255
2022-02-17 11:52:24 +00:00
bachinger
6978746f4f Clear ad playback state map when AdsLoader is released
#minor-release

PiperOrigin-RevId: 429067634
2022-02-17 11:52:24 +00:00
bachinger
5ee9c48244 Integrate IMA SSAI samples in main demo app
PiperOrigin-RevId: 429059793
2022-02-17 11:52:24 +00:00
bachinger
0842295a88 Make AdsLoader.State implement Bundleable
This allows the AdsLoader.State to be stored in savedInstanceState

#minor-release

PiperOrigin-RevId: 429057697
2022-02-17 11:52:24 +00:00
samrobinson
1af841698f Add exception information to AndroidTest analysis file.
Tested:
  Verified that the additional information is available through
  instrumentation tests, as well as via manual testing.

#mse-bug-week

PiperOrigin-RevId: 429038695
2022-02-17 11:52:23 +00:00
andrewlewis
677c5dc6d4 Skip tests requiring out of order muxing pre API 25
PiperOrigin-RevId: 429029496
2022-02-17 11:52:23 +00:00
christosts
b59869ede3 Create BitmapLoader
Create BitmapLoader component for loading artwork
images. Add the SimpleBitmapLoader which fetches images
from HTTP/HTTPS endpoints. Integrate BitmapLoader in
DefaultMediaNotificationProvider.

PiperOrigin-RevId: 429010249
2022-02-17 11:52:23 +00:00
bachinger
b8687a3111 Copy playback configuration when creating the content media item
#minor-release

PiperOrigin-RevId: 429006934
2022-02-17 11:52:23 +00:00
kimvde
f8d8bfb664 Handle player release timing out in transformer
- The resources were released twice before, which is not necessary since
  the MSG_RELEASE message is already in the internal player queue.
- The demo app was failing because the stop watch was stopped in
  onTransformationError after being reset.

#minor-release
#mse-bug-week

PiperOrigin-RevId: 428794426
2022-02-17 11:52:23 +00:00
olly
9137947797 Add TracksInfo methods for track selection UI
We need TracksInfo.hasTracksOfType to determine which tabs to
display in TrackSelectionDialog.

We need TrackGroupInfo.isAdaptiveSupported to determine whether
to allow multiple selection (check boxes) or not (radio buttons).

PiperOrigin-RevId: 428793739
2022-02-17 11:52:23 +00:00
hschlueter
3cd23de1cb Split GlFrameProcessor out of FrameEditor.
The GlFrameProcessor handles everything related to the GLSL program,
the FrameEditor manages the GL context and the data flow including
the input SurfaceTexture and output EGLSurface.

This will be split up further in follow-up CLs so that
GlFrameProcessors can be chained. At this CL, there are no
functional changes intended.

PiperOrigin-RevId: 428779179
2022-02-17 11:52:23 +00:00
bachinger
0db8047756 Store ad playback state in AdsLoader for resume after backgrounding
#minor-release

PiperOrigin-RevId: 428763656
2022-02-17 11:52:23 +00:00
hschlueter
9370665b79 Track presentation timestamps in FrameEditor.
PiperOrigin-RevId: 428763554
2022-02-17 11:52:23 +00:00
bachinger
b22273de01 Disable IMA SSAI DASH live streams for now
#minor-release

PiperOrigin-RevId: 428761508
2022-02-17 11:52:23 +00:00
huangdarwin
78b461f94c Transformer GL: Update TODOs.
Document some suboptimal things, and remove TODOs that were
fixed already or no longer relevant. Comment-only change.

PiperOrigin-RevId: 428749344
2022-02-17 11:52:23 +00:00
olly
8b01d07512 Flatten TrackSelectionParameters
PiperOrigin-RevId: 428747243
2022-02-17 11:52:23 +00:00