19 Commits

Author SHA1 Message Date
aquilescanta
89fe0d0cf9 Make AnalyticsListener.onPlayerError take a PlaybackException
NO_EXTERNAL

PiperOrigin-RevId: 377090819
2021-06-03 13:49:28 +01:00
kimvde
fc47c2fe86 Add missing @DoNotInstrument annotations
PiperOrigin-RevId: 377006047
2021-06-02 18:13:19 +01:00
bachinger
4c1a294b2e Format Java source files
PiperOrigin-RevId: 372127633
2021-05-06 13:32:25 +01:00
olly
32c5ea0643 Adds Format to MediaCodecAdapter.Configuration.
PiperOrigin-RevId: 369444747
2021-04-21 09:48:46 +01:00
olly
7a13163664 MediaCodecAdapter.Factory creates a started Adapter.
This change moves the responsibility of creating, configuring and starting the MediaCodec from the MediaCodecRender to the MediaCodecAdapter.Factory.

This move allows ExoPlayer's client to decide how and when codecs are created and/or reused.

To allow the move, this CL replaces MediaCodecRenderer.ConfigureCodec with MediaCodecRenderer.getCodecConfiguration

PiperOrigin-RevId: 369273887
2021-04-20 00:10:36 +01:00
olly
2d9177b7c2 SampleStream/SampleQueue: Introduce read flags
- SampleQueue.peek is replaced with SampleQueue.read with
  FLAG_PEEK. This also exposes peek functionality through
  SampleStream.
- Use of DecoderInputBuffer.isFlagsOnly is replaced with
  FLAG_OMIT_SAMPLE_DATA. This flag can be used with or
  without FLAG_PEEK, where-as previously the read position
  would never be advanced for an isFlagsOnly buffer.
- formatRequired is replaced with FLAG_FORMAT_REQUIRED.

PiperOrigin-RevId: 363460105
2021-03-24 18:03:28 +00:00
tonihei
31f65f63ff Remove AutoAdvancingFakeClock.
The class is just an empty shell around the super class and can be
removed.

PiperOrigin-RevId: 363386440
2021-03-24 18:03:18 +00:00
aquilescanta
f8505204cc Move MediaFormatUtil into common
Also move out of the mediacodec package into the util package.

PiperOrigin-RevId: 356949401
2021-02-12 16:39:28 +00:00
kimvde
d21a47c4f1 Transformer: remove SpeedProvider interface from Javadoc
#minor-release

PiperOrigin-RevId: 356221487
2021-02-09 13:59:07 +00:00
kimvde
da52de669c Avoid skipping the first decoder output buffers after speed change
#minor-release

PiperOrigin-RevId: 355652144
2021-02-04 18:14:35 +00:00
kimvde
46b8b069ca Transformer: set audio decoder max input size
#minor-release

PiperOrigin-RevId: 354949992
2021-02-01 18:12:14 +00:00
kimvde
1ec326438f Merge MuxerWrapper stop() and release() methods
#minor-release

PiperOrigin-RevId: 354938190
2021-02-01 18:12:05 +00:00
andrewlewis
b9065e8dfa Simplify output buffer handling in transformer
We can dequeue as part of getting output buffers (or output buffer info) in
`MediaCodecAdapterWrapper`, which simplifies the caller slightly.

Also try to make minor clarifications in method naming in
`TransformerAudioRenderer`.

#minor-release

PiperOrigin-RevId: 354890796
2021-02-01 18:11:42 +00:00
andrewlewis
91dcf39db5 Simplify feeding codec input in transformer
The caller knows whether it's queued end-of-stream, so we can remove the return
value of the method.

#minor-release

PiperOrigin-RevId: 354888298
2021-02-01 18:11:33 +00:00
andrewlewis
c3bce234ca Improve format propagation in transformer
- Store output format in `MediaCodecAdapterWrapper` when we get a format from
  the codec, instead of creating it on demand.
- Make format building code not audio-specific.
- Remove `MediaCodecAdapterWrapper.getConfigFormat` and instead keep track of
  the input/output formats in the renderer. This will mean that the code still
  works if an audio processor changes the audio format in future.
- Make exceptions thrown during audio rendering use the same (input) renderer
  format.
- Misc other minor cleanup.

#minor-release

PiperOrigin-RevId: 354556619
2021-02-01 18:11:04 +00:00
andrewlewis
afb41123c2 Switch transformer tests to use dump files
Add an interface to muxers to allow tests to pass a dumpable muxer.

#minor-release

PiperOrigin-RevId: 354543388
2021-02-01 18:10:55 +00:00
tonihei
2e52c0b8d8 Make FakeClock fully deterministic.
This is achieved by only triggering one message at a time. After
triggering a message we send another to ourselves to know when the
following message can be triggered.

Other required changes:
 - The messages need to be sorted correctly (by time and creation order)
 - To prevent deadlocks when one thread is waiting for another,
   we need to add new method to Clock to indicate that the current
   thread is about to wait. This then allows us to trigger messages
   from other threads in FakeClock.
 - AnalyticsCollectorTest needed some adjustments:
   - onTimelineChanged now deterministically arrives after the initial
     timline is already known, so some of the period information changes
     from window only to full period info.
   - The playlistOperations test suffers from a bug that the first frame
     is rendered too early and that's why we now get additional events.

PiperOrigin-RevId: 353877832
2021-01-26 17:13:35 +00:00
andrewlewis
b1df2f4e4b Elaborate method comments in transformer audio renderer
#minor-release

PiperOrigin-RevId: 353856211
2021-01-26 15:59:06 +00:00
kimvde
abccbcf247 Publish transformer module
PiperOrigin-RevId: 353254249
2021-01-22 17:13:47 +00:00