Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
eeec2b2e
authored
Oct 12, 2021
by
olly
Committed by
Oliver Woodman
Oct 12, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Final README updates
PiperOrigin-RevId: 402547071
parent
4b3cbfd6
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
146 additions
and
138 deletions
extensions/av1/README.md
extensions/ffmpeg/README.md
extensions/flac/README.md
extensions/opus/README.md
extensions/vp9/README.md
playbacktests/README.md
robolectricutils/README.md
testdata/README.md
testutils/README.md
extensions/av1/README.md
View file @
eeec2b2e
# 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
...
@@ -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 whe
n
Having followed these steps, gradle will build the
module automatically when ru
n
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][].
...
@@ -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.
...
@@ -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
...
...
extensions/ffmpeg/README.md
View file @
eeec2b2e
# 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.
...
@@ -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)"
...
@@ -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" && \
...
@@ -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.
...
@@ -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
...
...
extensions/flac/README.md
View file @
eeec2b2e
# 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
...
@@ -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
...
@@ -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.
...
@@ -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.
...
@@ -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
...
...
extensions/opus/README.md
View file @
eeec2b2e
# 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
...
@@ -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
...
@@ -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][].
...
@@ -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.
...
@@ -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
...
...
extensions/vp9/README.md
View file @
eeec2b2e
# 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
...
@@ -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 && \
...
@@ -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
...
@@ -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
...
@@ -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.
...
@@ -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
...
...
playbacktests/README.md
0 → 100644
View file @
eeec2b2e
# ExoPlayer playback test module
Tests playback using ExoPlayer.
robolectricutils/README.md
View file @
eeec2b2e
#
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
testdata/README.md
View file @
eeec2b2e
# ExoPlayer test data
# Test data module
Provides sample data for ExoPlayer unit and instrumentation tests.
Provides sample data for media unit and instrumentation tests.
testutils/README.md
View file @
eeec2b2e
#
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment