Final README updates

PiperOrigin-RevId: 402547071
This commit is contained in:
olly 2021-10-12 14:34:55 +01:00 committed by Oliver Woodman
parent 4b3cbfd64f
commit eeec2b2e77
9 changed files with 145 additions and 137 deletions

View File

@ -1,12 +1,12 @@
# ExoPlayer AV1 extension
# ExoPlayer AV1 module
The AV1 extension provides `Libgav1VideoRenderer`, which uses libgav1 native
The AV1 module provides `Libgav1VideoRenderer`, which uses libgav1 native
library to decode AV1 videos.
## License note
Please note that whilst the code in this repository is licensed under
[Apache 2.0][], using this extension also requires building and including one or
[Apache 2.0][], using this module also requires building and including one or
more external libraries as described below. These are licensed separately.
[Apache 2.0]: https://github.com/google/ExoPlayer/blob/release-v2/LICENSE
@ -51,9 +51,9 @@ git clone https://github.com/abseil/abseil-cpp.git third_party/abseil-cpp
* [Install CMake][].
Having followed these steps, gradle will build the extension automatically when
run on the command line or via Android Studio, using [CMake][] and [Ninja][]
to configure and build libgav1 and the extension's [JNI wrapper library][].
Having followed these steps, gradle will build the module automatically when run
on the command line or via Android Studio, using [CMake][] and [Ninja][] to
configure and build libgav1 and the module's [JNI wrapper library][].
[top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
[Install CMake]: https://developer.android.com/studio/projects/install-ndk
@ -63,33 +63,35 @@ to configure and build libgav1 and the extension's [JNI wrapper library][].
## Build instructions (Windows)
We do not provide support for building this extension on Windows, however it
should be possible to follow the Linux instructions in [Windows PowerShell][].
We do not provide support for building this module on Windows, however it should
be possible to follow the Linux instructions in [Windows PowerShell][].
[Windows PowerShell]: https://docs.microsoft.com/en-us/powershell/scripting/getting-started/getting-started-with-windows-powershell
## Using the module
Once you've followed the instructions above to check out, build and depend on
the extension, the next step is to tell ExoPlayer to use `Libgav1VideoRenderer`.
the module, the next step is to tell ExoPlayer to use `Libgav1VideoRenderer`.
How you do this depends on which player API you're using:
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you can
enable using the extension by setting the `extensionRendererMode` parameter of
the `DefaultRenderersFactory` constructor to `EXTENSION_RENDERER_MODE_ON`.
This will use `Libgav1VideoRenderer` for playback if `MediaCodecVideoRenderer`
doesn't support decoding the input AV1 stream. Pass
`EXTENSION_RENDERER_MODE_PREFER` to give `Libgav1VideoRenderer` priority over
`MediaCodecVideoRenderer`.
* If you've subclassed `DefaultRenderersFactory`, add a `Libvgav1VideoRenderer`
to the output list in `buildVideoRenderers`. ExoPlayer will use the first
`Renderer` in the list that supports the input media format.
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you
can enable using the module by setting the `extensionRendererMode` parameter
of the `DefaultRenderersFactory` constructor to
`EXTENSION_RENDERER_MODE_ON`. This will use `Libgav1VideoRenderer` for
playback if `MediaCodecVideoRenderer` doesn't support decoding the input AV1
stream. Pass `EXTENSION_RENDERER_MODE_PREFER` to give `Libgav1VideoRenderer`
priority over `MediaCodecVideoRenderer`.
* If you've subclassed `DefaultRenderersFactory`, add a
`Libvgav1VideoRenderer` to the output list in `buildVideoRenderers`.
ExoPlayer will use the first `Renderer` in the list that supports the input
media format.
* If you've implemented your own `RenderersFactory`, return a
`Libgav1VideoRenderer` instance from `createRenderers`. ExoPlayer will use the
first `Renderer` in the returned array that supports the input media format.
`Libgav1VideoRenderer` instance from `createRenderers`. ExoPlayer will use
the first `Renderer` in the returned array that supports the input media
format.
* If you're using `ExoPlayer.Builder`, pass a `Libgav1VideoRenderer` in the
array of `Renderer`s. ExoPlayer will use the first `Renderer` in the list that
supports the input media format.
array of `Renderer`s. ExoPlayer will use the first `Renderer` in the list
that supports the input media format.
Note: These instructions assume you're using `DefaultTrackSelector`. If you have
a custom track selector the choice of `Renderer` is up to your implementation.
@ -98,7 +100,7 @@ then you need to implement your own logic to use the renderer for a given track.
## Using the module in the demo application
To try out playback using the extension in the [demo application][], see
To try out playback using the module in the [demo application][], see
[enabling extension decoders][].
[demo application]: https://exoplayer.dev/demo-application.html

View File

@ -1,12 +1,12 @@
# ExoPlayer FFmpeg extension
# ExoPlayer FFmpeg module
The FFmpeg extension provides `FfmpegAudioRenderer`, which uses FFmpeg for
decoding and can render audio encoded in a variety of formats.
The FFmpeg module provides `FfmpegAudioRenderer`, which uses FFmpeg for decoding
and can render audio encoded in a variety of formats.
## License note
Please note that whilst the code in this repository is licensed under
[Apache 2.0][], using this extension also requires building and including one or
[Apache 2.0][], using this module also requires building and including one or
more external libraries as described below. These are licensed separately.
[Apache 2.0]: https://github.com/google/ExoPlayer/blob/release-v2/LICENSE
@ -15,8 +15,8 @@ more external libraries as described below. These are licensed separately.
To use the module you need to clone this GitHub project and depend on its
modules locally. Instructions for doing this can be found in the
[top level README][]. The extension is not provided via Google's Maven
repository (see [#2781][] for more information).
[top level README][]. The module is not provided via Google's Maven repository
(see [#2781][] for more information).
In addition, it's necessary to manually build the FFmpeg library, so that gradle
can bundle the FFmpeg binaries in the APK:
@ -60,7 +60,7 @@ FFMPEG_PATH="$(pwd)"
ENABLED_DECODERS=(vorbis opus flac)
```
* Add a link to the FFmpeg source code in the FFmpeg extension `jni` directory.
* Add a link to the FFmpeg source code in the FFmpeg module `jni` directory.
```
cd "${FFMPEG_EXT_PATH}/jni" && \
@ -79,32 +79,34 @@ cd "${FFMPEG_EXT_PATH}/jni" && \
## Build instructions (Windows)
We do not provide support for building this extension on Windows, however it
should be possible to follow the Linux instructions in [Windows PowerShell][].
We do not provide support for building this module on Windows, however it should
be possible to follow the Linux instructions in [Windows PowerShell][].
[Windows PowerShell]: https://docs.microsoft.com/en-us/powershell/scripting/getting-started/getting-started-with-windows-powershell
## Using the module
Once you've followed the instructions above to check out, build and depend on
the extension, the next step is to tell ExoPlayer to use `FfmpegAudioRenderer`.
How you do this depends on which player API you're using:
the module, the next step is to tell ExoPlayer to use `FfmpegAudioRenderer`. How
you do this depends on which player API you're using:
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you can
enable using the extension by setting the `extensionRendererMode` parameter of
the `DefaultRenderersFactory` constructor to `EXTENSION_RENDERER_MODE_ON`.
This will use `FfmpegAudioRenderer` for playback if `MediaCodecAudioRenderer`
doesn't support the input format. Pass `EXTENSION_RENDERER_MODE_PREFER` to
give `FfmpegAudioRenderer` priority over `MediaCodecAudioRenderer`.
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you
can enable using the module by setting the `extensionRendererMode` parameter
of the `DefaultRenderersFactory` constructor to
`EXTENSION_RENDERER_MODE_ON`. This will use `FfmpegAudioRenderer` for
playback if `MediaCodecAudioRenderer` doesn't support the input format. Pass
`EXTENSION_RENDERER_MODE_PREFER` to give `FfmpegAudioRenderer` priority over
`MediaCodecAudioRenderer`.
* If you've subclassed `DefaultRenderersFactory`, add an `FfmpegAudioRenderer`
to the output list in `buildAudioRenderers`. ExoPlayer will use the first
`Renderer` in the list that supports the input media format.
* If you've implemented your own `RenderersFactory`, return an
`FfmpegAudioRenderer` instance from `createRenderers`. ExoPlayer will use the
first `Renderer` in the returned array that supports the input media format.
`FfmpegAudioRenderer` instance from `createRenderers`. ExoPlayer will use
the first `Renderer` in the returned array that supports the input media
format.
* If you're using `ExoPlayer.Builder`, pass an `FfmpegAudioRenderer` in the
array of `Renderer`s. ExoPlayer will use the first `Renderer` in the list that
supports the input media format.
array of `Renderer`s. ExoPlayer will use the first `Renderer` in the list
that supports the input media format.
Note: These instructions assume you're using `DefaultTrackSelector`. If you have
a custom track selector the choice of `Renderer` is up to your implementation,
@ -118,7 +120,7 @@ then implement your own logic to use the renderer for a given track.
## Using the module in the demo application
To try out playback using the extension in the [demo application][], see
To try out playback using the module in the [demo application][], see
[enabling extension decoders][].
[demo application]: https://exoplayer.dev/demo-application.html

View File

@ -1,12 +1,12 @@
# ExoPlayer Flac extension
# ExoPlayer Flac module
The Flac extension provides `FlacExtractor` and `LibflacAudioRenderer`, which
use libFLAC (the Flac decoding library) to extract and decode FLAC audio.
The Flac module provides `FlacExtractor` and `LibflacAudioRenderer`, which use
libFLAC (the Flac decoding library) to extract and decode FLAC audio.
## License note
Please note that whilst the code in this repository is licensed under
[Apache 2.0][], using this extension also requires building and including one or
[Apache 2.0][], using this module also requires building and including one or
more external libraries as described below. These are licensed separately.
[Apache 2.0]: https://github.com/google/ExoPlayer/blob/release-v2/LICENSE
@ -17,8 +17,7 @@ To use the module you need to clone this GitHub project and depend on its
modules locally. Instructions for doing this can be found in the
[top level README][].
In addition, it's necessary to build the extension's native components as
follows:
In addition, it's necessary to build the module's native components as follows:
* Set the following environment variables:
@ -55,15 +54,15 @@ ${NDK_PATH}/ndk-build APP_ABI=all -j4
## Build instructions (Windows)
We do not provide support for building this extension on Windows, however it
should be possible to follow the Linux instructions in [Windows PowerShell][].
We do not provide support for building this module on Windows, however it should
be possible to follow the Linux instructions in [Windows PowerShell][].
[Windows PowerShell]: https://docs.microsoft.com/en-us/powershell/scripting/getting-started/getting-started-with-windows-powershell
## Using the module
Once you've followed the instructions above to check out, build and depend on
the extension, the next step is to tell ExoPlayer to use the extractor and/or
the module, the next step is to tell ExoPlayer to use the extractor and/or
renderer.
### Using `FlacExtractor`
@ -75,21 +74,23 @@ renderer.
### Using `LibflacAudioRenderer`
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you can
enable using the extension by setting the `extensionRendererMode` parameter of
the `DefaultRenderersFactory` constructor to `EXTENSION_RENDERER_MODE_ON`.
This will use `LibflacAudioRenderer` for playback if `MediaCodecAudioRenderer`
doesn't support the input format. Pass `EXTENSION_RENDERER_MODE_PREFER` to
give `LibflacAudioRenderer` priority over `MediaCodecAudioRenderer`.
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you
can enable using the module by setting the `extensionRendererMode` parameter
of the `DefaultRenderersFactory` constructor to
`EXTENSION_RENDERER_MODE_ON`. This will use `LibflacAudioRenderer` for
playback if `MediaCodecAudioRenderer` doesn't support the input format. Pass
`EXTENSION_RENDERER_MODE_PREFER` to give `LibflacAudioRenderer` priority
over `MediaCodecAudioRenderer`.
* If you've subclassed `DefaultRenderersFactory`, add a `LibflacAudioRenderer`
to the output list in `buildAudioRenderers`. ExoPlayer will use the first
`Renderer` in the list that supports the input media format.
* If you've implemented your own `RenderersFactory`, return a
`LibflacAudioRenderer` instance from `createRenderers`. ExoPlayer will use the
first `Renderer` in the returned array that supports the input media format.
`LibflacAudioRenderer` instance from `createRenderers`. ExoPlayer will use
the first `Renderer` in the returned array that supports the input media
format.
* If you're using `ExoPlayer.Builder`, pass a `LibflacAudioRenderer` in the
array of `Renderer`s. ExoPlayer will use the first `Renderer` in the list that
supports the input media format.
array of `Renderer`s. ExoPlayer will use the first `Renderer` in the list
that supports the input media format.
Note: These instructions assume you're using `DefaultTrackSelector`. If you have
a custom track selector the choice of `Renderer` is up to your implementation,
@ -98,7 +99,7 @@ player, then implement your own logic to use the renderer for a given track.
## Using the module in the demo application
To try out playback using the extension in the [demo application][], see
To try out playback using the module in the [demo application][], see
[enabling extension decoders][].
[demo application]: https://exoplayer.dev/demo-application.html

View File

@ -1,12 +1,12 @@
# ExoPlayer Opus extension
# ExoPlayer Opus module
The Opus extension provides `LibopusAudioRenderer`, which uses libopus (the Opus
The Opus module provides `LibopusAudioRenderer`, which uses libopus (the Opus
decoding library) to decode Opus audio.
## License note
Please note that whilst the code in this repository is licensed under
[Apache 2.0][], using this extension also requires building and including one or
[Apache 2.0][], using this module also requires building and including one or
more external libraries as described below. These are licensed separately.
[Apache 2.0]: https://github.com/google/ExoPlayer/blob/release-v2/LICENSE
@ -17,8 +17,7 @@ To use the module you need to clone this GitHub project and depend on its
modules locally. Instructions for doing this can be found in the
[top level README][].
In addition, it's necessary to build the extension's native components as
follows:
In addition, it's necessary to build the module's native components as follows:
* Set the following environment variables:
@ -60,8 +59,8 @@ ${NDK_PATH}/ndk-build APP_ABI=all -j4
## Build instructions (Windows)
We do not provide support for building this extension on Windows, however it
should be possible to follow the Linux instructions in [Windows PowerShell][].
We do not provide support for building this module on Windows, however it should
be possible to follow the Linux instructions in [Windows PowerShell][].
[Windows PowerShell]: https://docs.microsoft.com/en-us/powershell/scripting/getting-started/getting-started-with-windows-powershell
@ -76,24 +75,26 @@ should be possible to follow the Linux instructions in [Windows PowerShell][].
## Using the module
Once you've followed the instructions above to check out, build and depend on
the extension, the next step is to tell ExoPlayer to use `LibopusAudioRenderer`.
the module, the next step is to tell ExoPlayer to use `LibopusAudioRenderer`.
How you do this depends on which player API you're using:
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you can
enable using the extension by setting the `extensionRendererMode` parameter of
the `DefaultRenderersFactory` constructor to `EXTENSION_RENDERER_MODE_ON`.
This will use `LibopusAudioRenderer` for playback if `MediaCodecAudioRenderer`
doesn't support the input format. Pass `EXTENSION_RENDERER_MODE_PREFER` to
give `LibopusAudioRenderer` priority over `MediaCodecAudioRenderer`.
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you
can enable using the module by setting the `extensionRendererMode` parameter
of the `DefaultRenderersFactory` constructor to
`EXTENSION_RENDERER_MODE_ON`. This will use `LibopusAudioRenderer` for
playback if `MediaCodecAudioRenderer` doesn't support the input format. Pass
`EXTENSION_RENDERER_MODE_PREFER` to give `LibopusAudioRenderer` priority
over `MediaCodecAudioRenderer`.
* If you've subclassed `DefaultRenderersFactory`, add a `LibopusAudioRenderer`
to the output list in `buildAudioRenderers`. ExoPlayer will use the first
`Renderer` in the list that supports the input media format.
* If you've implemented your own `RenderersFactory`, return a
`LibopusAudioRenderer` instance from `createRenderers`. ExoPlayer will use the
first `Renderer` in the returned array that supports the input media format.
`LibopusAudioRenderer` instance from `createRenderers`. ExoPlayer will use
the first `Renderer` in the returned array that supports the input media
format.
* If you're using `ExoPlayer.Builder`, pass a `LibopusAudioRenderer` in the
array of `Renderer`s. ExoPlayer will use the first `Renderer` in the list that
supports the input media format.
array of `Renderer`s. ExoPlayer will use the first `Renderer` in the list
that supports the input media format.
Note: These instructions assume you're using `DefaultTrackSelector`. If you have
a custom track selector the choice of `Renderer` is up to your implementation,
@ -102,7 +103,7 @@ player, then implement your own logic to use the renderer for a given track.
## Using the module in the demo application
To try out playback using the extension in the [demo application][], see
To try out playback using the module in the [demo application][], see
[enabling extension decoders][].
[demo application]: https://exoplayer.dev/demo-application.html

View File

@ -1,12 +1,12 @@
# ExoPlayer VP9 extension
# ExoPlayer VP9 module
The VP9 extension provides `LibvpxVideoRenderer`, which uses libvpx (the VPx
The VP9 module provides `LibvpxVideoRenderer`, which uses libvpx (the VPx
decoding library) to decode VP9 video.
## License note
Please note that whilst the code in this repository is licensed under
[Apache 2.0][], using this extension also requires building and including one or
[Apache 2.0][], using this module also requires building and including one or
more external libraries as described below. These are licensed separately.
[Apache 2.0]: https://github.com/google/ExoPlayer/blob/release-v2/LICENSE
@ -17,8 +17,7 @@ To use the module you need to clone this GitHub project and depend on its
modules locally. Instructions for doing this can be found in the
[top level README][].
In addition, it's necessary to build the extension's native components as
follows:
In addition, it's necessary to build the module's native components as follows:
* Set the following environment variables:
@ -46,7 +45,7 @@ git checkout tags/v1.8.0 -b v1.8.0 && \
LIBVPX_PATH="$(pwd)"
```
* Add a link to the libvpx source code in the vp9 extension `jni` directory and
* Add a link to the libvpx source code in the vp9 module `jni` directory and
run a script that generates necessary configuration files for libvpx:
```
@ -67,8 +66,8 @@ ${NDK_PATH}/ndk-build APP_ABI=all -j4
## Build instructions (Windows)
We do not provide support for building this extension on Windows, however it
should be possible to follow the Linux instructions in [Windows PowerShell][].
We do not provide support for building this module on Windows, however it should
be possible to follow the Linux instructions in [Windows PowerShell][].
[Windows PowerShell]: https://docs.microsoft.com/en-us/powershell/scripting/getting-started/getting-started-with-windows-powershell
@ -89,22 +88,23 @@ Once you've followed the instructions above to check out, build and depend on
the extension, the next step is to tell ExoPlayer to use `LibvpxVideoRenderer`.
How you do this depends on which player API you're using:
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you can
enable using the extension by setting the `extensionRendererMode` parameter of
the `DefaultRenderersFactory` constructor to `EXTENSION_RENDERER_MODE_ON`.
This will use `LibvpxVideoRenderer` for playback if `MediaCodecVideoRenderer`
doesn't support decoding the input VP9 stream. Pass
`EXTENSION_RENDERER_MODE_PREFER` to give `LibvpxVideoRenderer` priority over
`MediaCodecVideoRenderer`.
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you
can enable using the module by setting the `extensionRendererMode` parameter
of the `DefaultRenderersFactory` constructor to
`EXTENSION_RENDERER_MODE_ON`. This will use `LibvpxVideoRenderer` for
playback if `MediaCodecVideoRenderer` doesn't support decoding the input VP9
stream. Pass `EXTENSION_RENDERER_MODE_PREFER` to give `LibvpxVideoRenderer`
priority over `MediaCodecVideoRenderer`.
* If you've subclassed `DefaultRenderersFactory`, add a `LibvpxVideoRenderer`
to the output list in `buildVideoRenderers`. ExoPlayer will use the first
`Renderer` in the list that supports the input media format.
* If you've implemented your own `RenderersFactory`, return a
`LibvpxVideoRenderer` instance from `createRenderers`. ExoPlayer will use the
first `Renderer` in the returned array that supports the input media format.
* If you're using `ExoPlayer.Builder`, pass a `LibvpxVideoRenderer` in the array
of `Renderer`s. ExoPlayer will use the first `Renderer` in the list that
supports the input media format.
`LibvpxVideoRenderer` instance from `createRenderers`. ExoPlayer will use
the first `Renderer` in the returned array that supports the input media
format.
* If you're using `ExoPlayer.Builder`, pass a `LibvpxVideoRenderer` in the
array of `Renderer`s. ExoPlayer will use the first `Renderer` in the list
that supports the input media format.
Note: These instructions assume you're using `DefaultTrackSelector`. If you have
a custom track selector the choice of `Renderer` is up to your implementation,
@ -113,7 +113,7 @@ player, then implement your own logic to use the renderer for a given track.
## Using the module in the demo application
To try out playback using the extension in the [demo application][], see
To try out playback using the module in the [demo application][], see
[enabling extension decoders][].
[demo application]: https://exoplayer.dev/demo-application.html

3
playbacktests/README.md Normal file
View File

@ -0,0 +1,3 @@
# ExoPlayer playback test module
Tests playback using ExoPlayer.

View File

@ -1,10 +1,10 @@
# ExoPlayer Robolectric utils
# Robolectric test utils module
Provides test infrastructure for ExoPlayer Robolectric-based tests.
Provides test infrastructure for Robolectric-based media tests.
## Links
* [Javadoc][]: Classes matching `com.google.android.exoplayer2.robolectric`
* [Javadoc][]: Classes matching `com.google.android.exoplayer2.robolectric.*`
belong to this module.
[Javadoc]: https://exoplayer.dev/doc/reference/index.html

5
testdata/README.md vendored
View File

@ -1,4 +1,3 @@
# ExoPlayer test data
Provides sample data for ExoPlayer unit and instrumentation tests.
# Test data module
Provides sample data for media unit and instrumentation tests.

View File

@ -1,10 +1,10 @@
# ExoPlayer test utils
# Test utils module
Provides utility classes for ExoPlayer unit and instrumentation tests.
Provides utility classes for media unit and instrumentation tests.
## Links
* [Javadoc][]: Classes matching `com.google.android.exoplayer2.testutil` belong to this
* [Javadoc][]: Classes matching `com.google.android.exoplayer2.testutil.*` belong to this
module.
[Javadoc]: https://exoplayer.dev/doc/reference/index.html