11589 Commits

Author SHA1 Message Date
marcbaechinger
c4a6b2e618 Mention publishing to Google Maven at top of release notes. 2021-04-14 14:28:47 +01:00
marcbaechinger
9fde2cf30c fix release notes 2021-04-14 14:12:35 +01:00
andrewlewis
d359882871 Update internal codebase location for flac extension
PiperOrigin-RevId: 368388742
2021-04-14 11:42:51 +01:00
jaewan
d13385be93 Fix typo in Player#isPlaying() Javadoc
PiperOrigin-RevId: 368383121
2021-04-14 11:41:04 +01:00
gyumin
1ad56e96c2 Add mediaId to PlaybackStateCompat extras
It provides a way to associate PlaybackState with the current media
item.

Startblock:
  <unknown commit> is submitted
PiperOrigin-RevId: 368354775
2021-04-14 11:40:52 +01:00
Denise LaFayette
69f80d9be9 Fix bottom-cropped text in WebView output
Use unitless numbers for WebView line-height values

See
https://developer.mozilla.org/en-US/docs/Web/CSS/line-height#prefer_unitless_numbers_for_line-height_values
2021-04-13 12:43:47 -07:00
bachinger
278a398d3d Bump version to 2.13.3
PiperOrigin-RevId: 368235728
2021-04-13 18:30:40 +01:00
ibaker
b8f83ac195 Parse DASH forced_subtitle role
#minor-release

Issue: #8781
PiperOrigin-RevId: 368212289
2021-04-13 18:14:54 +01:00
ibaker
f93fb5dc55 Switch DashManifestParser to use Ascii.equalsIgnoreCase
String.equalsIgnoreCase depends on the device locale and is discouraged.

#minor-release

PiperOrigin-RevId: 368211677
2021-04-13 18:14:31 +01:00
bachinger
0b3a3e6aa8 Bump version to 2.13.3
PiperOrigin-RevId: 368235728
2021-04-13 18:01:44 +01:00
ibaker
10c3860bc0 Upgrade JUnit to 4.13.2
PiperOrigin-RevId: 368226576
2021-04-13 18:01:36 +01:00
olly
3032252fde Use a single message for setting video renderer outputs
Previously, we had separate MSG_SET_SURFACE and
MSG_SET_VIDEO_DECODER_OUTPUT_BUFFER_RENDERER messages for
setting different types of supported output. Use of these
constants to switch between outputs during use of a player
was confusing because not all video renderers support both
message types.

To switch from VideoDecoderOutputBufferRenderer to a Surface,
it was sufficient just to send MSG_SET_SURFACE, since all
video renderers support this and clear any other output that
might be set. Conversely, to switch in the opposite direction,
just sending a MSG_SET_VIDEO_DECODER_OUTPUT_BUFFER_RENDERER was
not sufficient, because not all video renderers handle this
message to clear any previous output. Hence it was necessary to
explicitly clear a previously set surface using a separate
MSG_SET_SURFACE message. Passing two messages to switch the
output may prevent renderers from implementing the output switch
efficiently.

This change passes all outputs using a single message type, and
requires that all renderers treat unsupported outputs as though
null were passed (i.e., they clear any existing output). There
are some other miscellaneous improvements:

1. Non-surface outputs are now passed to onRenderedFirstFrame.
   This fixes a bug in SimpleExoPlayer's onRenderedFirstFrame,
   where previously it could not correctly equality check the
   output corresponding to the event to its current output in
   the VideoDecoderOutputBufferRenderer case.
2. Fix SimpleExoPlayer to report surface size changes for the
   VideoDecoderOutputBufferRenderer case. Even though the
   surface is rendered to indirectly in this case, we can still
   query (and listen to changes to) the surface's size.

PiperOrigin-RevId: 368215850
2021-04-13 18:01:28 +01:00
ibaker
84282d7c32 Parse DASH forced_subtitle role
#minor-release

Issue: #8781
PiperOrigin-RevId: 368212289
2021-04-13 18:01:20 +01:00
ibaker
472b44f45a Switch DashManifestParser to use Ascii.equalsIgnoreCase
String.equalsIgnoreCase depends on the device locale and is discouraged.

#minor-release

PiperOrigin-RevId: 368211677
2021-04-13 18:01:12 +01:00
tonihei
3bd59f8cf0 Ensure minDurationToRetainAfterDiscard >= minDurationForQualityIncrease
If this condition isn't true, the player may enter a cycle of discarding
and reloading the same format. As minDurationToRetainAfterDiscard is a
parameter likely left at its default, and minDurationForQualityIncrease
is likely adjusted more often, we correct the value in the problematic
case and log a warning instead of asserting it outright to prevent
unnecessary app breakages.

Issue: #8807
PiperOrigin-RevId: 368207417
2021-04-13 18:01:04 +01:00
bachinger
cc26a92e07 Use MediaItem.DEFAULT_MEDIA_ID as default media ID
PiperOrigin-RevId: 368204261
2021-04-13 14:59:40 +01:00
ibaker
1d3f72c91d Clarify documentation on C.SELECTION_FLAG_FORCED
Issue: #8755
PiperOrigin-RevId: 368204094
2021-04-13 14:59:29 +01:00
olly
ffc2a47d0a Pause and resume GLSurfaceView instances in player views
This is the right thing to do, as per the GLSurfaceView documentation.
This adds (previously omitted) calls to VideoDecoderGLSurfaceView.

PiperOrigin-RevId: 368202523
2021-04-13 14:59:17 +01:00
olly
72c77875e4 Core/UI decoupling: Remove setUseSensorRotation from views
Other properties of SphericalGLSurfaceView (e.g., setDefaultStereoMode)
are not plumbed through the PlayerView components, and it doesn't scale
to plumb through all properties of all of the SurfaceView types.

Applications can instead do:

```
((SphericalGLSurfaceView) playerView.getVideoSurfaceView())
    .setUseSensorRotation(useSensorRotation);
```

PiperOrigin-RevId: 368196537
2021-04-13 14:59:07 +01:00
andrewlewis
353912c8e1 Remove obsolete cronet file references
The cronet extension now uses gradle dependencies.

PiperOrigin-RevId: 368195878
2021-04-13 14:58:57 +01:00
olly
a79fbb95d2 Remove unused resources from deprecated GVR module
PiperOrigin-RevId: 368014991
2021-04-13 14:58:33 +01:00
marcbaechinger
19121f7b20 Merge pull request #8764 from uvjustin:dev-v2
PiperOrigin-RevId: 367994410
2021-04-13 11:16:04 +01:00
Steve Mayhew
0b557f3501 Adds test cases for iframe only with EXT-X-MAP
Adds a unit test case to cover EXT-X-MAP with byterange attribute.
2021-04-12 14:37:31 -07:00
marcbaechinger
14993c4139 Merge pull request #8764 from uvjustin:dev-v2
PiperOrigin-RevId: 367994410
2021-04-12 15:39:09 +01:00
gyumin
5345d716d3 Include aidl output directory to generate javadoc
PiperOrigin-RevId: 367992096
2021-04-12 15:38:59 +01:00
tonihei
aa54aa64b8 Deprecate LoopingMediaSource.
There is no use case left where we couldn't use a better
alternative (either looping in the player, using the Player
playlist API, or ConcatenatingMediaSource for advanced cases)

PiperOrigin-RevId: 367990981
2021-04-12 15:38:51 +01:00
andrewlewis
a449d0ca04 Upgrade IMA SDK dependency to 3.23.0
This brings in another fix for `NullPointerExceptions` within `WebView` callbacks in the IMA SDK, related to companion ads.

Issue: #8447

#minor-release

PiperOrigin-RevId: 367591047
2021-04-12 14:12:13 +01:00
olly
f3c63e224d StyledPlayerView: Fix layout issues
- Take centerControls padding into account to prevent switching to
  minimal mode too soon
- Disable clipping to padding to avoid the edges of controls from
  being clipped as the view gets smaller

Issue: #8763
PiperOrigin-RevId: 366966298
2021-04-12 14:12:13 +01:00
olly
4fd8e791f6 HLS: Fix incorrect handling of byte ranges for EXT-X-MAP tags
Issue: #8783
#minor-release
PiperOrigin-RevId: 366265419
2021-04-12 14:12:13 +01:00
olly
106294158a Fix SimpleExoPlayer documentation
I've removed the "by default" statements, since this now depends on how
the builder was configured.

PiperOrigin-RevId: 366249995
2021-04-12 14:12:12 +01:00
olly
b93395e7a5 HLS: Set initial SampleQueue start times
This ensures BUFFER_FLAG_DECODE_ONLY is set on samples that are
before the playback start position, in the case that the queue
is created after the start position is set.

#minor-release

PiperOrigin-RevId: 366249188
2021-04-12 14:12:12 +01:00
olly
f8cc83a458 Ffmpeg extension: Wait for channel count and sample rate
When playing TrueHD streams, it's possible that the first decoded
buffer is empty, and that the channel count and sample rate are
still unknown. To correct for this, defer determining the format
until a buffer that will actually be output from the decoder has
been obtained, and only then query the channel count and sample
rate.

Issue: #8616
#minor-release
PiperOrigin-RevId: 366246245
2021-04-12 14:12:12 +01:00
ibaker
e8742b33dd Use outputStreamEnded for MetadataRenderer#isEnded
Issue: #8710
PiperOrigin-RevId: 366051836
2021-04-12 14:12:07 +01:00
marcbaechinger
6d0a04dd87 Release all PlaybackStatsListener session when timeline becomes empty.
Currently they are only released when the timeline becomes non-empty
again or the player is released.

Issue: #8778
PiperOrigin-RevId: 366041625
2021-04-12 14:09:26 +01:00
andrewlewis
e6780bd157 Add back jcenter() to repositories
The buildscript entry is required by
com.android.tools.build:gradle:4.0.1.

For other projects, it appears that org.checkerframework is
in jcenter.

Without this change building with gradlew is broken, at least.

#minor-release

PiperOrigin-RevId: 366222799
2021-04-12 14:09:26 +01:00
ibaker
eb682ae825 Use Metadata.Entry.toString in PlaybackOutput test logging if possible
Add an allowlist of Metadata.Entry implementations with stable toString
overrides.

PiperOrigin-RevId: 366037505
2021-04-12 14:09:26 +01:00
olly
e499f6d38c Improve tests to use output surfaces more realistically
Prior to this change, there were some unrealistic quirks in
our Robolectric tests. For example, onRenderedFirstFrame would
be called when using FakeVideoRenderer, despite no output to
render the frame to ever being set. This change improves the
realism of these tests. These changes are required for some
improvements being made to how outputs are set on video
renderers.

PiperOrigin-RevId: 367652169
2021-04-12 11:44:36 +01:00
andrewlewis
7e7715dbae Update instructions for GMaven releasing
Issue: #5246

PiperOrigin-RevId: 366041182
2021-04-09 17:29:15 +01:00
Oliver Woodman
1fd62c685a Merge pull request #8720 from dlafayet:tts-shear-block
PiperOrigin-RevId: 365998615
2021-04-09 17:27:31 +01:00
olly
ffb1f61ef7 StyledPlayerControlView: Fix view measurement issue
The exo_controls_background view is supposed to fill its parent,
and so previously used match_parent to do this. However, if the
parent uses wrap_content for its own dimensions, the constraints
being specified become somewhat ambiguous. The parent is supposed
to be sizing itself to wrap its children, and one of the children
is supposed to be sizing itself to match the parent.

Intuitively for this case, you'd hope that the layout logic would
size the parent to wrap its other children, and that the
match_parent child would then fill the parent with its determined
size. That's not what happens, and instead the parent ends up
expanding to occupy all of the space available to it.

This commit sets the exo_controls_background view's dimensions
to be 0dp in the layout, to stop it from influencing the size of
the parent. It's then expanded to fill the parent in code.

Issue: #8726
#minor-release
PiperOrigin-RevId: 364868301
2021-04-09 17:26:35 +01:00
olly
74a9bf098c Simplify handling of playback speed in StyledPlayerControlView
PiperOrigin-RevId: 360404403
2021-04-09 17:25:04 +01:00
ibaker
14711d1fb2 Treat Dolby Vision as H264 in MCVR#getCodecMaxInputSize()
Issue: #8705
PiperOrigin-RevId: 364821429
2021-04-09 17:11:03 +01:00
Ian Baker
d102b932fe Merge pull request #8749 from romanofranz:patch-1
PiperOrigin-RevId: 364779790
2021-04-09 17:09:08 +01:00
aquilescanta
3d487dae40 Add missing switch case
Before this change, calling read after reaching the end of input in an Ogg file
would cause an IllegalStateException.

PiperOrigin-RevId: 364758873
2021-04-09 17:08:39 +01:00
kimvde
aa25037600 JpegExtractor: support JFIF segment preceding Exif segment
#minor-release

PiperOrigin-RevId: 364561115
2021-04-09 17:07:44 +01:00
Ian Baker
65ab00859f Merge pull request #8653 from dlafayet:textemphasis
PiperOrigin-RevId: 364363882
2021-04-09 17:07:08 +01:00
andrewlewis
871c24b966 Fix typo in styled player control view javadoc
#minor-release

PiperOrigin-RevId: 363915106
2021-04-09 17:05:40 +01:00
aquilescanta
ca9af38420 Add 'once' to list of devices that need SetOutputSurfaceWorkaround
Issue: #8718
PiperOrigin-RevId: 363869093
2021-04-09 17:05:13 +01:00
kimvde
5c722acca0 JpegExtractor: read GContainer and GContainerItem XMP prefixes
#minor-release

PiperOrigin-RevId: 363859522
2021-04-09 17:04:39 +01:00
aquilescanta
3732eca8b7 Avoid invalid extractors in DefaultHlsExtractorFactory
This change fixes playback of playlists where segments have the
extension and Content-Type of JPEG pictures (although in reality)
they are transport streams. File inferrence before this change will
cause an exception when assuming the inferred file type is one of
the allowed HLS containers.

#minor-release
Issue: #8733
PiperOrigin-RevId: 363641277
2021-04-09 17:04:08 +01:00