14090 Commits

Author SHA1 Message Date
Ian Baker
4916e4f315 Merge pull request #9924 from jruesga:cea708-decoder-honor-service-block-size
PiperOrigin-RevId: 426953267
2022-02-21 17:04:12 +00:00
ibaker
7e3416c5be Remove deprecated DefaultRenderersFactory constructors
#minor-release

PiperOrigin-RevId: 426938026
2022-02-21 17:04:12 +00:00
tonihei
5896ec7b1c Update some text descriptions to ease translations.
Some strings didn't mention the context in which they are used
(for example as item in a list, or for accessibility). This makes it
harder for translators to choose the most appropriate translation and
grammar.

Also fix repeat and shuffle mode button accessibility descriptions to
indicate the action, not the current state.

PiperOrigin-RevId: 426924163
2022-02-21 17:04:07 +00:00
ibaker
2c33afa73a Remove deprecated ProgressiveMediaSource.Factory setters
#minor-release

PiperOrigin-RevId: 426909957
2022-02-21 16:59:58 +00:00
olly
b6d2e4cf1a Add missing calls to AnalyticsCollector
PiperOrigin-RevId: 426892085
2022-02-21 16:59:58 +00:00
olly
fd96fbc71c Remove deprecated EventListener
PiperOrigin-RevId: 426876984
2022-02-21 16:59:58 +00:00
ibaker
a75cc084c7 Add missing imports to ExoPlayerImpl
These were missed in 3bb0210d22

#minor-release

PiperOrigin-RevId: 426872386
2022-02-21 16:59:58 +00:00
ibaker
595ad8a871 Don't use code font in titles in the dev guide
#minor-release

PiperOrigin-RevId: 426870114
2022-02-21 16:59:58 +00:00
ibaker
af43c93a0b Remove deprecated ActionFile and ActionFileUpgradeUtil
#minor-release

PiperOrigin-RevId: 426868933
2022-02-21 16:59:58 +00:00
ibaker
e40f138d7a Remove LegacyPlayerView reference from comment in proguard-rules.txt
This class is deprecated (and will be removed from media3).

#minor-release

PiperOrigin-RevId: 426860018
2022-02-21 16:59:58 +00:00
ibaker
b243610a7a Fix the position of IntDefs to match TYPE_USE
PiperOrigin-RevId: 426855255
2022-02-21 16:59:58 +00:00
ibaker
a7aa84a8a4 Add TYPE_USE to 'frequently used' IntDefs in a backwards-compatible way
This ensures Kotlin usages of these IntDef annotations in the 'old'
position will continue to compile.

'Frequently used' is a subjective judgement. I have a parallel change
that marks all the other public IntDefs in the library as TYPE_USE
(those that I've judged to be 'rarely used' by apps).

A follow-up change will fix the positions of existing usages to be as if
they're only TYPE_USE.

#minor-release

PiperOrigin-RevId: 426427334
2022-02-21 16:59:58 +00:00
ibaker
f87a6ac37b Mark all public 'rarely used' IntDefs as only TYPE_USE
This is a breaking change if the annotation itself is in use in Kotlin
code. It's judged that the IntDefs in this commit are unlikely to be
referred to often in Kotlin code. This is because they're either:
- Related to esoteric parts of the library, or
- In a common part of the library but only returned from methods (and
  never passed to callback methods).

A follow-up change will fix the positions of existing usages to match
this new config.

#minor-release

PiperOrigin-RevId: 426410237
2022-02-21 16:59:58 +00:00
ibaker
0128d0b6b1 Make @LogLevel public and TYPE_USE
#minor-release

PiperOrigin-RevId: 426410137
2022-02-21 16:59:58 +00:00
ibaker
d3bb8efaef Mark @C.SelectionReason as TYPE_USE (only) and use it in more places
This is not backwards compatible if the @SelectionReason annotation is
used in Kotlin code, but before this change there aren't many library
surfaces that return a value annotated with @SelectionReason, so it
seems relatively unlikely that it is in use in any/many apps.

A follow-up change will fix the positions of existing usages to match
this new config.

#minor-release

PiperOrigin-RevId: 426409877
2022-02-21 16:59:58 +00:00
ibaker
945643490c Move @AudioFocusGain from C to AudioFocusManager and make it private
This is only used inside AudioFocusManager, it doesn't need to public.

Also mark it TYPE_USE and update the position to match.

#minor-release

PiperOrigin-RevId: 426407790
2022-02-21 16:59:58 +00:00
ibaker
850251f9dc Remove @C.AudioManagerOffloadMode IntDef
This is only used in DefaultAudioSink, so we could move it there and
make it private - but at that point we might as well refer to the
underlying AudioManager constants instead.

#minor-release

PiperOrigin-RevId: 426407661
2022-02-21 16:59:58 +00:00
ibaker
e42b51fc6d Reshuffle the 'legacy' attrs.xml and drawables.xml files
Keep values related to LegacyPlayerView in attrs_legacy_player_view.xml
and put all values related to LegacyPlayerControlView back in their
original locations. We plan to remove LegacyPlayerView (and
attrs_legacy_player_view.xml) from media3, but will keep
LegacyPlayerControlView - so the separation of the XML files needs to
reflect this split.

#minor-release

PiperOrigin-RevId: 426406973
2022-02-21 16:59:57 +00:00
olly
b320f7d76a Support relative MPD.Location URIs
#minor-release
Issue: google/ExoPlayer#9939
PiperOrigin-RevId: 426394339
2022-02-21 16:59:57 +00:00
ibaker
f8c3a2c1f2 Mark all non-public IntDefs as only TYPE_USE
This only changes IntDefs that cannot be used by apps because they're
either private or package-private.

A follow-up change will fix the positions of existing usages to match
this new config.

#minor-release

PiperOrigin-RevId: 426372273
2022-02-21 16:59:57 +00:00
ibaker
05f3f16853 Explicitly document every overridden method in ForwardingPlayer
This makes the delegation model more explicit, and prevents the javadoc
compiler from just pulling in the Player javadoc automatically - which
can lead to some confusion when some method definitions in Player depend
on other methods (e.g. seekForward() is defined in terms of
getSeekForwardIncrement()).

Issue: google/ExoPlayer#9897

#minor-release

PiperOrigin-RevId: 426359004
2022-02-21 16:59:57 +00:00
ibaker
b4fc2e5168 Fix ForwardingPlayer @Override and @Deprecated annotations
These were messed up in 74c6ef9ba0

Also suppress deprecation warnings when we're just forwarding a
deprecated method to the delegate.

#minor-release

PiperOrigin-RevId: 426351791
2022-02-21 16:59:57 +00:00
ibaker
602e9f14d1 Mark LegacyPlayerView as deprecated
This type is still known as PlayerView in exoplayer2

#minor-release

PiperOrigin-RevId: 426348286
2022-02-21 16:59:57 +00:00
ibaker
a4f218c674 Redefine the SSAI URI format with an "ssai" scheme instead of "imadai"
This allows us to remove the IMA naming from DefaultMediaSourceFactory's
SSAI integration.

#minor-release

PiperOrigin-RevId: 426346456
2022-02-21 16:59:57 +00:00
ibaker
0e1c4106b5 Mark some unreleased IntDefs as TYPE_USE only
The longer list of targets is only necessary for backwards
compatibility with existing Kotlin code that will stop compiling
if the position of the annotation becomes 'wrong' by marking it only
TYPE_USE. Since none of these IntDefs have been released (except in
media3 alpha1) we don't need to maintain this compatibility.

Also add a comment to all the places that *do* need the longer list of
targets, in order to explain why it's there and discourage copy-pasting
when defining new IntDefs in future.

Also fix some single-element arrays to remove the array notation.

#minor-release

PiperOrigin-RevId: 426108537
2022-02-21 16:59:57 +00:00
ibaker
c8e23b491d Remove references to Player(Control)View from the dev guide
Remove most of the customisation documentation, since StyledPlayerView
isn't really designed to be customised as deeply as PlayerView.

Also remove most documentation around StyledPlayerControlView,
especially as a standalone controller class - since it doesn't work
well for this use-case.

#minor-release

PiperOrigin-RevId: 426090762
2022-02-21 16:59:57 +00:00
tonihei
4112a99f49 Ignore format changes arriving after the media has been removed.
PiperOrigin-RevId: 426089165
2022-02-21 16:59:57 +00:00
ibaker
9e3eb6c5f7 Fix parameter comments
PiperOrigin-RevId: 425874534
2022-02-21 16:59:57 +00:00
ibaker
ddd89363b0 Move DAI MediaSource.Factory from constructor parameter to setter
This allows the same DefaultMediaSourceFactory instance to be used as
the contentMediaSourceFactory inside
ImaServerSideAdInsertionMediaSource.

PiperOrigin-RevId: 425846609
2022-02-21 16:59:57 +00:00
bachinger
419a37484f Mark played ads in multi-period VOD streams
#minor-release

PiperOrigin-RevId: 425842813
2022-02-21 16:59:57 +00:00
tonihei
8416423e07 Move SimpleExoPlayer logic into ExoPlayerImpl
This makes SimpleExoPlayer a simple forwarding wrapper which can be
removed in the future.

The changes are all purely mechanical with none of the potential further
simplifications made yet. The only exceptions are name clashes where
either EPI or SEP was calling a method in one of the classes and both
classes had different implementations for the same method name. In these
cases we needed to disambiguate between the two different
implementations (example: ExoPlayerImpl.setListener was renamed to
setEventListener).

#minor-release

PiperOrigin-RevId: 425823095
2022-02-21 16:59:57 +00:00
huangdarwin
ec8303c298 Transformer Demo: Remove unneeded external storage permission
Tested by confirming transformations still work and write to a output file in a
scoped-storage directory on a:
* Nexus 6P API 23 emulator
* Google Pixel 4 API 31 physical device

PiperOrigin-RevId: 425644266
2022-02-21 16:59:57 +00:00
hschlueter
16a2d23e2f Make transformer demo configuration options scrollable.
On devices with a smaller screen / low resolution not all
options fit, so scrolling is needed.

PiperOrigin-RevId: 425635224
2022-02-21 16:59:57 +00:00
olly
6899e3846e Use ImmutableMap.Builder.buildOrThrow() instead of deprecated build().
More info: ​go/immutable-map-buildorthrow-lsc

NOTE: if the source of truth for this code is *NOT* `third_party`, please let me know and I'll revert this CL (and please consider upstreaming this change yourself).

#inlineme

Tested:
    TAP for global presubmit queue passed after automated deflaking of failures: http://mondo/deflaker/run/530857d2-45cb-4069-a234-48c5efe945f1 http://mondo/deflaker/run/0dce4296-e6bb-42d2-8b64-b393f45b6ad3
    http://test/OCL:425453729:BASE:425451020:1643699365244:811c1a24
PiperOrigin-RevId: 425616165
2022-02-21 16:59:52 +00:00
ibaker
4b2aeb8d3f Remove deprecated ProgressiveMediaSource.Factory setters
#minor-release

PiperOrigin-RevId: 426909957
2022-02-21 16:56:37 +00:00
olly
a7e49d31f8 Add missing calls to AnalyticsCollector
PiperOrigin-RevId: 426892085
2022-02-21 16:56:37 +00:00
olly
5c07b0dad7 Remove deprecated EventListener
PiperOrigin-RevId: 426876984
2022-02-21 16:56:37 +00:00
olly
be8f8776d4 Update final translations
PiperOrigin-RevId: 426870226
2022-02-21 16:56:37 +00:00
ibaker
41f3bab565 Remove deprecated ActionFile and ActionFileUpgradeUtil
#minor-release

PiperOrigin-RevId: 426868933
2022-02-21 16:56:37 +00:00
ibaker
c437c2c7a2 Fix some missed StyledPlayerView -> PlayerView rename sites
PiperOrigin-RevId: 426868804
2022-02-21 16:56:37 +00:00
ibaker
3494526f56 Remove LegacyPlayerView reference from comment in proguard-rules.txt
This class is deprecated (and will be removed from media3).

#minor-release

PiperOrigin-RevId: 426860018
2022-02-21 16:56:37 +00:00
ibaker
c85799cc6c Fix the position of IntDefs to match TYPE_USE
PiperOrigin-RevId: 426855255
2022-02-21 16:56:37 +00:00
ibaker
118005c860 Add TYPE_USE to 'frequently used' IntDefs in a backwards-compatible way
This ensures Kotlin usages of these IntDef annotations in the 'old'
position will continue to compile.

'Frequently used' is a subjective judgement. I have a parallel change
that marks all the other public IntDefs in the library as TYPE_USE
(those that I've judged to be 'rarely used' by apps).

A follow-up change will fix the positions of existing usages to be as if
they're only TYPE_USE.

#minor-release

PiperOrigin-RevId: 426427334
2022-02-21 16:56:37 +00:00
ibaker
8b8675331e Mark all public 'rarely used' IntDefs as only TYPE_USE
This is a breaking change if the annotation itself is in use in Kotlin
code. It's judged that the IntDefs in this commit are unlikely to be
referred to often in Kotlin code. This is because they're either:
- Related to esoteric parts of the library, or
- In a common part of the library but only returned from methods (and
  never passed to callback methods).

A follow-up change will fix the positions of existing usages to match
this new config.

#minor-release

PiperOrigin-RevId: 426410237
2022-02-21 16:56:37 +00:00
ibaker
1d8f34e444 Make @LogLevel public and TYPE_USE
#minor-release

PiperOrigin-RevId: 426410137
2022-02-21 16:56:37 +00:00
ibaker
b3e8ee4548 Mark @C.SelectionReason as TYPE_USE (only) and use it in more places
This is not backwards compatible if the @SelectionReason annotation is
used in Kotlin code, but before this change there aren't many library
surfaces that return a value annotated with @SelectionReason, so it
seems relatively unlikely that it is in use in any/many apps.

A follow-up change will fix the positions of existing usages to match
this new config.

#minor-release

PiperOrigin-RevId: 426409877
2022-02-21 16:56:37 +00:00
ibaker
6733f15f45 Move @AudioFocusGain from C to AudioFocusManager and make it private
This is only used inside AudioFocusManager, it doesn't need to public.

Also mark it TYPE_USE and update the position to match.

#minor-release

PiperOrigin-RevId: 426407790
2022-02-21 16:56:36 +00:00
ibaker
67090e18df Remove @C.AudioManagerOffloadMode IntDef
This is only used in DefaultAudioSink, so we could move it there and
make it private - but at that point we might as well refer to the
underlying AudioManager constants instead.

#minor-release

PiperOrigin-RevId: 426407661
2022-02-21 16:56:36 +00:00
ibaker
8848bc3d7e Reshuffle the 'legacy' attrs.xml and drawables.xml files
Keep values related to LegacyPlayerView in attrs_legacy_player_view.xml
and put all values related to LegacyPlayerControlView back in their
original locations. We plan to remove LegacyPlayerView (and
attrs_legacy_player_view.xml) from media3, but will keep
LegacyPlayerControlView - so the separation of the XML files needs to
reflect this split.

#minor-release

PiperOrigin-RevId: 426406973
2022-02-21 16:56:36 +00:00
olly
0f432f047f Support relative MPD.Location URIs
#minor-release
Issue: google/ExoPlayer#9939
PiperOrigin-RevId: 426394339
2022-02-21 16:56:36 +00:00