15321 Commits

Author SHA1 Message Date
hschlueter
30c52c58f0 Allow FrameProcessor input surface size changes.
This will be useful for downgrading to a lower resolution during
a slow preview and for processing slide-shows once sequential
multi-asset editing is supported.

PiperOrigin-RevId: 457017255
2022-06-27 10:43:21 +01:00
hmzh
638c758721 Fix MIDI event array traversal in TrackChunk.java and TrackEvent.java
- Corrected trackEventBytes traversal in TrackChunk where the array position marker was not incremented properly, leading to duplicate sample output.
- Amended TrackEvent "Meta Event" parsing to account for the length of variable length bytes.
- Fixed a bug with TrackEvent message parsing where message data was parsed incorrectly due to miscalculated length.

PiperOrigin-RevId: 456967968
2022-06-27 10:42:42 +01:00
hschlueter
f3893c146d Extract FrameProcessor interface from GlEffectsFrameProcessor.
PiperOrigin-RevId: 456814150
2022-06-27 10:42:00 +01:00
hschlueter
938d3c2e5b Disable flaky transformer emulator test on API 31.
videoEncoderFormatUnsupported_completesWithError() has recently
been flaky on API 31 emulators on presubmit because a different
exception than the expected exception is thrown.
This disables it on those emulators to reduce testing noise
until the underlying problem is investigated and resolved.

PiperOrigin-RevId: 456765512
2022-06-27 10:41:18 +01:00
olly
1d2ad39a4d Inform ProgressiveMediaPeriod of known length earlier
PiperOrigin-RevId: 456753343
2022-06-27 10:40:21 +01:00
hschlueter
709224fb1e Rename FrameProcessorChain to GlEffectsFrameProcessor.
This change is just renaming. There is no functional change intended.
The FrameProcessor interface will be created in a follow-up.

PiperOrigin-RevId: 456741628
2022-06-27 10:39:42 +01:00
samrobinson
352967f656 Add a Builder for DefaultEncoderFactory.
PiperOrigin-RevId: 456728032
2022-06-27 10:39:00 +01:00
rohks
74d61bbffb Add timestamp to CueGroup
`TextRenderer` is updated to output `CueGroup`, which contains the presentation time of the cues, in microseconds.

PiperOrigin-RevId: 456531399
2022-06-27 10:38:20 +01:00
hschlueter
69ab79418e Use GlTextureProcessor to avoid redundant copy in MediaPipeProcessor.
After this change GlEffects can use any GlTextureProcessor not just
SingleFrameGlTextureProcessor.
MediaPipeProcessor now implements GlTextureProcessor directly which
allows it to reuse MediaPipe's output texture for its output texture
and avoids an extra copy shader step.

PiperOrigin-RevId: 456530718
2022-06-27 10:37:35 +01:00
hschlueter
555ab97e34 Support chaining async GlTextureProcessors in FrameProcessorChain.
After this change, FrameProcessorChain chains any GlTextureProcessors
instead of only SingleFrameGlTextureProcessors.

The GlTextureProcessors are chained in a bidirectional manner using
ChainingGlTextureProcessorListener to feed input and output related
events forward and release events backwards.

PiperOrigin-RevId: 456478414
2022-06-27 10:36:51 +01:00
tonihei
a7649b639c Clear pending doSomeWork messages when sleeping for offload
The offload sleeping stops as soon as a new DO_SOME_WORK message
is handled (because this indicates an expected change in rendering
and we want to stop sleeping until we know it's safe to do so).

Every exit path from doSomeWork needs to clear other pending
DO_SOME_WORK messages as these requests have already been handled by
the current method invocation. This currently doesn't happen from the
offload sleeping return path and a previously queued DO_SOME_WORK
message can immediately wake up the rendering loop again.

Fix this by moving the message removal to the beginning of the
doSomeWork method (as it prevents forgetting it in one of the
exit paths later).

PiperOrigin-RevId: 456259715
2022-06-27 10:36:06 +01:00
olly
6dc85dc241 Fix parsing H265 short term reference picture sets
Issue: google/ExoPlayer#10316
PiperOrigin-RevId: 456084302
2022-06-27 10:35:27 +01:00
tonihei
0d83c44699 Clean up offload state tracking
1. The offloadSchedulingEnabled value doesn't need to be in
   PlaybackInfo because it's never updated in EPII.
2. The sleepingForOffload value in EPII wasn't updated explicitly
   (just via the return value of a method). It was also only
   meant to be enabled while the player is actively playing, but
   confusingly triggered from a path where the player may
   theoretically be buffering as well.
3. The offload sleeping (=not scheduling doSomeWork) was interwoven
   into the actual scheduling code making it slightly hard to follow.
   This can be improved slightly by keeping the offload sleeping
   decision and the scheduling separate.

PiperOrigin-RevId: 457427293
(cherry picked from commit aedde2de396995e4354f3110cc37e86b48525892)
2022-06-27 10:34:56 +01:00
huangdarwin
f5d8800d51 FrameProcessor: Use factories instead of a builder for Presentation.
PiperOrigin-RevId: 456064021
2022-06-27 10:34:29 +01:00
hschlueter
931562c243 Add option to disable debug preview.
This is useful for testing Transformer in the same way as it is used
in tests and to see only the real transformation time.

PiperOrigin-RevId: 456058466
2022-06-27 10:33:40 +01:00
hschlueter
981baae709 Implement chaining GlTextureProcessor.Listener.
In follow-ups the FrameProcessorChain will set an instance of this
listener for each GlTextureProcessor to chain it with its previous
and next GlTextureProcesssor.

PiperOrigin-RevId: 455628942
2022-06-27 10:32:38 +01:00
tonihei
0b75c254ae Rename shouldUseDummySurface to shouldUsePlaceholderSurface
This was likely missed in 33373d0d0a.

PiperOrigin-RevId: 457422574
(cherry picked from commit aaa01529052bb299be41d5c56b2ea58abf738ce7)
2022-06-27 10:04:19 +01:00
olly
27538370d0 Inform ProgressiveMediaPeriod of known length earlier
PiperOrigin-RevId: 456753343
(cherry picked from commit 531f03a36964f47342f4049e0269b12bd7fb7511)
2022-06-23 14:31:27 +01:00
tonihei
de78cfa362 Clear pending doSomeWork messages when sleeping for offload
The offload sleeping stops as soon as a new DO_SOME_WORK message
is handled (because this indicates an expected change in rendering
and we want to stop sleeping until we know it's safe to do so).

Every exit path from doSomeWork needs to clear other pending
DO_SOME_WORK messages as these requests have already been handled by
the current method invocation. This currently doesn't happen from the
offload sleeping return path and a previously queued DO_SOME_WORK
message can immediately wake up the rendering loop again.

Fix this by moving the message removal to the beginning of the
doSomeWork method (as it prevents forgetting it in one of the
exit paths later).

PiperOrigin-RevId: 456259715
(cherry picked from commit 251389d7447d26b46783428133790d06daca2fd7)
2022-06-21 15:58:04 +01:00
olly
3727385555 Fix parsing H265 short term reference picture sets
Issue: google/ExoPlayer#10316
PiperOrigin-RevId: 456084302
(cherry picked from commit d86bc1078c8f95f8420253e8e8ad7550d09b03f1)
2022-06-20 16:46:15 +01:00
Ian Baker
02674f5d3f Merge branch 'release' 2022-06-17 13:57:54 +01:00
Ian Baker
03569f9e65
Merge pull request #10349 from google/dev-v2-r2.18.0
r2.18.0
2022-06-17 11:42:55 +01:00
Ian Baker
2c7201024e
Merge pull request #88 from androidx/main-r1.0.0-beta01
r1.0.0 beta01
2022-06-17 11:42:16 +01:00
Ian Baker
5f741bbe5a Add lint baseline for spurious API-level warnings
The API 32 SDK has incorrect versioning metadata for Spatializer. It
reports the whole class has only been present since API 33 (which is
surely impossible given it's present in the API 32 SDK):
https://issuetracker.google.com/234009300

The metadata seems to be correct in the API 33 SDK, so this baseline
will no longer be needed when we bump to `compileSdkVersion = 33`.
2022-06-17 10:08:37 +01:00
Ian Baker
85d8682bc0 Add lint baseline for spurious API-level warnings
The API 32 SDK has incorrect versioning metadata for Spatializer. It
reports the whole class has only been present since API 33 (which is
surely impossible given it's present in the API 32 SDK):
https://issuetracker.google.com/234009300

The metadata seems to be correct in the API 33 SDK, so this baseline
will no longer be needed when we bump to `compileSdkVersion = 33`.
2022-06-17 10:04:57 +01:00
bachinger
460d2219be Fix release notes
#minor-release

PiperOrigin-RevId: 455372269
(cherry picked from commit 71ae88fbefc760d2b401c8e7f77cc6acb2d56ba5)
2022-06-16 17:57:49 +00:00
ibaker
68e5612c0d Publish api.txt to media3 GitHub
#minor-release

PiperOrigin-RevId: 455372568
(cherry picked from commit c7f1b465d4dfcfb1657425e4557e47e627d127cf)
2022-06-16 17:54:49 +00:00
bachinger
e2dff6e6fe Fix release notes
#minor-release

PiperOrigin-RevId: 455372269
(cherry picked from commit 4b4e7cb919ca4b2d9c889c5b82994c9d08991381)
2022-06-16 17:54:48 +00:00
christosts
4f5e99c543 Misc improvement in Util
#minor-release

PiperOrigin-RevId: 455380010
2022-06-16 17:48:22 +00:00
christosts
7563bd2792 Misc improvement in Util
#minor-release

PiperOrigin-RevId: 455380010
2022-06-16 17:42:31 +00:00
christosts
5051b47f4c Misc improvement in Util
#minor-release

PiperOrigin-RevId: 455380010
(cherry picked from commit 4f5e99c5432a4fadf64e242fb74d31bc614f7487)
2022-06-16 14:39:46 +00:00
bachinger
71ae88fbef Fix release notes
#minor-release

PiperOrigin-RevId: 455372269
2022-06-16 14:00:24 +00:00
ibaker
c7f1b465d4 Publish api.txt to media3 GitHub
#minor-release

PiperOrigin-RevId: 455372568
2022-06-16 13:58:42 +00:00
bachinger
4b4e7cb919 Fix release notes
#minor-release

PiperOrigin-RevId: 455372269
2022-06-16 13:57:44 +00:00
Marc Baechinger
87814498f4
Merge branch 'release-v2' into dev-v2-r2.18.0 2022-06-16 13:13:17 +00:00
bachinger
e53a649a41 Add lint base xml file for string.xml files
Fixing lint errors in the string.xml files makes no sense because these are
overridden with the next automated string import. Adding a lint-baseline.xml
instead for the ui module.

See https://issuetracker.google.com/208178382

#minor-release

PiperOrigin-RevId: 455354304
(cherry picked from commit 61ab75b8b88050a12492c412e8c79ebf75fc1d9c)
2022-06-16 13:05:17 +00:00
bachinger
3da5ab74b9 Update JavaDoc
#minor-release

PiperOrigin-RevId: 455361427
(cherry picked from commit 87420fcdabbe362d571edfd09f3128b6bb3ae873)
2022-06-16 13:04:43 +00:00
bachinger
da127923c3 Add lint base xml file for string.xml files
Fixing lint errors in the string.xml files makes no sense because these are
overridden with the next automated string import. Adding a lint-baseline.xml
instead for the ui module.

See https://issuetracker.google.com/208178382

#minor-release

PiperOrigin-RevId: 455354304
(cherry picked from commit 495480a66adacff26fb0c9c10f4d44191656bbd0)
2022-06-16 13:04:42 +00:00
bachinger
61ab75b8b8 Add lint base xml file for string.xml files
Fixing lint errors in the string.xml files makes no sense because these are
overridden with the next automated string import. Adding a lint-baseline.xml
instead for the ui module.

See https://issuetracker.google.com/208178382

#minor-release

PiperOrigin-RevId: 455354304
2022-06-16 12:58:29 +00:00
bachinger
87420fcdab Update JavaDoc
#minor-release

PiperOrigin-RevId: 455361427
2022-06-16 12:56:30 +00:00
bachinger
495480a66a Add lint base xml file for string.xml files
Fixing lint errors in the string.xml files makes no sense because these are
overridden with the next automated string import. Adding a lint-baseline.xml
instead for the ui module.

See https://issuetracker.google.com/208178382

#minor-release

PiperOrigin-RevId: 455354304
2022-06-16 12:53:07 +00:00
bachinger
36b976f70f Version bump to exoplayer:2.18.0 and media3:1.0.0-beta01
PiperOrigin-RevId: 455350486
(cherry picked from commit 1c0b4b32a400ab9f7fb316ed7729ea2b8a32957f)
2022-06-16 11:46:35 +00:00
Marc Baechinger
9c02cdb1fb Merge pull request #63 from ittiam-systems:rtp-h263
PiperOrigin-RevId: 455347182
(cherry picked from commit dc0e5c447b926c0d1117182c4e4abf0abc0e9dcb)
2022-06-16 11:41:49 +00:00
bachinger
3dcc24ef2e Version bump to exoplayer:2.18.0 and media3:1.0.0-beta01
#minor-release

PiperOrigin-RevId: 455350486
(cherry picked from commit 209d3085b710665d5659aaedd2290866f4561f7a)
2022-06-16 11:41:28 +00:00
Marc Baechinger
0a4684d045 Merge pull request #63 from ittiam-systems:rtp-h263
PiperOrigin-RevId: 455347182
(cherry picked from commit e220f5377bf8e72454218e8c13e297f0257bc49a)
2022-06-16 11:41:28 +00:00
bachinger
209d3085b7 Version bump to exoplayer:2.18.0 and media3:1.0.0-beta01
#minor-release

PiperOrigin-RevId: 455350486
2022-06-16 11:35:41 +00:00
Marc Baechinger
e220f5377b Merge pull request #63 from ittiam-systems:rtp-h263
PiperOrigin-RevId: 455347182
2022-06-16 11:31:37 +00:00
hschlueter
bf9fa12411 Wrap processor chain executor service for better exception handling.
The wrapper
* catches exceptions for each task and notifies the
  listener (this will be used more in follow-ups when processFrame
  is split into lots of listeners and callbacks),
* removes finished tasks from the queue and signals any exceptions
  that occurred to the listener each time a new task is executed.

PiperOrigin-RevId: 455345184
2022-06-16 11:27:18 +00:00
bachinger
1c0b4b32a4 Version bump to exoplayer:2.18.0 and media3:1.0.0-beta01
#minor-release

PiperOrigin-RevId: 455350486
2022-06-16 11:25:41 +00:00
Marc Baechinger
dc0e5c447b Merge pull request #63 from ittiam-systems:rtp-h263
PiperOrigin-RevId: 455347182
2022-06-16 11:24:41 +00:00