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
db84773c
authored
Oct 13, 2021
by
olly
Committed by
Oliver Woodman
Oct 13, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Further README tweaks
PiperOrigin-RevId: 402811825
parent
0dc25671
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
46 deletions
extensions/av1/README.md
extensions/ffmpeg/README.md
extensions/ffmpeg/src/main/jni/build_ffmpeg.sh
extensions/flac/README.md
extensions/opus/README.md
extensions/vp9/README.md
extensions/av1/README.md
View file @
db84773c
...
@@ -23,29 +23,28 @@ dependencies as follows:
...
@@ -23,29 +23,28 @@ dependencies as follows:
*
Set the following environment variables:
*
Set the following environment variables:
```
```
cd "<path to exoplayer checkout>"
cd "<path to project checkout>"
EXOPLAYER_ROOT="$(pwd)"
AV1_MODULE_PATH="$(pwd)/extensions/av1/src/main"
AV1_EXT_PATH="${EXOPLAYER_ROOT}/extensions/av1/src/main"
```
```
*
Fetch cpu_features library:
*
Fetch cpu_features library:
```
```
cd "${AV1_
EXT
_PATH}/jni" && \
cd "${AV1_
MODULE
_PATH}/jni" && \
git clone https://github.com/google/cpu_features
git clone https://github.com/google/cpu_features
```
```
*
Fetch libgav1:
*
Fetch libgav1:
```
```
cd "${AV1_
EXT
_PATH}/jni" && \
cd "${AV1_
MODULE
_PATH}/jni" && \
git clone https://chromium.googlesource.com/codecs/libgav1
git clone https://chromium.googlesource.com/codecs/libgav1
```
```
*
Fetch Abseil:
*
Fetch Abseil:
```
```
cd "${AV1_
EXT
_PATH}/jni/libgav1" && \
cd "${AV1_
MODULE
_PATH}/jni/libgav1" && \
git clone https://github.com/abseil/abseil-cpp.git third_party/abseil-cpp
git clone https://github.com/abseil/abseil-cpp.git third_party/abseil-cpp
```
```
...
@@ -113,19 +112,22 @@ gets from the libgav1 decoder:
...
@@ -113,19 +112,22 @@ gets from the libgav1 decoder:
*
GL rendering using GL shader for color space conversion
*
GL rendering using GL shader for color space conversion
* If you are using `
SimpleExoPlayer` with `PlayerView`, enable this option
* If you are using `
ExoPlayer` with `PlayerView` or `StyledPlayerView`,
by setting `surface_type` of `PlayerView`
to be
enable this option by setting `surface_type` of view
to be
`video_decoder_gl_surface_view`.
`video_decoder_gl_surface_view`.
* Otherwise, enable this option by sending `Libgav1VideoRenderer` a
* Otherwise, enable this option by sending `Libgav1VideoRenderer` a
message of type `Renderer.MSG_SET_VIDEO_
DECODER_OUTPUT_BUFFER_RENDERER
`
message of type `Renderer.MSG_SET_VIDEO_
OUTPUT
`
with an instance of `VideoDecoderOutputBufferRenderer` as its object.
with an instance of `VideoDecoderOutputBufferRenderer` as its object.
`VideoDecoderGLSurfaceView` is the concrete
`VideoDecoderOutputBufferRenderer` implementation used by
`(Styled)PlayerView`.
*
Native rendering using
`ANativeWindow`
*
Native rendering using
`ANativeWindow`
* If you are using `
SimpleExoPlayer` with `PlayerView`, this option is
* If you are using `
ExoPlayer` with `PlayerView` or `StyledPlayerView`,
enabled by default.
this option is
enabled by default.
* Otherwise, enable this option by sending `Libgav1VideoRenderer` a
* Otherwise, enable this option by sending `Libgav1VideoRenderer` a
message of type `Renderer.MSG_SET_
SURFACE
` with an instance of
message of type `Renderer.MSG_SET_
VIDEO_OUTPUT
` with an instance of
`SurfaceView` as its object.
`SurfaceView` as its object.
Note: Although the default option uses
`ANativeWindow`
, based on our testing the
Note: Although the default option uses
`ANativeWindow`
, based on our testing the
...
...
extensions/ffmpeg/README.md
View file @
db84773c
...
@@ -24,9 +24,8 @@ can bundle the FFmpeg binaries in the APK:
...
@@ -24,9 +24,8 @@ can bundle the FFmpeg binaries in the APK:
*
Set the following shell variable:
*
Set the following shell variable:
```
```
cd "<path to exoplayer checkout>"
cd "<path to project checkout>"
EXOPLAYER_ROOT="$(pwd)"
FFMPEG_MODULE_PATH="$(pwd)/extensions/ffmpeg/src/main"
FFMPEG_EXT_PATH="${EXOPLAYER_ROOT}/extensions/ffmpeg/src/main"
```
```
*
Download the
[
Android NDK
][]
and set its location in a shell variable.
*
Download the
[
Android NDK
][]
and set its location in a shell variable.
...
@@ -63,7 +62,7 @@ ENABLED_DECODERS=(vorbis opus flac)
...
@@ -63,7 +62,7 @@ ENABLED_DECODERS=(vorbis opus flac)
*
Add a link to the FFmpeg source code in the FFmpeg module
`jni`
directory.
*
Add a link to the FFmpeg source code in the FFmpeg module
`jni`
directory.
```
```
cd "${FFMPEG_
EXT
_PATH}/jni" && \
cd "${FFMPEG_
MODULE
_PATH}/jni" && \
ln -s "$FFMPEG_PATH" ffmpeg
ln -s "$FFMPEG_PATH" ffmpeg
```
```
...
@@ -72,9 +71,9 @@ ln -s "$FFMPEG_PATH" ffmpeg
...
@@ -72,9 +71,9 @@ ln -s "$FFMPEG_PATH" ffmpeg
different architectures:
different architectures:
```
```
cd "${FFMPEG_
EXT
_PATH}/jni" && \
cd "${FFMPEG_
MODULE
_PATH}/jni" && \
./build_ffmpeg.sh \
./build_ffmpeg.sh \
"${FFMPEG_
EXT
_PATH}" "${NDK_PATH}" "${HOST_PLATFORM}" "${ENABLED_DECODERS[@]}"
"${FFMPEG_
MODULE
_PATH}" "${NDK_PATH}" "${HOST_PLATFORM}" "${ENABLED_DECODERS[@]}"
```
```
## Build instructions (Windows)
## Build instructions (Windows)
...
...
extensions/ffmpeg/src/main/jni/build_ffmpeg.sh
View file @
db84773c
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
# limitations under the License.
# limitations under the License.
#
#
FFMPEG_
EXT
_PATH
=
$1
FFMPEG_
MODULE
_PATH
=
$1
NDK_PATH
=
$2
NDK_PATH
=
$2
HOST_PLATFORM
=
$3
HOST_PLATFORM
=
$3
ENABLED_DECODERS
=(
"
${
@
:4
}
"
)
ENABLED_DECODERS
=(
"
${
@
:4
}
"
)
...
@@ -43,7 +43,7 @@ for decoder in "${ENABLED_DECODERS[@]}"
...
@@ -43,7 +43,7 @@ for decoder in "${ENABLED_DECODERS[@]}"
do
do
COMMON_OPTIONS
=
"
${
COMMON_OPTIONS
}
--enable-decoder=
${
decoder
}
"
COMMON_OPTIONS
=
"
${
COMMON_OPTIONS
}
--enable-decoder=
${
decoder
}
"
done
done
cd
"
${
FFMPEG_
EXT
_PATH
}
/jni/ffmpeg"
cd
"
${
FFMPEG_
MODULE
_PATH
}
/jni/ffmpeg"
./configure
\
./configure
\
--libdir
=
android-libs/armeabi-v7a
\
--libdir
=
android-libs/armeabi-v7a
\
--arch
=
arm
\
--arch
=
arm
\
...
...
extensions/flac/README.md
View file @
db84773c
...
@@ -22,9 +22,8 @@ In addition, it's necessary to build the module's native components as follows:
...
@@ -22,9 +22,8 @@ In addition, it's necessary to build the module's native components as follows:
*
Set the following environment variables:
*
Set the following environment variables:
```
```
cd "<path to exoplayer checkout>"
cd "<path to project checkout>"
EXOPLAYER_ROOT="$(pwd)"
FLAC_MODULE_PATH="$(pwd)/extensions/flac/src/main"
FLAC_EXT_PATH="${EXOPLAYER_ROOT}/extensions/flac/src/main"
```
```
*
Download the
[
Android NDK
][]
and set its location in an environment variable.
*
Download the
[
Android NDK
][]
and set its location in an environment variable.
...
@@ -34,10 +33,10 @@ FLAC_EXT_PATH="${EXOPLAYER_ROOT}/extensions/flac/src/main"
...
@@ -34,10 +33,10 @@ FLAC_EXT_PATH="${EXOPLAYER_ROOT}/extensions/flac/src/main"
NDK_PATH="<path to Android NDK>"
NDK_PATH="<path to Android NDK>"
```
```
*
Download and extract flac-1.3.2 as "${FLAC_
EXT
_PATH}/jni/flac" folder:
*
Download and extract flac-1.3.2 as "${FLAC_
MODULE
_PATH}/jni/flac" folder:
```
```
cd "${FLAC_
EXT
_PATH}/jni" && \
cd "${FLAC_
MODULE
_PATH}/jni" && \
curl https://ftp.osuosl.org/pub/xiph/releases/flac/flac-1.3.2.tar.xz | tar xJ && \
curl https://ftp.osuosl.org/pub/xiph/releases/flac/flac-1.3.2.tar.xz | tar xJ && \
mv flac-1.3.2 flac
mv flac-1.3.2 flac
```
```
...
@@ -45,7 +44,7 @@ mv flac-1.3.2 flac
...
@@ -45,7 +44,7 @@ mv flac-1.3.2 flac
*
Build the JNI native libraries from the command line:
*
Build the JNI native libraries from the command line:
```
```
cd "${FLAC_
EXT
_PATH}"/jni && \
cd "${FLAC_
MODULE
_PATH}"/jni && \
${NDK_PATH}/ndk-build APP_ABI=all -j4
${NDK_PATH}/ndk-build APP_ABI=all -j4
```
```
...
...
extensions/opus/README.md
View file @
db84773c
...
@@ -22,9 +22,8 @@ In addition, it's necessary to build the module's native components as follows:
...
@@ -22,9 +22,8 @@ In addition, it's necessary to build the module's native components as follows:
*
Set the following environment variables:
*
Set the following environment variables:
```
```
cd "<path to exoplayer checkout>"
cd "<path to project checkout>"
EXOPLAYER_ROOT="$(pwd)"
OPUS_MODULE_PATH="$(pwd)/extensions/opus/src/main"
OPUS_EXT_PATH="${EXOPLAYER_ROOT}/extensions/opus/src/main"
```
```
*
Download the
[
Android NDK
][]
and set its location in an environment variable.
*
Download the
[
Android NDK
][]
and set its location in an environment variable.
...
@@ -37,20 +36,20 @@ NDK_PATH="<path to Android NDK>"
...
@@ -37,20 +36,20 @@ NDK_PATH="<path to Android NDK>"
*
Fetch libopus:
*
Fetch libopus:
```
```
cd "${OPUS_
EXT
_PATH}/jni" && \
cd "${OPUS_
MODULE
_PATH}/jni" && \
git clone https://gitlab.xiph.org/xiph/opus.git libopus
git clone https://gitlab.xiph.org/xiph/opus.git libopus
```
```
*
Run the script to convert arm assembly to NDK compatible format:
*
Run the script to convert arm assembly to NDK compatible format:
```
```
cd ${OPUS_
EXT
_PATH}/jni && ./convert_android_asm.sh
cd ${OPUS_
MODULE
_PATH}/jni && ./convert_android_asm.sh
```
```
*
Build the JNI native libraries from the command line:
*
Build the JNI native libraries from the command line:
```
```
cd "${OPUS_
EXT
_PATH}"/jni && \
cd "${OPUS_
MODULE
_PATH}"/jni && \
${NDK_PATH}/ndk-build APP_ABI=all -j4
${NDK_PATH}/ndk-build APP_ABI=all -j4
```
```
...
@@ -70,7 +69,7 @@ be possible to follow the Linux instructions in [Windows PowerShell][].
...
@@ -70,7 +69,7 @@ be possible to follow the Linux instructions in [Windows PowerShell][].
*
Arm assembly should be converted by running
`convert_android_asm.sh`
*
Arm assembly should be converted by running
`convert_android_asm.sh`
*
Clean and re-build the project.
*
Clean and re-build the project.
*
If you want to use your own version of libopus, place it in
*
If you want to use your own version of libopus, place it in
`${OPUS_
EXT
_PATH}/jni/libopus`
.
`${OPUS_
MODULE
_PATH}/jni/libopus`
.
## Using the module
## Using the module
...
...
extensions/vp9/README.md
View file @
db84773c
...
@@ -22,9 +22,8 @@ In addition, it's necessary to build the module's native components as follows:
...
@@ -22,9 +22,8 @@ In addition, it's necessary to build the module's native components as follows:
*
Set the following environment variables:
*
Set the following environment variables:
```
```
cd "<path to exoplayer checkout>"
cd "<path to project checkout>"
EXOPLAYER_ROOT="$(pwd)"
VP9_MODULE_PATH="$(pwd)/extensions/vp9/src/main"
VP9_EXT_PATH="${EXOPLAYER_ROOT}/extensions/vp9/src/main"
```
```
*
Download the
[
Android NDK
][]
and set its location in an environment variable.
*
Download the
[
Android NDK
][]
and set its location in an environment variable.
...
@@ -49,7 +48,7 @@ LIBVPX_PATH="$(pwd)"
...
@@ -49,7 +48,7 @@ LIBVPX_PATH="$(pwd)"
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_
MODULE
_PATH}/jni && \
ln -s "$LIBVPX_PATH" libvpx && \
ln -s "$LIBVPX_PATH" libvpx && \
./generate_libvpx_android_configs.sh
./generate_libvpx_android_configs.sh
```
```
...
@@ -57,7 +56,7 @@ ln -s "$LIBVPX_PATH" libvpx && \
...
@@ -57,7 +56,7 @@ ln -s "$LIBVPX_PATH" libvpx && \
*
Build the JNI native libraries from the command line:
*
Build the JNI native libraries from the command line:
```
```
cd "${VP9_
EXT
_PATH}"/jni && \
cd "${VP9_
MODULE
_PATH}"/jni && \
${NDK_PATH}/ndk-build APP_ABI=all -j4
${NDK_PATH}/ndk-build APP_ABI=all -j4
```
```
...
@@ -78,7 +77,7 @@ be possible to follow the Linux instructions in [Windows PowerShell][].
...
@@ -78,7 +77,7 @@ be possible to follow the Linux instructions in [Windows PowerShell][].
`generate_libvpx_android_configs.sh`
`generate_libvpx_android_configs.sh`
*
Clean and re-build the project.
*
Clean and re-build the project.
*
If you want to use your own version of libvpx, point to it with the
*
If you want to use your own version of libvpx, point to it with the
`${VP9_
EXT
_PATH}/jni/libvpx`
symlink. Please note that
`${VP9_
MODULE
_PATH}/jni/libvpx`
symlink. Please note that
`generate_libvpx_android_configs.sh`
and the makefiles may need to be modified
`generate_libvpx_android_configs.sh`
and the makefiles may need to be modified
to work with arbitrary versions of libvpx.
to work with arbitrary versions of libvpx.
...
@@ -126,20 +125,23 @@ gets from the libvpx decoder:
...
@@ -126,20 +125,23 @@ gets from the libvpx decoder:
*
GL rendering using GL shader for color space conversion
*
GL rendering using GL shader for color space conversion
* If you are using `
SimpleExoPlayer` with `PlayerView`, enable this option
* If you are using `
ExoPlayer` with `PlayerView` or `StyledPlayerView`,
by setting `surface_type` of `PlayerView`
to be
enable this option by setting `surface_type` of view
to be
`video_decoder_gl_surface_view`.
`video_decoder_gl_surface_view`.
* Otherwise, enable this option by sending `LibvpxVideoRenderer` a message
* Otherwise, enable this option by sending `LibvpxVideoRenderer` a message
of type `Renderer.MSG_SET_VIDEO_
DECODER_OUTPUT_BUFFER_RENDERER
` with an
of type `Renderer.MSG_SET_VIDEO_
OUTPUT
` with an
instance of `VideoDecoderOutputBufferRenderer` as its object.
instance of `VideoDecoderOutputBufferRenderer` as its object.
`VideoDecoderGLSurfaceView` is the concrete
`VideoDecoderOutputBufferRenderer` implementation used by
`(Styled)PlayerView`.
*
Native rendering using
`ANativeWindow`
*
Native rendering using
`ANativeWindow`
* If you are using `
SimpleExoPlayer` with `PlayerView`, this option is
* If you are using `
ExoPlayer` with `PlayerView` or `StyledPlayerView`,
enabled by default.
this option is
enabled by default.
* Otherwise, enable this option by sending `LibvpxVideoRenderer` a message
* Otherwise, enable this option by sending `LibvpxVideoRenderer` a message
of type `Renderer.MSG_SET_
SURFACE` with an instance of `SurfaceView` as
of type `Renderer.MSG_SET_
VIDEO_OUTPUT` with an instance of
its object.
`SurfaceView` as
its object.
Note: Although the default option uses
`ANativeWindow`
, based on our testing the
Note: Although the default option uses
`ANativeWindow`
, based on our testing the
GL rendering mode has better performance, so should be preferred.
GL rendering mode has better performance, so should be preferred.
...
...
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