forked from jarnedemeulemeester/libmpv-android
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
186205a
commit 453ef51
Showing
17 changed files
with
174 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,32 +9,24 @@ on: | |
permissions: | ||
contents: write | ||
|
||
env: | ||
NDK_VER: 25.1.8937393 | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3.3.0 | ||
uses: actions/checkout@v4 | ||
- name: Setup Java JDK | ||
uses: actions/setup-java@v3.9.0 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 11 | ||
java-version: 17 | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
- name: Setup Flutter SDK | ||
uses: subosito/flutter-action@v1 | ||
with: | ||
channel: "stable" | ||
- name: Gradle Build Action | ||
uses: gradle/[email protected] | ||
- name: Cache | ||
uses: actions/[email protected] | ||
with: | ||
path: /usr/local/lib/android/sdk/ndk/${{ env.NDK_VER }} | ||
key: ${{ runner.os }}-${{ env.NDK_VER }} | ||
- name: Symlink SDK | ||
working-directory: ./buildscripts | ||
run: | | ||
|
@@ -55,7 +47,7 @@ jobs: | |
run: | | ||
sudo chmod +x bundle_encoders-gpl.sh | ||
./bundle_encoders-gpl.sh | ||
- uses: actions/upload-artifact@v3.1.2 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifact | ||
path: ./output/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
set -e | ||
|
||
# -------------------------------------------------- | ||
|
||
if [ ! -f "deps" ]; then | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
set -e | ||
|
||
# -------------------------------------------------- | ||
set -euxo pipefail | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
set -e | ||
|
||
# -------------------------------------------------- | ||
|
||
if [ ! -f "deps" ]; then | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
diff --git a/configure b/configure | ||
index ba5793b..b73af74 100755 | ||
--- a/configure | ||
+++ b/configure | ||
@@ -3163,6 +3163,7 @@ nvenc_deps_any="libdl LoadLibrary" | ||
aac_mf_encoder_deps="mediafoundation" | ||
ac3_mf_encoder_deps="mediafoundation" | ||
av1_cuvid_decoder_deps="cuvid CUVIDAV1PICPARAMS" | ||
+av1_mediacodec_decoder_deps="mediacodec" | ||
h263_v4l2m2m_decoder_deps="v4l2_m2m h263_v4l2_m2m" | ||
h263_v4l2m2m_encoder_deps="v4l2_m2m h263_v4l2_m2m" | ||
h264_amf_encoder_deps="amf" | ||
diff --git a/libavcodec/Makefile b/libavcodec/Makefile | ||
index 457ec58..0b95b65 100644 | ||
--- a/libavcodec/Makefile | ||
+++ b/libavcodec/Makefile | ||
@@ -241,6 +241,7 @@ OBJS-$(CONFIG_AURA_DECODER) += cyuv.o | ||
OBJS-$(CONFIG_AURA2_DECODER) += aura.o | ||
OBJS-$(CONFIG_AV1_DECODER) += av1dec.o | ||
OBJS-$(CONFIG_AV1_CUVID_DECODER) += cuviddec.o | ||
+OBJS-$(CONFIG_AV1_MEDIACODEC_DECODER) += mediacodecdec.o | ||
OBJS-$(CONFIG_AVRN_DECODER) += avrndec.o | ||
OBJS-$(CONFIG_AVRP_DECODER) += r210dec.o | ||
OBJS-$(CONFIG_AVRP_ENCODER) += r210enc.o | ||
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c | ||
index bdfc2f6..5c35444 100644 | ||
--- a/libavcodec/allcodecs.c | ||
+++ b/libavcodec/allcodecs.c | ||
@@ -815,6 +815,7 @@ extern const FFCodec ff_libaom_av1_decoder; | ||
/* hwaccel hooks only, so prefer external decoders */ | ||
extern const FFCodec ff_av1_decoder; | ||
extern const FFCodec ff_av1_cuvid_decoder; | ||
+extern const FFCodec ff_av1_mediacodec_decoder; | ||
extern const FFCodec ff_av1_qsv_decoder; | ||
extern const FFCodec ff_libopenh264_encoder; | ||
extern const FFCodec ff_libopenh264_decoder; | ||
diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c | ||
index 6b4c39b..49f118e 100644 | ||
--- a/libavcodec/mediacodecdec.c | ||
+++ b/libavcodec/mediacodecdec.c | ||
@@ -1,5 +1,5 @@ | ||
/* | ||
- * Android MediaCodec MPEG-2 / H.264 / H.265 / MPEG-4 / VP8 / VP9 decoders | ||
+ * Android MediaCodec MPEG-2 / H.264 / H.265 / MPEG-4 / VP8 / VP9 / AV1 decoders | ||
* | ||
* Copyright (c) 2015-2016 Matthieu Bouron <matthieu.bouron stupeflix.com> | ||
* | ||
@@ -287,7 +287,8 @@ done: | ||
#if CONFIG_MPEG2_MEDIACODEC_DECODER || \ | ||
CONFIG_MPEG4_MEDIACODEC_DECODER || \ | ||
CONFIG_VP8_MEDIACODEC_DECODER || \ | ||
- CONFIG_VP9_MEDIACODEC_DECODER | ||
+ CONFIG_VP9_MEDIACODEC_DECODER || \ | ||
+ CONFIG_AV1_MEDIACODEC_DECODER | ||
static int common_set_extradata(AVCodecContext *avctx, FFAMediaFormat *format) | ||
{ | ||
int ret = 0; | ||
@@ -372,6 +373,15 @@ static av_cold int mediacodec_decode_init(AVCodecContext *avctx) | ||
goto done; | ||
break; | ||
#endif | ||
+#if CONFIG_AV1_MEDIACODEC_DECODER | ||
+ case AV_CODEC_ID_AV1: | ||
+ codec_mime = "video/av01"; | ||
+ | ||
+ ret = common_set_extradata(avctx, format); | ||
+ if (ret < 0) | ||
+ goto done; | ||
+ break; | ||
+#endif | ||
default: | ||
av_assert0(0); | ||
} | ||
@@ -573,3 +583,7 @@ DECLARE_MEDIACODEC_VDEC(vp8, "VP8", AV_CODEC_ID_VP8, NULL) | ||
#if CONFIG_VP9_MEDIACODEC_DECODER | ||
DECLARE_MEDIACODEC_VDEC(vp9, "VP9", AV_CODEC_ID_VP9, NULL) | ||
#endif | ||
+ | ||
+#if CONFIG_AV1_MEDIACODEC_DECODER | ||
+DECLARE_MEDIACODEC_VDEC(av1, "AV1", AV_CODEC_ID_AV1, NULL) | ||
+#endif |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.