12775 Commits

Author SHA1 Message Date
Sebastian Roth
b7b4903262 some RTSP docs 2021-11-02 15:07:46 +00:00
Sebastian Roth
0830c06cd7 PR feedback 2021-11-02 14:58:15 +00:00
tonihei
368f4d6754 Suppress lint warning about IntDef assignment.
The values returned by the framework method are equivalent to the local IntDef values.

PiperOrigin-RevId: 407048748
2021-11-02 13:10:41 +00:00
christosts
e246eccc10 Replace map with a switch statement in bandwidth meter implementations
#minor-release

PiperOrigin-RevId: 407042882
2021-11-02 13:10:30 +00:00
ibaker
1654842050 Migrate usages of Window-based Player methods
Where this introduced an inconsistency (e.g. assigning to something
called `windowIndex`), I generally renamed the transitive closure of
identifiers to maintain consistency (meaning this change is quite
large). The exception is code that interacts with Timeline and Window
directly, where sometimes I kept the 'window' nomenclature.

#minor-release

PiperOrigin-RevId: 407040052
2021-11-02 13:10:20 +00:00
tonihei
30cfc3c6c4 Merge branch 'dev-v2' of https://github.com/google/ExoPlayer into dev-v2 2021-11-02 12:40:34 +00:00
tonihei
623be98d53 Suppress lint warning about IntDef assignment.
The values returned by the framework method are equivalent to the local IntDef values.

PiperOrigin-RevId: 407048748
2021-11-02 12:17:01 +00:00
christosts
ee4af48a10 Replace map with a switch statement in bandwidth meter implementations
#minor-release

PiperOrigin-RevId: 407042882
2021-11-02 12:12:39 +00:00
ibaker
7de079493c Migrate usages of Window-based Player methods
Where this introduced an inconsistency (e.g. assigning to something
called `windowIndex`), I generally renamed the transitive closure of
identifiers to maintain consistency (meaning this change is quite
large). The exception is code that interacts with Timeline and Window
directly, where sometimes I kept the 'window' nomenclature.

#minor-release

PiperOrigin-RevId: 407040052
2021-11-02 12:08:18 +00:00
tonihei
f5cdf1657a Remove FfmpegVideoRenderer from 2.16.0 release 2021-11-02 11:57:30 +00:00
huangdarwin
14eba83df6 Transformer GL: Undo accidental setResolution changes().
Accidental changes were introduced in c53924326d

PiperOrigin-RevId: 406858888
2021-11-02 08:58:49 +00:00
samrobinson
2c2705aa6b Allow remove video transformer option.
PiperOrigin-RevId: 406849436
2021-11-02 08:58:34 +00:00
tonihei
42ec358cd7 Merge branch 'dev-v2' of https://github.com/google/ExoPlayer into dev-v2 2021-11-02 08:58:05 +00:00
huangdarwin
c5f4843de2 Transformer GL: Undo accidental setResolution changes().
Accidental changes were introduced in c53924326d

PiperOrigin-RevId: 406858888
2021-11-02 08:51:54 +00:00
samrobinson
18e8ebe0f8 Allow remove video transformer option.
PiperOrigin-RevId: 406849436
2021-11-02 08:47:32 +00:00
bachinger
58f36fb854 Fix rewriting upstream/crypto package in lib-datasource
PiperOrigin-RevId: 406840246
2021-11-01 17:39:24 +00:00
tonihei
455fb89cd4 Suppress lint warning about wrong IntDef in FrameworkMuxer
The values are equivalent and we can suppress the warning.

PiperOrigin-RevId: 406839242
2021-11-01 17:39:08 +00:00
tonihei
8cefb845df Merge pull request #9576 from TiVo:p-fix-duration-round
PiperOrigin-RevId: 406839109
2021-11-01 17:38:51 +00:00
tonihei
f67ec8973c Add missing IntDef constant.
The video scaling mode and stream type defines a default constant
that needs to be added to the IntDef definition to be assignable.

PiperOrigin-RevId: 406835696
2021-11-01 17:38:35 +00:00
tonihei
45ef34eb2f Add missing import for gradle build
PiperOrigin-RevId: 406827799
2021-11-01 17:38:20 +00:00
tonihei
3ecf882c34 Remove wrong IntDef usage.
The variable is storing OpenGL's draw mode, which is different from Projection.DrawMode.

PiperOrigin-RevId: 406820812
2021-11-01 17:38:06 +00:00
tonihei
f382ef0ae2 Suppress lint warning about wrong IntDef assignment.
The return values of AudioManager.getPlaybackOffloadSupport are the same as the values defined in C.AudioManagerOffloadMode.

PiperOrigin-RevId: 406817413
2021-11-01 17:37:42 +00:00
olly
eeaa617160 Rename MediaFormatUtil constants
PiperOrigin-RevId: 406816023
2021-11-01 17:37:24 +00:00
tonihei
f45a8bc4f4 Suppress lint warning about wrong IntDef usage in media2 Utils
AudioAttributesCompat.AttributeUsage and C.AudioUsage use equivalent values and can be directly assigned.

PiperOrigin-RevId: 406815447
2021-11-01 17:37:07 +00:00
tonihei
4803ab3bd1 Fix rounding error in fMP4 presentation time calculation
The presentation time in fMP4 is calculated by adding and subtracting
3 values. All 3 values are currently converted to microseconds first
before the calculation, leading to rounding errors. The rounding errors
can be avoided by doing the conversion to microseconds as the last step.

For example:
In timescale 96000:  8008+8008-16016 = 0
Rounding to us first: 83416+83416-166833=-1

#minor-release

PiperOrigin-RevId: 406809844
2021-11-01 17:36:49 +00:00
tonihei
08f66c4d5b Throw pending clipping errors created during period preparation.
Currently, clipping errors are never thrown if we already have a
MediaPeriod. This may happen for example for ProgressiveMediaSource
where we need to create a MediaPeriod before knowing whether clipping
is supported. Playback will still fail, but with unrelated assertion
errors that are hard to understand for users.

Fix this by setting the pending error on the ClippingMediaPeriod.

#minor-release

Issue: Issue: google/ExoPlayer#9580
PiperOrigin-RevId: 406809737
2021-11-01 17:36:35 +00:00
ibaker
56b589c422 Re-position IntDefs in media3 stable API
These IntDefs are now annotated with TYPE_USE [1], so they can be moved
to directly before the type (int).

[1] Since <unknown commit>

PiperOrigin-RevId: 406803555
2021-11-01 17:36:08 +00:00
ibaker
3f4cde1873 Add TYPE_USE to IntDefs used in the media3 stable API
This allows the use of the intdef in parameterized types,
e.g. List<@MyIntDef Integer>

For IntDefs that are already released in ExoPlayer 2.15.1 we add
TYPE_USE in addition to all other reasonable targets, to maintain
backwards compatibility with Kotlin code (where an incorrectly
positioned annotation is a compilation failure). 'reasonable targets'
includes FIELD, METHOD, PARAMETER and LOCAL_VARIABLE but not TYPE,
CONSTRUCTOR, ANNOTATION_TYPE, PACKAGE or MODULE. TYPE_PARAMETER is
implied by TYPE_USE.

For not-yet-released IntDefs we just add TYPE_USE.

#minor-release

PiperOrigin-RevId: 406793413
2021-11-01 17:35:50 +00:00
olly
f0be093140 Upgrade gradle plugin version
PiperOrigin-RevId: 406789671
2021-11-01 17:35:33 +00:00
tonihei
4e6960ee16 Add large renderer position offset.
This helps to prevent issues where decoders can't handle negative
timestamps. In particular it avoids issues when the media accidentally
or intentionally starts with small negative timestamps. But it also
helps to prevent other renderer resets at a later point, for example
if a live stream with a large start offset is enqueued in the playlist.

#minor-release

PiperOrigin-RevId: 406786977
2021-11-01 17:35:10 +00:00
ibaker
4c40e80da6 Remove unecessary warning suppression in PlaybackException
PiperOrigin-RevId: 406783965
2021-11-01 17:34:23 +00:00
tonihei
93620e47de Merge branch 'dev-v2' of https://github.com/google/ExoPlayer into dev-v2 2021-11-01 17:33:19 +00:00
bachinger
70713c8458 Fix rewriting upstream/crypto package in lib-datasource
PiperOrigin-RevId: 406840246
2021-11-01 17:26:19 +00:00
tonihei
0d01cae270 Suppress lint warning about wrong IntDef in FrameworkMuxer
The values are equivalent and we can suppress the warning.

PiperOrigin-RevId: 406839242
2021-11-01 17:21:41 +00:00
tonihei
f238439ba0 Merge pull request #9576 from TiVo:p-fix-duration-round
PiperOrigin-RevId: 406839109
2021-11-01 17:16:56 +00:00
tonihei
861474f6f9 Add missing IntDef constant.
The video scaling mode and stream type defines a default constant
that needs to be added to the IntDef definition to be assignable.

PiperOrigin-RevId: 406835696
2021-11-01 17:12:21 +00:00
tonihei
2702501783 Add missing import for gradle build
PiperOrigin-RevId: 406827799
2021-11-01 17:07:46 +00:00
tonihei
5823ffeec0 Remove wrong IntDef usage.
The variable is storing OpenGL's draw mode, which is different from Projection.DrawMode.

PiperOrigin-RevId: 406820812
2021-11-01 17:03:00 +00:00
tonihei
bf29d5248b Suppress lint warning about wrong IntDef assignment.
The return values of AudioManager.getPlaybackOffloadSupport are the same as the values defined in C.AudioManagerOffloadMode.

PiperOrigin-RevId: 406817413
2021-11-01 16:58:09 +00:00
olly
e039e335cd Rename MediaFormatUtil constants
PiperOrigin-RevId: 406816023
2021-11-01 16:53:30 +00:00
tonihei
8e03a0653a Suppress lint warning about wrong IntDef usage in media2 Utils
AudioAttributesCompat.AttributeUsage and C.AudioUsage use equivalent values and can be directly assigned.

PiperOrigin-RevId: 406815447
2021-11-01 16:48:41 +00:00
tonihei
c05a5a162f Fix rounding error in fMP4 presentation time calculation
The presentation time in fMP4 is calculated by adding and subtracting
3 values. All 3 values are currently converted to microseconds first
before the calculation, leading to rounding errors. The rounding errors
can be avoided by doing the conversion to microseconds as the last step.

For example:
In timescale 96000:  8008+8008-16016 = 0
Rounding to us first: 83416+83416-166833=-1

#minor-release

PiperOrigin-RevId: 406809844
2021-11-01 16:43:48 +00:00
tonihei
69d6f84159 Throw pending clipping errors created during period preparation.
Currently, clipping errors are never thrown if we already have a
MediaPeriod. This may happen for example for ProgressiveMediaSource
where we need to create a MediaPeriod before knowing whether clipping
is supported. Playback will still fail, but with unrelated assertion
errors that are hard to understand for users.

Fix this by setting the pending error on the ClippingMediaPeriod.

#minor-release

Issue: Issue: google/ExoPlayer#9580
PiperOrigin-RevId: 406809737
2021-11-01 16:39:04 +00:00
ibaker
23de0be4c9 Re-position IntDefs in media3 stable API
These IntDefs are now annotated with TYPE_USE [1], so they can be moved
to directly before the type (int).

[1] Since <unknown commit>

PiperOrigin-RevId: 406803555
2021-11-01 16:34:25 +00:00
ibaker
8829c45d32 Add TYPE_USE to IntDefs used in the media3 stable API
This allows the use of the intdef in parameterized types,
e.g. List<@MyIntDef Integer>

For IntDefs that are already released in ExoPlayer 2.15.1 we add
TYPE_USE in addition to all other reasonable targets, to maintain
backwards compatibility with Kotlin code (where an incorrectly
positioned annotation is a compilation failure). 'reasonable targets'
includes FIELD, METHOD, PARAMETER and LOCAL_VARIABLE but not TYPE,
CONSTRUCTOR, ANNOTATION_TYPE, PACKAGE or MODULE. TYPE_PARAMETER is
implied by TYPE_USE.

For not-yet-released IntDefs we just add TYPE_USE.

#minor-release

PiperOrigin-RevId: 406793413
2021-11-01 16:29:33 +00:00
olly
e1494398a0 Upgrade gradle plugin version
PiperOrigin-RevId: 406789671
2021-11-01 16:24:56 +00:00
tonihei
9f352434c7 Add large renderer position offset.
This helps to prevent issues where decoders can't handle negative
timestamps. In particular it avoids issues when the media accidentally
or intentionally starts with small negative timestamps. But it also
helps to prevent other renderer resets at a later point, for example
if a live stream with a large start offset is enqueued in the playlist.

#minor-release

PiperOrigin-RevId: 406786977
2021-11-01 16:20:19 +00:00
ibaker
42f9ddb54e Remove unecessary warning suppression in PlaybackException
PiperOrigin-RevId: 406783965
2021-11-01 16:15:39 +00:00
tonihei
e77fa14eb0 Merge branch 'dev-v2' of https://github.com/google/ExoPlayer into dev-v2 2021-11-01 10:54:02 +00:00
huangdarwin
c53924326d GL: Make ProjectionRenderer's GL Program @MonotonicNonNull.
PiperOrigin-RevId: 406385758
2021-11-01 10:10:00 +00:00