8732 Commits

Author SHA1 Message Date
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
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
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
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
olly
25e58f5f2a 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:58:21 +00:00
samrobinson
e4eb583922 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:54:54 +00:00
huangdarwin
903c8d56cc Transformer: Work around Samsung/OnePlus decoder dequeueBuffer failed.
#mse-bug-week

PiperOrigin-RevId: 430028245
2022-02-22 10:51:25 +00:00
olly
81dd7b343c Add missing import for ExoPlayer GitHub project
PiperOrigin-RevId: 429999620
2022-02-22 10:48:03 +00:00
claincly
a3a0ffc82f 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:44:41 +00:00
samrobinson
666998f0fb 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:41:07 +00:00
ibaker
9961d918a9 Rollback of 8d9c4f4774
*** Original commit ***

Rollback of 43b796b64d

*** Original commit ***

Rollback of 08c5b1cb0a

*** Original commit ***

Wire up MediaMetricsListener and add configuration to...

***

PiperOrigin-RevId: 429585773
2022-02-22 10:34:13 +00:00
samrobinson
dfb7df542d 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:49:45 +00:00
Ian Baker
e36ea3b77d Merge pull request #36 from ittiam-systems:rtp-h265
PiperOrigin-RevId: 429566102
2022-02-18 16:46:09 +00:00
claincly
c680517527 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:42:30 +00:00
olly
d622598285 Add Matroska Extractor Test Sample For Opus
PiperOrigin-RevId: 429386479
2022-02-18 15:03:10 +00:00
olly
e32809cf08 Avoid Clearing Supplemental Data Flag In MatroskExtractor
PiperOrigin-RevId: 429368911
2022-02-18 15:03:02 +00:00
olly
bdcc9ea163 Libopus Support For WebM DiscardPadding
PiperOrigin-RevId: 429364728
2022-02-18 15:03:02 +00:00
ibaker
a2337adbb8 Add some missing imports to TrackSelectionOverride
PiperOrigin-RevId: 429326432
2022-02-18 15:02:38 +00:00
Ian Baker
87d8ca0af2 Reformat some javadoc 2022-02-18 15:02:33 +00:00
olly
ec3ba64817 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:24:01 +00:00
olly
c7ea8114e9 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:20:21 +00:00
samrobinson
cf811080ed 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:09:53 +00:00
olly
63104064ca 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:06:12 +00:00
hschlueter
5b8c4e09e0 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 15:02:36 +00:00
andrewlewis
3400736472 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 14:24:02 +00:00
samrobinson
2ccaaaef86 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 14:24:02 +00:00
andrewlewis
e32dabc976 Skip tests requiring out of order muxing pre API 25
PiperOrigin-RevId: 429029496
2022-02-17 14:24:02 +00:00
kimvde
09230a67f7 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 14:24:02 +00:00
olly
8e7ab9c811 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 14:24:02 +00:00
hschlueter
82cdfc680b 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 14:24:02 +00:00
hschlueter
c65e5cfef8 Track presentation timestamps in FrameEditor.
PiperOrigin-RevId: 428763554
2022-02-17 14:24:02 +00:00
huangdarwin
a08517e1d8 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 14:24:02 +00:00
olly
daf72f518c Flatten TrackSelectionParameters
PiperOrigin-RevId: 428747243
2022-02-17 14:24:02 +00:00
bachinger
940e934b58 Skip played server side inserted ads in a single period window
This change makes sure played server side ads are skipped in a single period
timeline. It avoids creating an ad-MediaPeriodInfo for played postrolls and
creates a content info instead. It also sets the end position for content infos
that terminate the stream before the stream is actually finished. This prevents
the player from continue playing the remaining media delivered by the
MediaPeriod.

We also make sure that the discontinuity of played ads are not reported because
there is actually no discontinuity.

#minor-release

PiperOrigin-RevId: 428734387
2022-02-17 14:24:02 +00:00
hschlueter
9ff736b192 Remove old TODO.
PiperOrigin-RevId: 428732950
2022-02-17 14:24:02 +00:00
bachinger
3b39e3bd19 Do not manipulate the duration of SSAI periods in FakeTimeline
#minor-release

PiperOrigin-RevId: 428727560
2022-02-17 14:24:02 +00:00
olly
c90745d956 Add getFormat and length to TrackGroupInfo
PiperOrigin-RevId: 428520090
2022-02-17 11:51:07 +00:00
hschlueter
11f1ebb347 Add glClear call before drawing.
PiperOrigin-RevId: 428492031
2022-02-17 11:47:45 +00:00
bachinger
3a7f73f1e2 Seek to start position when reusing the last used shared period
The last used shared media period is reused after all media periods have been
released. In case the sample streams are already filled up, they need to be
reset or they download samples from the current position up to the seek
position. This causes long buffering states or load stuck exceptions.

A seek when reusing the shared period takes care for reseting the period or
internally seeks to the current position in the already available samples.

#minor-release

PiperOrigin-RevId: 428484187
2022-02-17 11:44:22 +00:00
tonihei
7907f4e047 Make usage of live minDurationForQualityIncrease more consistent
We have two ways to choose the minDurationForQualityIncreaseMs value in
AdaptiveTrackSelection: use the configured value for non-live or when
enough buffered data is available, or use a fraction of the available
duration to allow switching when playing close to the live edge.

The decision point when to use which value isn't quite consistent because
we compare against availableDurationUs before making the adjustments. This
means there is range of values where no up-switching is possible despite
perfect buffering. Fix this by choosing the minimum of both values.

Issue: google/ExoPlayer#9784

#minor-release

PiperOrigin-RevId: 428474332
2022-02-17 11:41:01 +00:00
olly
b6317837e2 Rewrite AnalyticsCollector to use new track APIs
PiperOrigin-RevId: 428455848
2022-02-17 11:34:08 +00:00
krocard
1087b2f6f6 Do not reference AnalyticsCollector in common constructor
This prevents it to be stripped by R8 if a custom one is
passed.

#minor-release

PiperOrigin-RevId: 428034999
2022-02-17 11:27:07 +00:00
hschlueter
b3f92a8f5b Add helpers for FBOs in GlUtil.
FBOs will be used in follow-up CLs to chain multiple GL
shader programs in Transformer.

PiperOrigin-RevId: 428016050
2022-02-17 11:23:42 +00:00
bachinger
a7b0202712 Resolve media period ids in multi-period windows
Ignorable ad periods are skipped to resolve the media period id with the
ad playback state of the resulting period. In case of a change in the period
position un-played ad periods are rolled forward to be played.

PiperOrigin-RevId: 428011116
2022-02-17 11:16:56 +00:00
tonihei
00dbb780f1 Add some missing thread verifications
This adds some missing calls to verifyApplicationThread to
ExoPlayerImpl.

Now all public methods start with this call, except listener
registrations because registration after construction on a background
thread is allowed and supported.

PiperOrigin-RevId: 428009498
2022-02-17 11:13:31 +00:00
tonihei
8be677a426 Stop using SimpleExoPlayer for tests
The class is deprecated and all tests should preferably use the
non-deprecated code paths.

PiperOrigin-RevId: 428007986
2022-02-17 11:10:02 +00:00
tonihei
8792711d03 Set character limit for accessability strings to NONE
They are not normally displayed in any size-restricted UI element and don't
need a character limit.

#minor-release

PiperOrigin-RevId: 427998164
2022-02-17 11:06:41 +00:00