mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Final README updates
PiperOrigin-RevId: 402547071
This commit is contained in:
parent
4b3cbfd64f
commit
eeec2b2e77
@ -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.
|
library to decode AV1 videos.
|
||||||
|
|
||||||
## License note
|
## License note
|
||||||
|
|
||||||
Please note that whilst the code in this repository is licensed under
|
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.
|
more external libraries as described below. These are licensed separately.
|
||||||
|
|
||||||
[Apache 2.0]: https://github.com/google/ExoPlayer/blob/release-v2/LICENSE
|
[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][].
|
* [Install CMake][].
|
||||||
|
|
||||||
Having followed these steps, gradle will build the extension automatically when
|
Having followed these steps, gradle will build the module automatically when run
|
||||||
run on the command line or via Android Studio, using [CMake][] and [Ninja][]
|
on the command line or via Android Studio, using [CMake][] and [Ninja][] to
|
||||||
to configure and build libgav1 and the extension's [JNI wrapper library][].
|
configure and build libgav1 and the module's [JNI wrapper library][].
|
||||||
|
|
||||||
[top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
|
[top level README]: https://github.com/google/ExoPlayer/blob/release-v2/README.md
|
||||||
[Install CMake]: https://developer.android.com/studio/projects/install-ndk
|
[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)
|
## Build instructions (Windows)
|
||||||
|
|
||||||
We do not provide support for building this extension on Windows, however it
|
We do not provide support for building this module on Windows, however it should
|
||||||
should be possible to follow the Linux instructions in [Windows PowerShell][].
|
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
|
[Windows PowerShell]: https://docs.microsoft.com/en-us/powershell/scripting/getting-started/getting-started-with-windows-powershell
|
||||||
|
|
||||||
## Using the module
|
## Using the module
|
||||||
|
|
||||||
Once you've followed the instructions above to check out, build and depend on
|
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:
|
How you do this depends on which player API you're using:
|
||||||
|
|
||||||
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you can
|
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you
|
||||||
enable using the extension by setting the `extensionRendererMode` parameter of
|
can enable using the module by setting the `extensionRendererMode` parameter
|
||||||
the `DefaultRenderersFactory` constructor to `EXTENSION_RENDERER_MODE_ON`.
|
of the `DefaultRenderersFactory` constructor to
|
||||||
This will use `Libgav1VideoRenderer` for playback if `MediaCodecVideoRenderer`
|
`EXTENSION_RENDERER_MODE_ON`. This will use `Libgav1VideoRenderer` for
|
||||||
doesn't support decoding the input AV1 stream. Pass
|
playback if `MediaCodecVideoRenderer` doesn't support decoding the input AV1
|
||||||
`EXTENSION_RENDERER_MODE_PREFER` to give `Libgav1VideoRenderer` priority over
|
stream. Pass `EXTENSION_RENDERER_MODE_PREFER` to give `Libgav1VideoRenderer`
|
||||||
`MediaCodecVideoRenderer`.
|
priority over `MediaCodecVideoRenderer`.
|
||||||
* If you've subclassed `DefaultRenderersFactory`, add a `Libvgav1VideoRenderer`
|
* If you've subclassed `DefaultRenderersFactory`, add a
|
||||||
to the output list in `buildVideoRenderers`. ExoPlayer will use the first
|
`Libvgav1VideoRenderer` to the output list in `buildVideoRenderers`.
|
||||||
`Renderer` in the list that supports the input media format.
|
ExoPlayer will use the first `Renderer` in the list that supports the input
|
||||||
* If you've implemented your own `RenderersFactory`, return a
|
media format.
|
||||||
`Libgav1VideoRenderer` instance from `createRenderers`. ExoPlayer will use the
|
* If you've implemented your own `RenderersFactory`, return a
|
||||||
first `Renderer` in the returned array that supports the input media format.
|
`Libgav1VideoRenderer` instance from `createRenderers`. ExoPlayer will use
|
||||||
* If you're using `ExoPlayer.Builder`, pass a `Libgav1VideoRenderer` in the
|
the first `Renderer` in the returned array that supports the input media
|
||||||
array of `Renderer`s. ExoPlayer will use the first `Renderer` in the list that
|
format.
|
||||||
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.
|
||||||
|
|
||||||
Note: These instructions assume you're using `DefaultTrackSelector`. If you have
|
Note: These instructions assume you're using `DefaultTrackSelector`. If you have
|
||||||
a custom track selector the choice of `Renderer` is up to your implementation.
|
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
|
## 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][].
|
[enabling extension decoders][].
|
||||||
|
|
||||||
[demo application]: https://exoplayer.dev/demo-application.html
|
[demo application]: https://exoplayer.dev/demo-application.html
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
# ExoPlayer FFmpeg extension
|
# ExoPlayer FFmpeg module
|
||||||
|
|
||||||
The FFmpeg extension provides `FfmpegAudioRenderer`, which uses FFmpeg for
|
The FFmpeg module provides `FfmpegAudioRenderer`, which uses FFmpeg for decoding
|
||||||
decoding and can render audio encoded in a variety of formats.
|
and can render audio encoded in a variety of formats.
|
||||||
|
|
||||||
## License note
|
## License note
|
||||||
|
|
||||||
Please note that whilst the code in this repository is licensed under
|
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.
|
more external libraries as described below. These are licensed separately.
|
||||||
|
|
||||||
[Apache 2.0]: https://github.com/google/ExoPlayer/blob/release-v2/LICENSE
|
[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
|
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
|
modules locally. Instructions for doing this can be found in the
|
||||||
[top level README][]. The extension is not provided via Google's Maven
|
[top level README][]. The module is not provided via Google's Maven repository
|
||||||
repository (see [#2781][] for more information).
|
(see [#2781][] for more information).
|
||||||
|
|
||||||
In addition, it's necessary to manually build the FFmpeg library, so that gradle
|
In addition, it's necessary to manually build the FFmpeg library, so that gradle
|
||||||
can bundle the FFmpeg binaries in the APK:
|
can bundle the FFmpeg binaries in the APK:
|
||||||
@ -60,7 +60,7 @@ FFMPEG_PATH="$(pwd)"
|
|||||||
ENABLED_DECODERS=(vorbis opus flac)
|
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" && \
|
cd "${FFMPEG_EXT_PATH}/jni" && \
|
||||||
@ -79,32 +79,34 @@ cd "${FFMPEG_EXT_PATH}/jni" && \
|
|||||||
|
|
||||||
## Build instructions (Windows)
|
## Build instructions (Windows)
|
||||||
|
|
||||||
We do not provide support for building this extension on Windows, however it
|
We do not provide support for building this module on Windows, however it should
|
||||||
should be possible to follow the Linux instructions in [Windows PowerShell][].
|
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
|
[Windows PowerShell]: https://docs.microsoft.com/en-us/powershell/scripting/getting-started/getting-started-with-windows-powershell
|
||||||
|
|
||||||
## Using the module
|
## Using the module
|
||||||
|
|
||||||
Once you've followed the instructions above to check out, build and depend on
|
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`.
|
the module, the next step is to tell ExoPlayer to use `FfmpegAudioRenderer`. How
|
||||||
How you do this depends on which player API you're using:
|
you do this depends on which player API you're using:
|
||||||
|
|
||||||
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you can
|
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you
|
||||||
enable using the extension by setting the `extensionRendererMode` parameter of
|
can enable using the module by setting the `extensionRendererMode` parameter
|
||||||
the `DefaultRenderersFactory` constructor to `EXTENSION_RENDERER_MODE_ON`.
|
of the `DefaultRenderersFactory` constructor to
|
||||||
This will use `FfmpegAudioRenderer` for playback if `MediaCodecAudioRenderer`
|
`EXTENSION_RENDERER_MODE_ON`. This will use `FfmpegAudioRenderer` for
|
||||||
doesn't support the input format. Pass `EXTENSION_RENDERER_MODE_PREFER` to
|
playback if `MediaCodecAudioRenderer` doesn't support the input format. Pass
|
||||||
give `FfmpegAudioRenderer` priority over `MediaCodecAudioRenderer`.
|
`EXTENSION_RENDERER_MODE_PREFER` to give `FfmpegAudioRenderer` priority over
|
||||||
* If you've subclassed `DefaultRenderersFactory`, add an `FfmpegAudioRenderer`
|
`MediaCodecAudioRenderer`.
|
||||||
to the output list in `buildAudioRenderers`. ExoPlayer will use the first
|
* If you've subclassed `DefaultRenderersFactory`, add an `FfmpegAudioRenderer`
|
||||||
`Renderer` in the list that supports the input media format.
|
to the output list in `buildAudioRenderers`. ExoPlayer will use the first
|
||||||
* If you've implemented your own `RenderersFactory`, return an
|
`Renderer` in the list that supports the input media format.
|
||||||
`FfmpegAudioRenderer` instance from `createRenderers`. ExoPlayer will use the
|
* If you've implemented your own `RenderersFactory`, return an
|
||||||
first `Renderer` in the returned array that supports the input media format.
|
`FfmpegAudioRenderer` instance from `createRenderers`. ExoPlayer will use
|
||||||
* If you're using `ExoPlayer.Builder`, pass an `FfmpegAudioRenderer` in the
|
the first `Renderer` in the returned array that supports the input media
|
||||||
array of `Renderer`s. ExoPlayer will use the first `Renderer` in the list that
|
format.
|
||||||
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.
|
||||||
|
|
||||||
Note: These instructions assume you're using `DefaultTrackSelector`. If you have
|
Note: These instructions assume you're using `DefaultTrackSelector`. If you have
|
||||||
a custom track selector the choice of `Renderer` is up to your implementation,
|
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
|
## 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][].
|
[enabling extension decoders][].
|
||||||
|
|
||||||
[demo application]: https://exoplayer.dev/demo-application.html
|
[demo application]: https://exoplayer.dev/demo-application.html
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
# ExoPlayer Flac extension
|
# ExoPlayer Flac module
|
||||||
|
|
||||||
The Flac extension provides `FlacExtractor` and `LibflacAudioRenderer`, which
|
The Flac module provides `FlacExtractor` and `LibflacAudioRenderer`, which use
|
||||||
use libFLAC (the Flac decoding library) to extract and decode FLAC audio.
|
libFLAC (the Flac decoding library) to extract and decode FLAC audio.
|
||||||
|
|
||||||
## License note
|
## License note
|
||||||
|
|
||||||
Please note that whilst the code in this repository is licensed under
|
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.
|
more external libraries as described below. These are licensed separately.
|
||||||
|
|
||||||
[Apache 2.0]: https://github.com/google/ExoPlayer/blob/release-v2/LICENSE
|
[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
|
modules locally. Instructions for doing this can be found in the
|
||||||
[top level README][].
|
[top level README][].
|
||||||
|
|
||||||
In addition, it's necessary to build the extension's native components as
|
In addition, it's necessary to build the module's native components as follows:
|
||||||
follows:
|
|
||||||
|
|
||||||
* Set the following environment variables:
|
* Set the following environment variables:
|
||||||
|
|
||||||
@ -55,15 +54,15 @@ ${NDK_PATH}/ndk-build APP_ABI=all -j4
|
|||||||
|
|
||||||
## Build instructions (Windows)
|
## Build instructions (Windows)
|
||||||
|
|
||||||
We do not provide support for building this extension on Windows, however it
|
We do not provide support for building this module on Windows, however it should
|
||||||
should be possible to follow the Linux instructions in [Windows PowerShell][].
|
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
|
[Windows PowerShell]: https://docs.microsoft.com/en-us/powershell/scripting/getting-started/getting-started-with-windows-powershell
|
||||||
|
|
||||||
## Using the module
|
## Using the module
|
||||||
|
|
||||||
Once you've followed the instructions above to check out, build and depend on
|
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.
|
renderer.
|
||||||
|
|
||||||
### Using `FlacExtractor`
|
### Using `FlacExtractor`
|
||||||
@ -75,21 +74,23 @@ renderer.
|
|||||||
|
|
||||||
### Using `LibflacAudioRenderer`
|
### Using `LibflacAudioRenderer`
|
||||||
|
|
||||||
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you can
|
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you
|
||||||
enable using the extension by setting the `extensionRendererMode` parameter of
|
can enable using the module by setting the `extensionRendererMode` parameter
|
||||||
the `DefaultRenderersFactory` constructor to `EXTENSION_RENDERER_MODE_ON`.
|
of the `DefaultRenderersFactory` constructor to
|
||||||
This will use `LibflacAudioRenderer` for playback if `MediaCodecAudioRenderer`
|
`EXTENSION_RENDERER_MODE_ON`. This will use `LibflacAudioRenderer` for
|
||||||
doesn't support the input format. Pass `EXTENSION_RENDERER_MODE_PREFER` to
|
playback if `MediaCodecAudioRenderer` doesn't support the input format. Pass
|
||||||
give `LibflacAudioRenderer` priority over `MediaCodecAudioRenderer`.
|
`EXTENSION_RENDERER_MODE_PREFER` to give `LibflacAudioRenderer` priority
|
||||||
* If you've subclassed `DefaultRenderersFactory`, add a `LibflacAudioRenderer`
|
over `MediaCodecAudioRenderer`.
|
||||||
to the output list in `buildAudioRenderers`. ExoPlayer will use the first
|
* If you've subclassed `DefaultRenderersFactory`, add a `LibflacAudioRenderer`
|
||||||
`Renderer` in the list that supports the input media format.
|
to the output list in `buildAudioRenderers`. ExoPlayer will use the first
|
||||||
* If you've implemented your own `RenderersFactory`, return a
|
`Renderer` in the list that supports the input media format.
|
||||||
`LibflacAudioRenderer` instance from `createRenderers`. ExoPlayer will use the
|
* If you've implemented your own `RenderersFactory`, return a
|
||||||
first `Renderer` in the returned array that supports the input media format.
|
`LibflacAudioRenderer` instance from `createRenderers`. ExoPlayer will use
|
||||||
* If you're using `ExoPlayer.Builder`, pass a `LibflacAudioRenderer` in the
|
the first `Renderer` in the returned array that supports the input media
|
||||||
array of `Renderer`s. ExoPlayer will use the first `Renderer` in the list that
|
format.
|
||||||
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.
|
||||||
|
|
||||||
Note: These instructions assume you're using `DefaultTrackSelector`. If you have
|
Note: These instructions assume you're using `DefaultTrackSelector`. If you have
|
||||||
a custom track selector the choice of `Renderer` is up to your implementation,
|
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
|
## 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][].
|
[enabling extension decoders][].
|
||||||
|
|
||||||
[demo application]: https://exoplayer.dev/demo-application.html
|
[demo application]: https://exoplayer.dev/demo-application.html
|
||||||
|
@ -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.
|
decoding library) to decode Opus audio.
|
||||||
|
|
||||||
## License note
|
## License note
|
||||||
|
|
||||||
Please note that whilst the code in this repository is licensed under
|
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.
|
more external libraries as described below. These are licensed separately.
|
||||||
|
|
||||||
[Apache 2.0]: https://github.com/google/ExoPlayer/blob/release-v2/LICENSE
|
[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
|
modules locally. Instructions for doing this can be found in the
|
||||||
[top level README][].
|
[top level README][].
|
||||||
|
|
||||||
In addition, it's necessary to build the extension's native components as
|
In addition, it's necessary to build the module's native components as follows:
|
||||||
follows:
|
|
||||||
|
|
||||||
* Set the following environment variables:
|
* Set the following environment variables:
|
||||||
|
|
||||||
@ -60,8 +59,8 @@ ${NDK_PATH}/ndk-build APP_ABI=all -j4
|
|||||||
|
|
||||||
## Build instructions (Windows)
|
## Build instructions (Windows)
|
||||||
|
|
||||||
We do not provide support for building this extension on Windows, however it
|
We do not provide support for building this module on Windows, however it should
|
||||||
should be possible to follow the Linux instructions in [Windows PowerShell][].
|
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
|
[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
|
## Using the module
|
||||||
|
|
||||||
Once you've followed the instructions above to check out, build and depend on
|
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:
|
How you do this depends on which player API you're using:
|
||||||
|
|
||||||
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you can
|
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you
|
||||||
enable using the extension by setting the `extensionRendererMode` parameter of
|
can enable using the module by setting the `extensionRendererMode` parameter
|
||||||
the `DefaultRenderersFactory` constructor to `EXTENSION_RENDERER_MODE_ON`.
|
of the `DefaultRenderersFactory` constructor to
|
||||||
This will use `LibopusAudioRenderer` for playback if `MediaCodecAudioRenderer`
|
`EXTENSION_RENDERER_MODE_ON`. This will use `LibopusAudioRenderer` for
|
||||||
doesn't support the input format. Pass `EXTENSION_RENDERER_MODE_PREFER` to
|
playback if `MediaCodecAudioRenderer` doesn't support the input format. Pass
|
||||||
give `LibopusAudioRenderer` priority over `MediaCodecAudioRenderer`.
|
`EXTENSION_RENDERER_MODE_PREFER` to give `LibopusAudioRenderer` priority
|
||||||
* If you've subclassed `DefaultRenderersFactory`, add a `LibopusAudioRenderer`
|
over `MediaCodecAudioRenderer`.
|
||||||
to the output list in `buildAudioRenderers`. ExoPlayer will use the first
|
* If you've subclassed `DefaultRenderersFactory`, add a `LibopusAudioRenderer`
|
||||||
`Renderer` in the list that supports the input media format.
|
to the output list in `buildAudioRenderers`. ExoPlayer will use the first
|
||||||
* If you've implemented your own `RenderersFactory`, return a
|
`Renderer` in the list that supports the input media format.
|
||||||
`LibopusAudioRenderer` instance from `createRenderers`. ExoPlayer will use the
|
* If you've implemented your own `RenderersFactory`, return a
|
||||||
first `Renderer` in the returned array that supports the input media format.
|
`LibopusAudioRenderer` instance from `createRenderers`. ExoPlayer will use
|
||||||
* If you're using `ExoPlayer.Builder`, pass a `LibopusAudioRenderer` in the
|
the first `Renderer` in the returned array that supports the input media
|
||||||
array of `Renderer`s. ExoPlayer will use the first `Renderer` in the list that
|
format.
|
||||||
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.
|
||||||
|
|
||||||
Note: These instructions assume you're using `DefaultTrackSelector`. If you have
|
Note: These instructions assume you're using `DefaultTrackSelector`. If you have
|
||||||
a custom track selector the choice of `Renderer` is up to your implementation,
|
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
|
## 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][].
|
[enabling extension decoders][].
|
||||||
|
|
||||||
[demo application]: https://exoplayer.dev/demo-application.html
|
[demo application]: https://exoplayer.dev/demo-application.html
|
||||||
|
@ -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.
|
decoding library) to decode VP9 video.
|
||||||
|
|
||||||
## License note
|
## License note
|
||||||
|
|
||||||
Please note that whilst the code in this repository is licensed under
|
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.
|
more external libraries as described below. These are licensed separately.
|
||||||
|
|
||||||
[Apache 2.0]: https://github.com/google/ExoPlayer/blob/release-v2/LICENSE
|
[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
|
modules locally. Instructions for doing this can be found in the
|
||||||
[top level README][].
|
[top level README][].
|
||||||
|
|
||||||
In addition, it's necessary to build the extension's native components as
|
In addition, it's necessary to build the module's native components as follows:
|
||||||
follows:
|
|
||||||
|
|
||||||
* Set the following environment variables:
|
* Set the following environment variables:
|
||||||
|
|
||||||
@ -46,8 +45,8 @@ git checkout tags/v1.8.0 -b v1.8.0 && \
|
|||||||
LIBVPX_PATH="$(pwd)"
|
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:
|
run a script that generates necessary configuration files for libvpx:
|
||||||
|
|
||||||
```
|
```
|
||||||
cd ${VP9_EXT_PATH}/jni && \
|
cd ${VP9_EXT_PATH}/jni && \
|
||||||
@ -67,8 +66,8 @@ ${NDK_PATH}/ndk-build APP_ABI=all -j4
|
|||||||
|
|
||||||
## Build instructions (Windows)
|
## Build instructions (Windows)
|
||||||
|
|
||||||
We do not provide support for building this extension on Windows, however it
|
We do not provide support for building this module on Windows, however it should
|
||||||
should be possible to follow the Linux instructions in [Windows PowerShell][].
|
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
|
[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`.
|
the extension, the next step is to tell ExoPlayer to use `LibvpxVideoRenderer`.
|
||||||
How you do this depends on which player API you're using:
|
How you do this depends on which player API you're using:
|
||||||
|
|
||||||
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you can
|
* If you're passing a `DefaultRenderersFactory` to `ExoPlayer.Builder`, you
|
||||||
enable using the extension by setting the `extensionRendererMode` parameter of
|
can enable using the module by setting the `extensionRendererMode` parameter
|
||||||
the `DefaultRenderersFactory` constructor to `EXTENSION_RENDERER_MODE_ON`.
|
of the `DefaultRenderersFactory` constructor to
|
||||||
This will use `LibvpxVideoRenderer` for playback if `MediaCodecVideoRenderer`
|
`EXTENSION_RENDERER_MODE_ON`. This will use `LibvpxVideoRenderer` for
|
||||||
doesn't support decoding the input VP9 stream. Pass
|
playback if `MediaCodecVideoRenderer` doesn't support decoding the input VP9
|
||||||
`EXTENSION_RENDERER_MODE_PREFER` to give `LibvpxVideoRenderer` priority over
|
stream. Pass `EXTENSION_RENDERER_MODE_PREFER` to give `LibvpxVideoRenderer`
|
||||||
`MediaCodecVideoRenderer`.
|
priority over `MediaCodecVideoRenderer`.
|
||||||
* If you've subclassed `DefaultRenderersFactory`, add a `LibvpxVideoRenderer`
|
* If you've subclassed `DefaultRenderersFactory`, add a `LibvpxVideoRenderer`
|
||||||
to the output list in `buildVideoRenderers`. ExoPlayer will use the first
|
to the output list in `buildVideoRenderers`. ExoPlayer will use the first
|
||||||
`Renderer` in the list that supports the input media format.
|
`Renderer` in the list that supports the input media format.
|
||||||
* If you've implemented your own `RenderersFactory`, return a
|
* If you've implemented your own `RenderersFactory`, return a
|
||||||
`LibvpxVideoRenderer` instance from `createRenderers`. ExoPlayer will use the
|
`LibvpxVideoRenderer` instance from `createRenderers`. ExoPlayer will use
|
||||||
first `Renderer` in the returned array that supports the input media format.
|
the first `Renderer` in the returned array that supports the input media
|
||||||
* If you're using `ExoPlayer.Builder`, pass a `LibvpxVideoRenderer` in the array
|
format.
|
||||||
of `Renderer`s. ExoPlayer will use the first `Renderer` in the list that
|
* If you're using `ExoPlayer.Builder`, pass a `LibvpxVideoRenderer` in the
|
||||||
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
|
Note: These instructions assume you're using `DefaultTrackSelector`. If you have
|
||||||
a custom track selector the choice of `Renderer` is up to your implementation,
|
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
|
## 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][].
|
[enabling extension decoders][].
|
||||||
|
|
||||||
[demo application]: https://exoplayer.dev/demo-application.html
|
[demo application]: https://exoplayer.dev/demo-application.html
|
||||||
|
3
playbacktests/README.md
Normal file
3
playbacktests/README.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# ExoPlayer playback test module
|
||||||
|
|
||||||
|
Tests playback using ExoPlayer.
|
@ -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
|
## Links
|
||||||
|
|
||||||
* [Javadoc][]: Classes matching `com.google.android.exoplayer2.robolectric`
|
* [Javadoc][]: Classes matching `com.google.android.exoplayer2.robolectric.*`
|
||||||
belong to this module.
|
belong to this module.
|
||||||
|
|
||||||
[Javadoc]: https://exoplayer.dev/doc/reference/index.html
|
[Javadoc]: https://exoplayer.dev/doc/reference/index.html
|
||||||
|
5
testdata/README.md
vendored
5
testdata/README.md
vendored
@ -1,4 +1,3 @@
|
|||||||
# ExoPlayer test data
|
# Test data module
|
||||||
|
|
||||||
Provides sample data for ExoPlayer unit and instrumentation tests.
|
|
||||||
|
|
||||||
|
Provides sample data for media unit and instrumentation tests.
|
||||||
|
@ -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
|
## Links
|
||||||
|
|
||||||
* [Javadoc][]: Classes matching `com.google.android.exoplayer2.testutil` belong to this
|
* [Javadoc][]: Classes matching `com.google.android.exoplayer2.testutil.*` belong to this
|
||||||
module.
|
module.
|
||||||
|
|
||||||
[Javadoc]: https://exoplayer.dev/doc/reference/index.html
|
[Javadoc]: https://exoplayer.dev/doc/reference/index.html
|
||||||
|
Loading…
x
Reference in New Issue
Block a user