12775 Commits

Author SHA1 Message Date
tonihei
9b10def00f Update release notes and JavaDoc for 2.16.1 (again) 2021-11-18 16:24:04 +00:00
ibaker
ee2dd0e1b1 Remove null keys from DefaultHttpDataSource#getResponseHeaders
PiperOrigin-RevId: 410507648
2021-11-18 14:24:52 +00:00
ibaker
098c3a010e Migrate the cast demo app from PlayerView to StyledPlayerView
StyledPlayerControlView can't really be used on its own (like
PlayerControlView was used here), so we instead use the same
StyledPlayerView instance for both local and casted playback,
replacing the content with a cast icon while casting.

PiperOrigin-RevId: 410764338
2021-11-18 14:22:17 +00:00
andrewlewis
57340bc5d2 Fix gldemo
The GL program needs to be used before accessing its attributes.

#minor-release

PiperOrigin-RevId: 410768017
2021-11-18 14:21:51 +00:00
tonihei
0ba6e37ff9 Assign class member in StyledPlayerControlView before using it
The local tracks variable was used to assign the initial subtext
for the current track selection in the menu, but the new value
was only assigned after the subtext has been evaluated.

Assign the local variable first, so that the remaining accesses
the latest value.

Issue: google/ExoPlayer#9698
PiperOrigin-RevId: 410750396
2021-11-18 14:21:42 +00:00
christosts
7ca69e091c Enable immediate codec start after flush
We verified there is a race condition in the
AsynchronousMediaCodecAdapter when flushing the adapter
multiple times. The race condition results in calling MediaCodec.start()
and MediaCodec.flush() in parallel and that makes the MediaCodec
raise an exception.

This changes the default behavior to call MediaCodec.start() on the
same thread after MediaCodec.flush() to avoid the race condition.

#minor-release

PiperOrigin-RevId: 410509388
2021-11-18 14:21:33 +00:00
olly
d78d349222 HLS: Merge muxedAudioFormat into primary audio tracks
Issue: google/ExoPlayer#9608
PiperOrigin-RevId: 410236626
2021-11-18 14:21:16 +00:00
christosts
16e31a8495 Populate ICY headers into MediaMetadata
Populate ICY headers into MediaMetadata so that they can
propagate to the app via AnalyticsListener#onMediaMetadataChanged().
This change copies IcyHeaders.name into MediaMetadata.description
and IcyHeaders.genre into MediaMetadata.genre.

Note: MediaItem.metadata maintain their precedence and overwrite any
ICY headers parsed.

Issue: google/ExoPlayer#9677

PiperOrigin-RevId: 410495676
2021-11-18 14:20:26 +00:00
andrewlewis
9f6cdb4c36 Update bug number
PiperOrigin-RevId: 410770666
2021-11-18 14:13:25 +00:00
andrewlewis
fc0e6a075e Fix gldemo
The GL program needs to be used before accessing its attributes.

#minor-release

PiperOrigin-RevId: 410768017
2021-11-18 14:09:16 +00:00
tonihei
f946ade1d0 Set LogSessionId on MediaParser for progressive playbacks.
PiperOrigin-RevId: 410766492
2021-11-18 14:04:45 +00:00
ibaker
f6f0386681 Migrate the cast demo app from PlayerView to StyledPlayerView
StyledPlayerControlView can't really be used on its own (like
PlayerControlView was used here), so we instead use the same
StyledPlayerView instance for both local and casted playback,
replacing the content with a cast icon while casting.

PiperOrigin-RevId: 410764338
2021-11-18 14:00:24 +00:00
samrobinson
f634ca3306 Ignore manual test from the transformer_mobile_test target.
In the near future, we will be able to specify which tests run on this
target explicitly, at which point this ignore will be removed.

PiperOrigin-RevId: 410758785
2021-11-18 13:56:11 +00:00
tonihei
70e2e8e4d0 Assign class member in StyledPlayerControlView before using it
The local tracks variable was used to assign the initial subtext
for the current track selection in the menu, but the new value
was only assigned after the subtext has been evaluated.

Assign the local variable first, so that the remaining accesses
the latest value.

Issue: google/ExoPlayer#9698
PiperOrigin-RevId: 410750396
2021-11-18 13:51:46 +00:00
andrewlewis
beccfaba3b Avoid buffers used by OpenGL getting GC'ed
The `GlUtil` wrappers for attributes/uniforms allocate buffers that are passed into OpenGL, and it seems that the distorted output was caused by these buffers being garbage collected.

The issue was difficult to reproduce manually. Add a test that does repeated transcodes in a loop (marked `@Ignore` for now because it runs for a long time and requires network access so may be flaky) to make it easier to run many transcodes and look for inconsistent output. For now the consistency check is just based on the file size which is very likely to change if the actual video frames change.

Verified that the test fails before, and passes once the attributes and uniforms are stored in fields as in this CL.

PiperOrigin-RevId: 410581706
2021-11-18 13:47:36 +00:00
hschlueter
af1d5856dc Merge transformer video renderers.
This change merges `TransformerMuxingVideoRenderer` and
`TransformerTranscodingVideoRenderer` into `TransformerVideoRenderer`.
Besides all features supported by `TransformerTranscodingVideoRenderer`
the new merged `TransformerVideoRenderer` also supports SEF slow motion
flatting without re-encoding like the `TransformerMuxingVideoRenderer`.
To do this, it uses a `SefSlowMotionVideoSampleTransformer` with
the `PassthroughPipeline`.

PiperOrigin-RevId: 410531478
2021-11-18 13:43:31 +00:00
huangdarwin
18a15fb995 Transformer: Rename setOutputMimeType() to setContainerMimeType().
This mime type is technically for the Muxer, and determines
the container used. In the context of the transformer, this can
be thought of more as a container mime type, to avoid confusion
with the video mime type and audio mime type.

Deprecates setOutputMimeType().

PiperOrigin-RevId: 410530707
2021-11-18 13:39:19 +00:00
claincly
f401d46229 Fix sequence number calculation logic.
Issue: google/ExoPlayer#9697

Before, the `MAX_SEQUENCE_NUMBER` is 65535, such that the logic to get the next
sequence number:

`previousSeqNumber + 1 % MAX_SEQUENCE_NUMBER`

yields 0 when `previousSeqNumber` is 65534. However, the next sequence number
should be 65535.

PiperOrigin-RevId: 410530098
2021-11-18 13:35:13 +00:00
tonihei
6ed75f1a93 Set LogSessionId on MediaCodec.
PiperOrigin-RevId: 410516082
2021-11-18 13:31:10 +00:00
tonihei
14ab4f8058 Set LogSessionId on AudioTrack.
This requires forwarding the PlayerId to the AudioSink.

PiperOrigin-RevId: 410509605
2021-11-18 13:26:39 +00:00
christosts
45a5a7584d Enable immediate codec start after flush
We verified there is a race condition in the
AsynchronousMediaCodecAdapter when flushing the adapter
multiple times. The race condition results in calling MediaCodec.start()
and MediaCodec.flush() in parallel and that makes the MediaCodec
raise an exception.

This changes the default behavior to call MediaCodec.start() on the
same thread after MediaCodec.flush() to avoid the race condition.

#minor-release

PiperOrigin-RevId: 410509388
2021-11-18 13:22:05 +00:00
ibaker
06755d4247 Remove null keys from DefaultHttpDataSource#getResponseHeaders
PiperOrigin-RevId: 410507648
2021-11-18 13:17:40 +00:00
christosts
349160a5cf Populate ICY headers into MediaMetadata
Populate ICY headers into MediaMetadata so that they can
propagate to the app via AnalyticsListener#onMediaMetadataChanged().
This change copies IcyHeaders.name into MediaMetadata.description
and IcyHeaders.genre into MediaMetadata.genre.

Note: MediaItem.metadata maintain their precedence and overwrite any
ICY headers parsed.

Issue: google/ExoPlayer#9677

#minor-release

PiperOrigin-RevId: 410495676
2021-11-18 13:13:27 +00:00
tonihei
8320fe8cf2 Update release date of 2.16.1
PiperOrigin-RevId: 410255281
2021-11-16 16:33:27 +00:00
tonihei
8afb8f7814 Remove disabled types in StyledPlayerControlView when selecting tracks.
When selecting an explicit track or "Auto", we need to remove any
existing track type disabling. Otherwise the track override won't work.

Issue: google/ExoPlayer#9692
PiperOrigin-RevId: 410250313
2021-11-16 16:32:22 +00:00
tonihei
78c1d81fb4 Update Javadoc for 2.16.1
PiperOrigin-RevId: 410021183
2021-11-16 16:32:03 +00:00
tonihei
2110769323 Update release date of 2.16.1
PiperOrigin-RevId: 410255281
2021-11-16 16:30:04 +00:00
tonihei
6c1d5e7e81 Remove disabled types in StyledPlayerControlView when selecting tracks.
When selecting an explicit track or "Auto", we need to remove any
existing track type disabling. Otherwise the track override won't work.

Issue: google/ExoPlayer#9692
PiperOrigin-RevId: 410250313
2021-11-16 16:22:09 +00:00
olly
45857b50dc HLS: Merge muxedAudioFormat into primary audio tracks
Issue: google/ExoPlayer#9608
#minor-release
PiperOrigin-RevId: 410236626
2021-11-16 16:17:34 +00:00
andrewlewis
37d3468eef Update transformer error codes bug references
PiperOrigin-RevId: 410216171
2021-11-16 16:13:11 +00:00
huangdarwin
ecb47ba564 Transformer GL: Add setResolution() API.
Simple, initial implementation to allow setResolution()
to set the output height, for downscaling/upscaling.

Per TODOs, follow-up CLs may change layering, add UI,
or allow querying decoders for more resolution options.

PiperOrigin-RevId: 410203343
2021-11-16 16:04:33 +00:00
tonihei
615a85f206 Update Javadoc for 2.16.1
PiperOrigin-RevId: 410021183
2021-11-16 09:43:17 +00:00
claincly
cdcf57374a
Merge branch 'dev-v2' into rtsp-socket-factory 2021-11-15 17:54:51 +00:00
tonihei
8432261c36 Bump version to 2.16.1
And make related release notes updates.

PiperOrigin-RevId: 409991879
2021-11-15 17:18:24 +00:00
tonihei
69d51feeee Add parsed essential/supplemental properties to the Representation.
We already parse essential and supplemental properties from the
Representation, but don't add them to our Representation class so that
they can be accessed by users.

Issue: google/ExoPlayer#9579
PiperOrigin-RevId: 409961990
2021-11-15 17:18:15 +00:00
tonihei
9e8af7c250 Add additional documentation regarding resource acquisition.
The main point of the IDLE state is that the player is not holding
resources. Clarify this in the documentation of STATE_IDLE, prepare and
stop.

PiperOrigin-RevId: 409950785
2021-11-15 17:18:06 +00:00
tonihei
d9f2fc9f81 Use buildUpon instead of creating new overrides in UI ControlView.
Creating a new set of overrides removes previously set overrides that
should be kept.

Issue: google/ExoPlayer#9690
PiperOrigin-RevId: 409933541
2021-11-15 17:17:55 +00:00
olly
34b2572d37 Fixes for some minor misc issues
- Unnecessary deprecation suppressions
- Dead code
- Broken Javadoc

PiperOrigin-RevId: 409357884
2021-11-15 17:17:43 +00:00
olly
233935d6bd Update dependency versions
Note: Updating androidxTestTruthVersion is required tot
arget API level 31.
PiperOrigin-RevId: 409167744
2021-11-15 17:17:34 +00:00
tonihei
fde78bc3a7 Bump version to 2.16.1
And make related release notes updates.

PiperOrigin-RevId: 409991879
2021-11-15 17:15:45 +00:00
tonihei
cd857d8659 Add parsed essential/supplemental properties to the Representation.
We already parse essential and supplemental properties from the
Representation, but don't add them to our Representation class so that
they can be accessed by users.

Issue: google/ExoPlayer#9579
PiperOrigin-RevId: 409961990
2021-11-15 14:52:25 +00:00
tonihei
1564d5314c Add additional documentation regarding resource acquisition.
The main point of the IDLE state is that the player is not holding
resources. Clarify this in the documentation of STATE_IDLE, prepare and
stop.

PiperOrigin-RevId: 409950785
2021-11-15 14:47:51 +00:00
tonihei
1d81d7e501 Use buildUpon instead of creating new overrides in UI ControlView.
Creating a new set of overrides removes previously set overrides that
should be kept.

Issue: google/ExoPlayer#9690
PiperOrigin-RevId: 409933541
2021-11-15 11:36:34 +00:00
hschlueter
68000e0012 Move OpenGL usage from VideoSamplePipeline to new OpenGlFrameEditor.
The decoder writes to `OpenGlFrameEditor`'s input `Surface`
and the `OpenGlFrameEditor` writes to the encoder's input `Surface`.

PiperOrigin-RevId: 409931796
2021-11-15 11:32:31 +00:00
olly
67e1499956 Fixes for some minor misc issues
- Unnecessary deprecation suppressions
- Dead code
- Broken Javadoc

PiperOrigin-RevId: 409357884
2021-11-15 10:58:32 +00:00
olly
12c0aa2ec9 Update dependency versions
Note: Updating androidxTestTruthVersion is required tot
arget API level 31.
PiperOrigin-RevId: 409167744
2021-11-15 10:53:47 +00:00
samrobinson
793e675de8 Setup the initial instrumentation tests for transformer.
Due to sharding, each test should be in a separate class.

PiperOrigin-RevId: 409142436
2021-11-11 16:57:45 +00:00
tonihei
a29d7cf684 Merge #9678: Fix typo in Hello world documentation.
PiperOrigin-RevId: 409129177
2021-11-11 14:17:04 +00:00
tonihei
d88accd49e Merge #9678: Fix typo in Hello world documentation.
PiperOrigin-RevId: 409129177
2021-11-11 14:14:59 +00:00
hschlueter
cfe61dbbda Write sample size to dumpfile in transformer tests.
If the number of samples changes, the sizes will help us to verify whether they are just split differently or extra data was added.

PiperOrigin-RevId: 407346280
2021-11-11 13:55:12 +00:00