14116 Commits

Author SHA1 Message Date
olly
68c310a94a TrackSelectionParameters: Simplify disabling of track types
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
2022-03-01 09:45:38 +00:00
Ian Baker
c961ea1ca7 Merge pull request #10011 from tonykwok:dev-v2
PiperOrigin-RevId: 431395359
2022-03-01 09:44:52 +00:00
bachinger
9821dd282c Accept page index 0 for getChildren() in MediaLibraryServiceLegacyStub
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
2022-03-01 09:43:55 +00:00
ibaker
3e9dfaa586 Cross-reference the corresponding media3 and exoplayer releases
PiperOrigin-RevId: 431376857
2022-03-01 09:43:06 +00:00
christosts
4d518806ea Remove experimental flag for AsynchronousMediaCodecAdapter
The AsyncronousMediaCodecAdapter should call MediaCodec.start()
on the same thread it calls MediaCodec.flush(), i.e. the playback
thread. This change removes the experimental flag that allowed
calling MediaCodec.start() from the callback thread.

The flag was flipped to true already.

PiperOrigin-RevId: 430689665
2022-03-01 09:43:00 +00:00
bachinger
8e8c59031c Drop ads for which we don't have metadata when joining a live stream
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
2022-03-01 09:42:24 +00:00
ibaker
8ae74ad873 Remove exoplayer-only release note from media3
There's no media3 equivalent to the
`com.google.android.exoplayer:exoplayer` dependency.

PiperOrigin-RevId: 430955037
2022-03-01 09:41:43 +00:00
claincly
f3cc75cf58 Add SSIM helper for transcoding quality measurements.
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
2022-03-01 09:40:52 +00:00
ibaker
5d0c7b91d0 Remove duplicate media3 release note and fix formatting
PiperOrigin-RevId: 430946606
2022-03-01 09:40:00 +00:00
ibaker
8416f465ee Update the gradle wrapper scripts
Generated by running:
./gradlew wrapper --gradle-version 7.4 --distribution-type all

#minor-release

PiperOrigin-RevId: 430666317
2022-03-01 09:39:29 +00:00
samrobinson
8d852f3a99 Allow the difference Bitmap to be saved to device cache.
When investigating how 'bad' a failure is, it's useful to see the diff
between input and output bitmaps.

PiperOrigin-RevId: 430917732
2022-03-01 09:39:19 +00:00
ibaker
7d38936106 Update media3 docs with details of new release branch
PiperOrigin-RevId: 430911179
2022-03-01 09:38:29 +00:00
ibaker
d34221519d Remove unecessary git checkout command from README
The command is not needed, because the specified branch is already the
default branch on GitHub so will be checked out by clone automatically.

PiperOrigin-RevId: 430910549
2022-03-01 09:37:44 +00:00
ibaker
9748695e03 Rollback of 99d2b11329
*** Original commit ***

Rollback of caf62842c4

*** Original commit ***

Rollback of c2cb22a056

*** Original commit ***

Rollback of 1521e50307

*** Original commit ***

PiperOrigin-RevId: 430905772
2022-03-01 09:36:50 +00:00
olly
5a304fdbd9 FMP4: Fix output of mixed v0 and v1 emsg samples
Issue: google/ExoPlayer#9996
#minor-release
PiperOrigin-RevId: 430773329
2022-03-01 09:35:58 +00:00
ibaker
9ec8678525 Don't call MediaDrm.setLogSessionId in FrameworkMediaDrm
This method throws an UnsupportedOperationException on some Android 12
devices.

PiperOrigin-RevId: 430647264
2022-03-01 09:35:42 +00:00
christosts
4703ac80f6 Remove experimental flag for AsynchronousMediaCodecAdapter
The AsyncronousMediaCodecAdapter should call MediaCodec.start()
on the same thread it calls MediaCodec.flush(), i.e. the playback
thread. This change removes the experimental flag that allowed
calling MediaCodec.start() from the callback thread.

The flag was flipped to true already.

PiperOrigin-RevId: 430689665
2022-03-01 09:35:04 +00:00
ibaker
92af42bf25 Update the gradle wrapper scripts
Generated by running:
./gradlew wrapper --gradle-version 7.4 --distribution-type all

#minor-release

PiperOrigin-RevId: 430666317
2022-03-01 09:34:07 +00:00
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
Tony Guo
d7bd15fe59 Add missing @Retention(SOURCE) to UnsupportedDrmException.Reason
This can fix the following warning caused by commit a7aa84a:

Warning: com.google.android.exoplayer2.drm.UnsupportedDrmException.Reason:
The typedef annotation should have @Retention(RetentionPolicy.SOURCE)

 Author:    Tony Guo <tony.guo.peng@gmail.com>
 Date:      Mon Feb 28 10:56:52 2022 +0800
2022-02-28 11:32:04 +08:00
Rakesh Kumar
f6a7cceaaf Add support for RTSP VP8
Added VP8 RTP packet reader and added support for VP8 playback
through RTSP.

Change-Id: Ie22ab79a234f61681cf95886a6ed8104a742f056
2022-02-24 21:02:41 +05:30
Ian Baker
f1b37bc547
Merge pull request #10001 from google/dev-v2-r2.17.0
r2.17.0
2022-02-24 12:03:00 +00:00
ibaker
b3593e6170 Version bump to exoplayer:2.17.0 and media3:1.0.0-alpha02
PiperOrigin-RevId: 430456963
2022-02-23 16:48:13 +00:00
ibaker
850bd69ddd Version bump to exoplayer:2.17.0 and media3:1.0.0-alpha02
#minor-release

PiperOrigin-RevId: 430456963
1.0.0-alpha02
2022-02-23 16:46:17 +00:00
ibaker
64a3cf7270 Update javadoc for 2.17.0
#minor-release

PiperOrigin-RevId: 430437927
2022-02-23 16:45:47 +00:00
ibaker
7781247445 Version bump to exoplayer:2.17.0 and media3:1.0.0-alpha02
#minor-release

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

PiperOrigin-RevId: 430454251
2022-02-23 16:31:29 +00:00
ibaker
a5571010d0 Update javadoc for 2.17.0
#minor-release

PiperOrigin-RevId: 430437927
2022-02-23 16:28:08 +00:00
hschlueter
1e8f6ad8e2 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:24:30 +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
cacb2d3a4f 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:21:07 +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
Manisha Jajoo
d1317b60fc Add support for RTSP AMR-NB/WB
Added AMR-NB/WB RTP packet reader and added support for AMR-NB/WB
playback through RTSP

Change-Id: I0a975fa1e1aa8450bda1c828599a523ba796bc48
2022-02-23 16:22:07 +05:30
ibaker
3ac831be3a Suppress @VisibleForTesting violation in Transformer
#minor-release

PiperOrigin-RevId: 430200331
2022-02-23 09:56:26 +00:00
ibaker
3985dfd978 Suppress @VisibleForTesting violation in Transformer
#minor-release

PiperOrigin-RevId: 430200331
2022-02-23 09:56:21 +00:00
andrewlewis
c0d0c0a834 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-23 09:56:09 +00:00
ibaker
00a5b33d24 Fix DefaultAnalyticsCollectorTest failure when run with JaCoCo
#minor-release

PiperOrigin-RevId: 430189385
2022-02-23 09:56:03 +00:00
andrewlewis
fb3101dc02 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-23 09:55:50 +00:00
ibaker
7e8cfc1043 Fix DefaultAnalyticsCollectorTest failure when run with JaCoCo
#minor-release

PiperOrigin-RevId: 430189385
2022-02-23 09:55:43 +00:00
andrewlewis
824f69e651 Fix typos
PiperOrigin-RevId: 430220416
2022-02-22 17:17:52 +00:00
ibaker
06ada01730 Suppress @VisibleForTesting violation in Transformer
#minor-release

PiperOrigin-RevId: 430200331
2022-02-22 17:14:15 +00:00
andrewlewis
6fac6177df 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:10:50 +00:00
ibaker
1b5a0c11ab Fix DefaultAnalyticsCollectorTest failure when run with JaCoCo
#minor-release

PiperOrigin-RevId: 430189385
2022-02-22 17:07:09 +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
hschlueter
19e21d6fba 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:03:25 +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