This removes a lot of duplication from the module configuration,
avoids divergence, and makes sure that only the important differences
to the default are visible in each module file.
PiperOrigin-RevId: 318024823
FFmpeg requires input buffers to be sized larger than the size
of the data they contain. This is to allow optimized decoder
implementations that read data in fixed size chunks, without
the risk of such decoders reading beyond the end of the buffer.
Issue: #2159
PiperOrigin-RevId: 310946866
We currently propagate only ColorInfo, but propagating the whole Format
is generally useful (e.g., to get the frame-rate on the output side of
the decoder).
PiperOrigin-RevId: 310359650
- Fix DecoderAudioRenderer to re-init codec if the DRM session changes.
- Add canKeepCodec to DecoderVideoRenderer. Previously it was assumed
that the decoder could be re-used, but this will not be true in all
cases for FfmpegVideoRenderer.
Issue: #7079
PiperOrigin-RevId: 309935278
Android scheduler has performance issues when a device has a
combiation of big/medium/little cores. Add a heuristic to set the
default number of threads used for deocding to the number of
"performance" (i.e. big) cores.
PiperOrigin-RevId: 308683989
- Show renderers with no tracks in EventLogger track logging
- Log renderer names in EventLogger track logging
- Add useful message to ExoPlaybackException instances (including
renderer name for renderer errors)
PiperOrigin-RevId: 302421616
- This change also adds support for VideoFrameMetadataListener in the
AV1 renderer
- This is a preliminary step prior to adding FfmpegVideoDecoder
Issue: #2159
PiperOrigin-RevId: 301702460
This is a necessary step for Decoder implementations to support
audio and video. MediaCodecRenderer.DecoderException is renamed
MediaCodecDecoderException and extends the new DecoderException
Issue: #2159
PiperOrigin-RevId: 301698238
The restriction that these classes only work with SimpleDecoders
is unnecessary. An FfmpegVideoRenderer will not be able to use a
SimpleDecoder, because the SimpleDecoder assumption that each input
buffer can be decoded immediately into a corresponding output is
not true for all video codecs that Ffmpeg supports (e.g., H264 does
not have this property). Generalizing SimpleDecoderVideoRenderer to
DecoderVideoRenderer will allow FfmpegVideoRenderer to still use
the base class, without having to use a SimpleDecoder.
This is a preliminary change toward being able to merge a version
of https://github.com/google/ExoPlayer/pull/7079.
Issue: #2159
PiperOrigin-RevId: 301412344
The new version fixes some warnings in Gradle builds. Also
add missing indirect compileOnly dependencies to fix some more warnings
Issue:issue:#7007
PiperOrigin-RevId: 298855510
The release_input_buffer callback will be called when the library
is done consuming an "input buffer". The buffer passed into
EnqueueFrame must be kept valid until this callback is called. If
frame parallel is false, then this callback can be nullptr (in
this case the buffer has to be kept valid until the next call to
DequeueFrame). If frame parallel is true, this callback cannot be
nullptr.
PiperOrigin-RevId: 296276083
Not important, but when overriding a method that can return null,
it seems preferable to put @Override first, followed by what it's
overriding (which includes the @Nullable).
Also remove explicit @NonNull use in the core library. @NonNull is
propagated by default, so this is redundant.
PiperOrigin-RevId: 296188379
1. Have frame buffer callbacks return Libgav1StatusCode instead of int.
The 0 (success), -1 (failure) return value convention is less obvious.
Note: The callers of frame buffer callbacks,
BufferPool::OnFrameBufferSizeChanged() and YuvBuffer::Realloc(),
currently return bool, so more work is needed to propagate the frame
buffer callbacks' Libgav1StatusCode return value to the Decoder API.
2. Allow the FrameBufferSizeChangedCallback to be omitted if the frame
buffer size information is not useful to the application.
3. Remove the old (version 1) frame buffer callback API. Remove the
frame buffer callback adaptor.
frame_buffer2.h is renamed frame_buffer.h.
Libgav1FrameBuffer2 is renamed Libgav1FrameBuffer.
GetFrameBufferCallback2 and ReleaseFrameBufferCallback2 are renamed
GetFrameBufferCallback and ReleaseFrameBufferCallback.
PiperOrigin-RevId: 295971183
This avoids the issue of whether it is defined behaviour to cast an
arbitrary int (or even intptr_t) value to a void* pointer. This is the
original approach used before commit 0915998add5918214fa0282a69b50a159168a6d5.
PiperOrigin-RevId: 295552115
Libgav1 recently added the ComputeFrameBufferInfo() and SetFrameBuffer()
helper functions for writing frame buffer callbacks. Using them
simplifies the Libgav1GetFrameBuffer() function.
Also resurrect the AlignTo16() function.
PiperOrigin-RevId: 295548330
fixes:
gav1_jni.cc:446:25: error: cast from pointer to smaller type 'int' loses information
const int buffer_id = reinterpret_cast<int>(buffer_private_data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gav1_jni.cc:730:9: error: cast from pointer to smaller type 'int' loses information
reinterpret_cast<int>(decoder_buffer->buffer_private_data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
after 0915998add
PiperOrigin-RevId: 295211245
The new code in Libgav1GetFrameBuffer is copied from
libgav1/src/frame_buffer_callback_adaptor.cc. It may become libgav1
utility functions available to libgav1 clients in the future.
The Libgav1FrameBuffer struct in the old frame buffer callback API is
defined as follows:
typedef struct Libgav1FrameBuffer {
uint8_t* data[3];
size_t size[3];
void* private_data;
} Libgav1FrameBuffer;
Copy these three fields to the JniFrameBuffer class as private data
members and add the RawBuffer() and Id() getter methods.
The existing AlignTo16 function is replaced by the copied Align template
function.
PiperOrigin-RevId: 293709205
+ force arm (over thumb) mode for 32-bit builds
-O2 improves performance ~30-40% over the default -Oz depending on the
resolution; this is similar to what is done for vp9 which uses -O3.
PiperOrigin-RevId: 290318121
Currently, ndk cpu-features is being used.
This is now deprecated and google open-source
cpu_features library is recommended.
PiperOrigin-RevId: 273987647
If a user has checked out libgav1 they almost certainly want to
build the extension, so fail if CMake is not present but
libgav1 is present. Also add a note to the README linking to
instructions for installing CMake.
Also remove the NDK check, as ndk.dir is apparently deprecated
and Android Studio appears to install this automatically anyway.
PiperOrigin-RevId: 273918142