Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 24 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import com.android.build.api.variant.FilterConfiguration
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

val enableX86 = project.findProperty("enableX86") != "false"
val enableX86 = project.findProperty("enableX86") == "true"
val x86Abis = if (enableX86) listOf("x86", "x86_64") else emptyList()

plugins {
Expand Down Expand Up @@ -109,6 +109,7 @@ android {
viewBinding = true
buildConfig = true
resValues = true
prefab = true
}

packaging {
Expand Down Expand Up @@ -197,8 +198,11 @@ dependencies {
implementation(libs.androidx.compose.animation.graphics)
implementation(libs.mediasession)
implementation(libs.androidx.documentfile)
implementation(libs.androidx.datastore.core)
implementation(libs.androidx.datastore.preferences)
implementation(libs.bundles.coil)


implementation(platform(libs.koin.bom))
implementation(libs.bundles.koin)

Expand All @@ -212,11 +216,21 @@ dependencies {
implementation(libs.room.ktx)

implementation(libs.kotlinx.immutable.collections)
implementation(libs.kotlinx.coroutines.guava)
implementation(libs.kotlinx.serialization.json)

implementation(libs.okhttp)
implementation(libs.jsoup)
implementation(libs.androidx.media3.common)
implementation(libs.androidx.media3.datasource.okhttp)
implementation(libs.androidx.media3.effect)
implementation(libs.androidx.media3.exoplayer)
implementation(libs.androidx.media3.exoplayer.dash)
implementation(libs.androidx.media3.exoplayer.hls)
implementation(libs.androidx.media3.exoplayer.rtsp)
implementation(libs.androidx.media3.session)
implementation(libs.androidx.media3.ui)
implementation(libs.androidx.media3.ui.compose)
implementation(libs.androidx.media3.transformer)
implementation(platform(libs.sora.editor.bom))
implementation(libs.sora.editor)
Expand All @@ -226,11 +240,18 @@ dependencies {
coreLibraryDesugaring(libs.desugar.jdk.libs)

implementation(libs.truetype.parser)
implementation(libs.juniversalchardet)
implementation(libs.ass.media)
implementation(libs.fsaf)
implementation("com.bytedance:bytehook:1.1.1")


implementation(libs.mediainfo.lib)
implementation("com.llamatik:library:1.4.0")

implementation(files("libs/mpvlib.aar"))
implementation(files("libs/media3ext-release.aar"))


// Network protocol libraries
implementation(libs.smbj)
Expand All @@ -241,6 +262,8 @@ dependencies {
implementation(libs.nanohttpd)
implementation(libs.lazycolumnscrollbar)
implementation(libs.reorderable)
implementation(libs.kyant.backdrop)
implementation(libs.kyant.shapes)
}

/* ---------------- Git helpers ---------------- */
Expand Down
Binary file added app/libs/media3ext-release.aar
Binary file not shown.
18 changes: 18 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,24 @@
<data android:pathPattern=".*" />
</intent-filter>
</activity>
<activity
android:name=".exoplayer.ExoPlayerActivity"
android:configChanges="keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:exported="false"
android:launchMode="singleTask"
android:resizeableActivity="true"
android:supportsPictureInPicture="true"
android:theme="@style/Theme.mpvrx.Player" />

<service
android:name=".exoplayer.ExoPlayerService"
android:exported="true"
android:foregroundServiceType="mediaPlayback">
<intent-filter>
<action android:name="androidx.media3.session.MediaSessionService"/>
</intent-filter>
</service>

<activity android:name=".presentation.crash.CrashActivity" />

<activity
Expand Down
42 changes: 41 additions & 1 deletion app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,50 @@
cmake_minimum_required(VERSION 3.22.1)

project("ytdl_bridge")
project("adrenotools_bridge")

# YTDLP execution wrapper for SDK 29+ bypass
# This works on all architectures
add_executable(ytdl_wrapper ytdl_wrapper.c)
set_target_properties(ytdl_wrapper PROPERTIES OUTPUT_NAME "ytdl")
# Rename to libytdl.so so it gets extracted by Android
set_target_properties(ytdl_wrapper PROPERTIES PREFIX "lib" SUFFIX ".so")

# Adrenotools is only for arm64-v8a
if (CMAKE_ANDROID_ARCH_ABI STREQUAL "arm64-v8a")
include(FetchContent)

FetchContent_Declare(
adrenotools
GIT_REPOSITORY https://github.com/bylaws/libadrenotools.git
GIT_TAG master
)

FetchContent_MakeAvailable(adrenotools)

# Suppress warnings from adrenotools internal targets
set_property(TARGET adrenotools PROPERTY COMPILE_OPTIONS "-w")
set_property(TARGET hook_impl PROPERTY COMPILE_OPTIONS "-w")
set_property(TARGET main_hook PROPERTY COMPILE_OPTIONS "-w")
set_property(TARGET file_redirect_hook PROPERTY COMPILE_OPTIONS "-w")
set_property(TARGET gsl_alloc_hook PROPERTY COMPILE_OPTIONS "-w")

add_library(${CMAKE_PROJECT_NAME} SHARED
adrenotools_bridge.cpp
)

target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE
${adrenotools_SOURCE_DIR}/include
)

find_package(bytehook REQUIRED CONFIG)

target_link_libraries(${CMAKE_PROJECT_NAME}
android
log
EGL
adrenotools
bytehook::bytehook
)
else()
message(STATUS "Skipping adrenotools_bridge for non-arm64 architecture: ${CMAKE_ANDROID_ARCH_ABI}")
endif()
Loading
Loading