mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-11-06 10:50:58 +01:00
Update wholphin-extensions with newer MpvPlayer (#1365)
## Description Uses the newer version of `wholphin-extensions` which now has the Kotlin code, so this PR removes the MPV Kotlin code from this repo. Also updates gradle to use providers. There are no user facing changes ### Dev notes `wholphin-mpv` can be provided by: 1. [Fetching pre-built binaries](https://github.com/damontecres/wholphin-extensions#pre-built-binaries) (Preferred method for devs) 2. Building `wholphin-extensions` from [source](https://github.com/damontecres/wholphin-extensions#build-from-source) 3. Using `wholphin-mpv-stub` (the new module added in this PR) which allows for compiling Wholphin, but will throw exceptions if MPV is used during runtime ### Related issues Related to #1172 ### Testing Emulator ## Screenshots N/A ## AI or LLM usage None
This commit is contained in:
parent
f5ce9745ba
commit
a8ade9171e
24 changed files with 177 additions and 1652 deletions
|
|
@ -0,0 +1,26 @@
|
|||
package com.github.damontecres.wholphin.mpv
|
||||
|
||||
/**
|
||||
* Stubs out MPVLib in wholphin-mpv
|
||||
*/
|
||||
object MPVLib {
|
||||
fun setPropertyString(
|
||||
key: String,
|
||||
value: String,
|
||||
): Unit = throw MpvStubException()
|
||||
|
||||
fun setPropertyInt(
|
||||
key: String,
|
||||
value: Int,
|
||||
): Unit = throw MpvStubException()
|
||||
|
||||
fun setPropertyDouble(
|
||||
key: String,
|
||||
value: Double,
|
||||
): Unit = throw MpvStubException()
|
||||
|
||||
fun setPropertyBoolean(
|
||||
key: String,
|
||||
value: Boolean,
|
||||
): Unit = throw MpvStubException()
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.github.damontecres.wholphin.mpv
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Looper
|
||||
import androidx.annotation.OptIn
|
||||
import androidx.media3.common.SimpleBasePlayer
|
||||
import androidx.media3.common.util.UnstableApi
|
||||
import kotlin.time.Duration
|
||||
|
||||
/**
|
||||
* Stubs out MpvPlayer in wholphin-mpv
|
||||
*/
|
||||
@OptIn(UnstableApi::class)
|
||||
class MpvPlayer(
|
||||
private val context: Context,
|
||||
private val enableHardwareDecoding: Boolean,
|
||||
private val useGpuNext: Boolean,
|
||||
) : SimpleBasePlayer(Looper.getMainLooper()) {
|
||||
override fun getState(): State = throw MpvStubException()
|
||||
|
||||
var subtitleDelay: Duration = throw MpvStubException()
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.github.damontecres.wholphin.mpv
|
||||
|
||||
class MpvStubException : Exception("This build is using wholphin-mpv-stub which does not implement actual functionality")
|
||||
Loading…
Add table
Add a link
Reference in a new issue