diff --git a/app/config/libraries/lib_dav1d.json b/app/config/libraries/lib_dav1d.json new file mode 100644 index 00000000..fb379e42 --- /dev/null +++ b/app/config/libraries/lib_dav1d.json @@ -0,0 +1,11 @@ +{ + "uniqueId": "com.github.videolan.dav1d", + "developers": [], + "artifactVersion": "master", + "description": "dav1d is an AV1 cross-platform decoder, open-source, and focused on speed and correctness", + "name": "dav1d", + "licenses": [ + "dav1d" + ], + "website": "https://github.com/videolan/dav1d" +} diff --git a/app/config/libraries/lib_fribidi.json b/app/config/libraries/lib_fribidi.json new file mode 100644 index 00000000..55a7cbb2 --- /dev/null +++ b/app/config/libraries/lib_fribidi.json @@ -0,0 +1,11 @@ +{ + "uniqueId": "com.github.fribidi.fribidi", + "developers": [], + "artifactVersion": "1.0.16", + "description": "The Free Implementation of the Unicode Bidirectional Algorithm", + "name": "fribidi", + "licenses": [ + "lgpl-2.1" + ], + "website": "https://github.com/fribidi/fribidi" +} diff --git a/app/config/libraries/lib_libass.json b/app/config/libraries/lib_libass.json new file mode 100644 index 00000000..14fbc8be --- /dev/null +++ b/app/config/libraries/lib_libass.json @@ -0,0 +1,11 @@ +{ + "uniqueId": "com.github.libass.libass", + "developers": [], + "artifactVersion": "master", + "description": "libass is a portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format", + "name": "libass", + "licenses": [ + "libass" + ], + "website": "https://github.com/libass/libass" +} diff --git a/app/config/libraries/lib_libplacebo.json b/app/config/libraries/lib_libplacebo.json new file mode 100644 index 00000000..e02a31a4 --- /dev/null +++ b/app/config/libraries/lib_libplacebo.json @@ -0,0 +1,11 @@ +{ + "uniqueId": "com.github.haasn.libplacebo", + "developers": [], + "artifactVersion": "master", + "description": "libplacebo is, in a nutshell, the core rendering algorithms and ideas of mpv rewritten as an independent library", + "name": "libplacebo", + "licenses": [ + "lgpl-2.1" + ], + "website": "https://github.com/haasn/libplacebo" +} diff --git a/app/config/libraries/lib_libunibreak.json b/app/config/libraries/lib_libunibreak.json new file mode 100644 index 00000000..f8feaac1 --- /dev/null +++ b/app/config/libraries/lib_libunibreak.json @@ -0,0 +1,11 @@ +{ + "uniqueId": "com.github.adah1972.libunibreak", + "developers": [], + "artifactVersion": "6.1", + "description": "an implementation of the line breaking and word/grapheme breaking algorithms as described in Unicode Standard Annex 14 (UAX #14) and Unicode Standard Annex 29 (UAX #29)", + "name": "libunibreak", + "licenses": [ + "libunibreak" + ], + "website": "https://github.com/adah1972/libunibreak" +} diff --git a/app/config/libraries/lib_mbedtls.json b/app/config/libraries/lib_mbedtls.json new file mode 100644 index 00000000..1b1de2e0 --- /dev/null +++ b/app/config/libraries/lib_mbedtls.json @@ -0,0 +1,11 @@ +{ + "uniqueId": "com.github.Mbed-TLS.mbedtls", + "developers": [], + "artifactVersion": "v3.6.4", + "description": "Mbed TLS is a C library that implements X.509 certificate manipulation and the TLS and DTLS protocols", + "name": "mbedtls", + "licenses": [ + "gpl-2.0" + ], + "website": "https://github.com/Mbed-TLS/mbedtls" +} diff --git a/app/config/libraries/lib_mpv.json b/app/config/libraries/lib_mpv.json new file mode 100644 index 00000000..d80a4c65 --- /dev/null +++ b/app/config/libraries/lib_mpv.json @@ -0,0 +1,11 @@ +{ + "uniqueId": "com.github.mpv-player.mpv", + "developers": [], + "artifactVersion": "master", + "description": "mpv is a free (as in freedom) media player for the command line", + "name": "mpv", + "licenses": [ + "gpl-2.0" + ], + "website": "https://github.com/mpv-player/mpv" +} diff --git a/app/config/libraries/lin_freetype.json b/app/config/libraries/lin_freetype.json new file mode 100644 index 00000000..85864ae9 --- /dev/null +++ b/app/config/libraries/lin_freetype.json @@ -0,0 +1,11 @@ +{ + "uniqueId": "org.freetype", + "developers": [], + "artifactVersion": "2.14.1", + "description": "FreeType is a freely available software library to render fonts", + "name": "freetype", + "licenses": [ + "gpl-2.0" + ], + "website": "https://freetype.org" +} diff --git a/app/config/licenses/lic_dav1d.json b/app/config/licenses/lic_dav1d.json new file mode 100644 index 00000000..f40786a4 --- /dev/null +++ b/app/config/licenses/lic_dav1d.json @@ -0,0 +1,28 @@ +{ + "content": "Copyright © 2018-2025, VideoLAN and dav1d authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", + "hash": "dav1d", + "url": "https://github.com/videolan/dav1d?tab=BSD-2-Clause-1-ov-file", + "name": "BSD-2-Clause" +} diff --git a/app/config/licenses/lic_libass.json b/app/config/licenses/lic_libass.json new file mode 100644 index 00000000..510f969e --- /dev/null +++ b/app/config/licenses/lic_libass.json @@ -0,0 +1,20 @@ +{ + "content": "ISC License + +Copyright (C) 2006-2016 libass contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.", + "hash": "libass", + "url": "https://github.com/libass/libass?tab=ISC-1-ov-file", + "name": "ISC" +} diff --git a/app/config/licenses/lic_libunibreak.json b/app/config/licenses/lic_libunibreak.json new file mode 100644 index 00000000..0ea412c4 --- /dev/null +++ b/app/config/licenses/lic_libunibreak.json @@ -0,0 +1,26 @@ +{ + "content": "Copyright (C) Wu Yongwei +Copyright (C) Tom Hacohen +Copyright (C) Petr Filipsky +Copyright (C) Andreas Röver + +This software is provided 'as-is', without any express or implied +warranty. In no event will the author be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgement in the product documentation would + be appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not + be misrepresented as being the original software. +3. This notice may not be removed or altered from any source + distribution.", + "hash": "libunibreak", + "url": "https://github.com/adah1972/libunibreak?tab=Zlib-1-ov-file", + "name": "Zlib" +} diff --git a/scripts/mpv/README.md b/scripts/mpv/README.md index a8482964..80eeb407 100644 --- a/scripts/mpv/README.md +++ b/scripts/mpv/README.md @@ -1,82 +1,7 @@ -# Building +# MPV build scripts -Compiling the native parts is a process separate from Gradle and the app won't work if you skip this. +This scripts are adapted from https://github.com/mpv-android/mpv-android/tree/ae0d956c5a98ab8bf25af7e2c73bcb59e19c15b7/buildscripts licensed MIT. -This process is supported on Linux and macOS. Windows (or WSL) will **not** work. +## Instructions -## Download dependencies - -`download.sh` will take care of installing the Android SDK, NDK and downloading the sources. - -If you're running on Debian/Ubuntu or RHEL/Fedora it will also install the necessary dependencies for you. - -```sh -./download.sh -``` - -If you already have the Android SDK installed you can symlink `android-sdk-linux` to your SDK root -before running the script and the necessary SDK packages will still be installed. - -A matching NDK version (inside the SDK) will be picked up automatically or downloaded and installed otherwise. - -## Build - -```sh -./buildall.sh -``` - -Run `buildall.sh` with `--clean` to clean the build directories before building. -For a guaranteed clean build also run `rm -rf prefix` beforehand. - -By default this will build only for 32-bit ARM (`armv7l`). -You probably want to build for AArch64 too, and perhaps Intel x86. - -To do this run one (or more) of these commands **before** ./buildall.sh: -```sh -./buildall.sh --arch arm64 mpv -./buildall.sh --arch x86 mpv -./buildall.sh --arch x86_64 mpv -``` - -# Developing - -## Getting logs - -```sh -adb logcat # get all logs, useful when drivers/vendor libs output to logcat -adb logcat -s mpv # get only mpv logs -``` - -## Rebuilding a single component - -If you've made changes to a single component (e.g. ffmpeg or mpv) and want a new build you can of course just run ./buildall.sh but it's also possible to just build a single component like this: - -```sh -./buildall.sh -n ffmpeg -# optional: add --clean to build from a clean state -``` - -Note that you might need to rebuild for other architectures (`--arch`) too depending on your device. - -Afterwards, build mpv-android and install the apk: - -```sh -./buildall.sh -n -adb install -r ../app/build/outputs/apk/default/debug/app-default-universal-debug.apk -``` - -## Using Android Studio - -You can use Android Studio to develop the Java part of the codebase. Before using it, make sure to build the project at least once by following the steps in the **Build** section. - -You should point Android Studio to existing SDK installation at `mpv-android/buildscripts/sdk/android-sdk-linux`. -Then click "Open an existing Android Studio project" and select `mpv-android`. - -Note that if you build from Android Studio only the Java/Kotlin part will be built. -If you make any changes to libraries (ffmpeg, mpv, ...) or mpv-android native code (`app/src/main/jni/*`), first rebuild native code with: - -```sh -./buildall.sh -n -``` - -then build the project from Android Studio. +TODO