Skip to content

Commit 8ec4b58

Browse files
committed
add more lib
1 parent 5dbb7ae commit 8ec4b58

File tree

6 files changed

+139
-2
lines changed

6 files changed

+139
-2
lines changed

.github/scripts/build-av1.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ git clone --depth=1 https://chromium.googlesource.com/codecs/libgav1
2020
cd "${AV1_MODULE_PATH}/jni/libgav1" && \
2121
git clone https://github.com/abseil/abseil-cpp.git third_party/abseil-cpp
2222

23-
cat "${GD_PATH}"
2423

24+
## Enable publishing
2525
echo "
2626
android {
2727
namespace 'androidx.media3.decoder.av1'
@@ -39,4 +39,3 @@ ext {
3939
apply from: '../../publish.gradle'
4040
">>"${GD_PATH}"
4141

42-
cat "${GD_PATH}"

.github/scripts/build-flac.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
echo "Build Flac"
4+
5+
FLAC_MODULE_PATH="${MEDIA3_PATH}/libraries/decoder_flac/src/main"
6+
GD_PATH="${MEDIA3_PATH}/libraries/decoder_flac/build.gradle"
7+
8+
9+
## Fetch libflac
10+
11+
cd "${FLAC_MODULE_PATH}/jni"
12+
13+
git clone --depth=1 https://github.com/xiph/flac.git libflac
14+
15+
16+
17+
## Enable publishing
18+
19+
echo "
20+
android {
21+
namespace 'androidx.media3.decoder.flac'
22+
23+
publishing {
24+
singleVariant('release') {
25+
withSourcesJar()
26+
}
27+
}
28+
}
29+
ext {
30+
releaseArtifactId = 'media3-decode-flac'
31+
releaseName = 'Media3 flac module'
32+
}
33+
apply from: '../../publish.gradle'
34+
">>"${GD_PATH}"

.github/scripts/build-iamf.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
echo "Build IAMF"
4+
5+
IAMF_MODULE_PATH="${MEDIA3_PATH}/libraries/decoder_iamf/src/main"
6+
GD_PATH="${MEDIA3_PATH}/libraries/decoder_iamf/build.gradle"
7+
8+
## Fetch libiamf
9+
cd "${IAMF_MODULE_PATH}/jni"
10+
git clone --depth=1 https://github.com/AOMediaCodec/libiamf.git libiamf
11+
12+
13+
14+
## Enable publishing
15+
16+
echo "
17+
android {
18+
namespace 'androidx.media3.decoder.iamf'
19+
20+
publishing {
21+
singleVariant('release') {
22+
withSourcesJar()
23+
}
24+
}
25+
}
26+
ext {
27+
releaseArtifactId = 'media3-decode-iamf'
28+
releaseName = 'Media3 iamf module'
29+
}
30+
apply from: '../../publish.gradle'
31+
">>"${GD_PATH}"

.github/scripts/build-opus.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
echo "Build Opus"
4+
5+
OPUS_MODULE_PATH="${MEDIA3_PATH}/libraries/decoder_opus/src/main"
6+
GD_PATH="${MEDIA3_PATH}/libraries/decoder_opus/build.gradle"
7+
8+
9+
#Fetch libopus:
10+
11+
cd "${OPUS_MODULE_PATH}/jni"
12+
git clone --depth=1 https://gitlab.xiph.org/xiph/opus.git libopus
13+
14+
## Enable publishing
15+
echo "
16+
android {
17+
namespace 'androidx.media3.decoder.opus'
18+
19+
publishing {
20+
singleVariant('release') {
21+
withSourcesJar()
22+
}
23+
}
24+
}
25+
ext {
26+
releaseArtifactId = 'media3-decode-opus'
27+
releaseName = 'Media3 opus module'
28+
}
29+
apply from: '../../publish.gradle'
30+
">>"${GD_PATH}"

.github/scripts/build-vp9.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
echo "Build Vp9"
4+
5+
VP9_MODULE_PATH="${MEDIA3_PATH}/libraries/decoder_vp9/src/main"
6+
GD_PATH="${MEDIA3_PATH}/libraries/decoder_vp9/build.gradle"
7+
8+
9+
cd "${VP9_MODULE_PATH}/jni"
10+
11+
git clone --depth=1 -b v1.8.0 https://chromium.googlesource.com/webm/libvpx libvpx
12+
13+
chmod +x ./generate_libvpx_android_configs.sh
14+
./generate_libvpx_android_configs.sh
15+
16+
${NDK_PATH}/ndk-build APP_ABI=all -j4
17+
18+
19+
## Enable publishing
20+
echo "
21+
android {
22+
namespace 'androidx.media3.decoder.vp9'
23+
24+
publishing {
25+
singleVariant('release') {
26+
withSourcesJar()
27+
}
28+
}
29+
}
30+
ext {
31+
releaseArtifactId = 'media3-decode-vp9'
32+
releaseName = 'Media3 vp9 module'
33+
}
34+
apply from: '../../publish.gradle'
35+
">>"${GD_PATH}"

.github/scripts/build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,21 @@ echo $NDK_PATH
66

77
chmod +x ${ROOT_DIR}/.github/scripts/build-ffmpeg.sh
88
chmod +x ${ROOT_DIR}/.github/scripts/build-av1.sh
9+
chmod +x ${ROOT_DIR}/.github/scripts/build-flac.sh
10+
chmod +x ${ROOT_DIR}/.github/scripts/build-opus.sh
11+
chmod +x ${ROOT_DIR}/.github/scripts/build-vp9.sh
12+
chmod +x ${ROOT_DIR}/.github/scripts/build-iamf.sh
913

1014
cd media
1115
export MEDIA3_PATH="$(pwd)"
1216

1317

1418
${ROOT_DIR}/.github/scripts/build-ffmpeg.sh
1519
${ROOT_DIR}/.github/scripts/build-av1.sh
20+
${ROOT_DIR}/.github/scripts/build-flac.sh
21+
${ROOT_DIR}/.github/scripts/build-opus.sh
22+
${ROOT_DIR}/.github/scripts/build-vp9.sh
23+
${ROOT_DIR}/.github/scripts/build-iamf.sh
1624
cd ${MEDIA3_PATH}
1725
./gradlew publishToMavenLocal
1826

0 commit comments

Comments
 (0)