This introduces a new option `setAudioMimeType` in `TranscodingTransformer.Builder` and a corresponding check whether the selected type is supported. This check is done using `supportsSampleMimeType` which is now part of the `Muxer.Factory` and `MuxerWrapper` rather than `Muxer`.
A new field `audioMimeType` is added to `Transformation` and the `TransformerAudioRenderer` uses this instead of the input MIME type if requested.
PiperOrigin-RevId: 405367817
Decoded video frames can be large and there is no need to retrieve the
corresponding ByteBuffer as we render the decoded frames on a surface
for better performance.
PiperOrigin-RevId: 405364950
*** Original commit ***
Migrate callers of ExoPlayer.Builder#build() to buildExoPlayer()
An upcoming change will update build() to return Player.
PiperOrigin-RevId: 401468532
Temporary file copy of Transformer, which uses
TransformerTranscodingVideoRenderer instead of
TransformerMuxingVideoRenderer to transform files. This allows devs to test
transcoding more easily using the Transformer demo, while external engineers
continue to see the completely working Muxing-based transformer.
In the future, this will replace the Transformer class.
PiperOrigin-RevId: 401020893
TracksInfo is very similar to
`MappingTrackSelector.MappedTracksInfo` with some
fields removed to simplify the Player API,
notably it doesn't expose the renderer concept.
A significant difference is the addition of a `selected` boolean
field which avoids having a separate `getCurrentTrackSelection`
API.
This cl is a part of the bigger track selection change,
splitted for ease of review.
In particular, the MediaSession implementation and UI usage
have been slitted in child cls.
Find all cls with the tag:
#player-track-selection
PiperOrigin-RevId: 400937124
The format should have the following fields set (as specified in the javadoc):
- width
- height
- frame rate, and
- averageBitrate.
PiperOrigin-RevId: 400204510
In the old version, the transcoder uses decoder.isEnded() alone as the criteria
to stop the encoding/muxing process. It's rectified to:
- On decoder ending, signal the encoder of EOS after writing all decoded frames to it.
- On encoder ending, write end track to muxer.
PiperOrigin-RevId: 393322114
The prototype is built upon Transformer and took many references from
TransformerAudioRenderer.
Please take a look and we can discuss more details.
PiperOrigin-RevId: 390192487
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
- 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
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
- 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