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
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
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
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
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
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
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
Fallback is only disabled for robolectric and instrumentation tests.
For MH tests, fallback is not disabled, as it may be needed due to
the broad range of devices available.
PiperOrigin-RevId: 426403167
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
Reason for not rolling back the rollback d68b790077: file name changed and
file content moved, the automated tool is unable to correctly apply the change.
Apply suggested AVC profile depending on the API version.
Use `AVCProfileHigh` only when there's encoder support.
PiperOrigin-RevId: 426363780
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
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
This change makes GlUtil.Program an outer class named GlProgram,
and also moves private static helpers as well as the inner classes
Attribute and Uniform which were only used by GlUtil.Program to
GlProgram. Other static utility methods remain in GlUtil.
No functional changes intended.
PiperOrigin-RevId: 426119299
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
The listener will automatically forward diagnostics info to the
Android platform. ExoPlayer.Builder gets a new setter that allows
to disable this feature if required.
#minor-release
PiperOrigin-RevId: 426099872
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
- The MIME type should ideally default to HEVC if there is an encoder for it.
- Next, check if AVC is supported.
- If there is no encoder for AVC, then we should pick an encoder in the list of
existing encoders instead of abandoning the transformation.
PiperOrigin-RevId: 425900638
This allows the same DefaultMediaSourceFactory instance to be used as
the contentMediaSourceFactory inside
ImaServerSideAdInsertionMediaSource.
PiperOrigin-RevId: 425846609
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
The current implementation of ExoPlayer Cea708 is processing the whole service block without
taking into account the defined service block size, which could cause the execution of
unwanted command.
The following set of Cea708 represents a real use case of the above.
``` hex
FC9420FD152FFF0929FE8CFCFE9818FEE332FE731FFE1044FE8B03FE8CFCFE0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000
FC942CFD1520FF4649FE8CFEFE9918FEE332FE731FFE1000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000
FC942FFD9470FF8924FE8B03FE8CFCFE4A92FE0300FE9005FE0091FE2A00FE0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000
FC9420FD97A1FFC829FE8CFEFE9918FEE332FE731FFE1043FE9203FE0100FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000
FC94D6FDCEEFFF082AFE9202FE0C90FE0500FE912AFE0000FE424EFE6F00FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000
FCC168FD20F4FF4422FE4168FE4220FE7400FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000
FC2C20FDE520FF8422FE2C20FE4265FE2000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000
FC64EFFD70EFFFC422FE646FFE4270FE6F00FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000
FC6EA7FD6E67FF0422FE6E27FE426EFE6700FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000
FCF420FD6173FF4422FE7420FE4261FE7300FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000
FC67E5FD206DFF8422FE6765FE4220FE6D00FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000
FCF480FD7579FFC422FE7403FE4275FE7900FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000FA0000
```
The above frames should be displaying the following text on the screen (or at least the first part of it).
```
Ah, don't get
all sappy about it
```
ExoPlayer is currently parsing this block as follow (in parentheses the defined service block size):
```
(2) 22416842207400
G0 A
G0 h
G0 B
G0 \u0020
G0 t
C0 COMMAND_NUL
(2) 222C2042652000
G0 ,
G0 \u0020
G0 B
G0 e
G0 \u0020
C0 COMMAND_NUL
(2) 22646F42706F00
G0 d
G0 o
G0 B
G0 p
G0 o
C0 COMMAND_NUL
(2) 226E27426E6700
G0 n
G0 '
G0 B
G0 n
G0 g
C0 COMMAND_NUL
(2) 22742042617300
G0 t
G0 \u0020
G0 B
G0 a
G0 s
C0 COMMAND_NUL
(2) 22676542206D00
G0 g
G0 e
G0 B
G0 \u0020
G0 m
C0 COMMAND_NUL
(2) 22740342757900
G0 t
C0 COMMAND_ETX
G0 B
G0 u
G0 y
C0 COMMAND_NUL
(2) 2392030C4220730000
C1 COMMAND_SPL
G0 B
G0 \u0020
G0 s
C0 COMMAND_NUL
C0 COMMAND_NUL
(2) 22616C42656E00
G0 a
G0 l
G0 B
G0 e
G0 n
C0 COMMAND_NUL
```
So it ended up processing the following cue text (additional unwanted commands could be executed as well)
```
AhB t, Be doBpon'Bngt BasgeB mt
BuyB salBen
```
If instead the parsing logic take into account the service block size
```
(2) 22416842207400
G0 A
G0 h
(2) 222C2042652000
G0 ,
G0 \u0020
(2) 22646F42706F00
G0 d
G0 o
(2) 226E27426E6700
G0 n
G0 '
(2) 22742042617300
G0 t
G0 \u0020
(2) 22676542206D00
G0 g
G0 e
(2) 22740342757900
G0 t
C0 COMMAND_ETX
(2) 2392030C4220730000
C1 COMMAND_SPL
(2) 22616C42656E00
G0 a
G0 l
```
which is translated to (again I didn't processed all the frames, just a few of them)
```
Ah, don't get
al
```
which is what we are looking for.
This PR modifies service block parsing logic to honor service block size instead of read the full service block buffer.
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>