Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi-instance support #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TinfoilSubmarine
Copy link

@TinfoilSubmarine TinfoilSubmarine commented Oct 18, 2024

Not sure if this is desirable since it deviates from the upstream mpv-android, but figured I would put it here since I needed it and thought others might find it useful.

EDIT: should probably document what this actually does. You can now do this, whereas before you would be limited to a sort of "singleton" mode.

val mpvOne: MPVLib = MPVLib()
mpvOne.create(context)
mpvOne.setOptionString("vo", "gpu")
mpvOne.setOptionString("gpu-context", "android")
mpvOne.setOptionString("hwdec", "auto")

val mpvTwo: MPVLib = MPVLib()
mpvTwo.create(context)
mpvTwo.setOptionString("vo", "gpu")
mpvTwo.setOptionString("gpu-context", "android")
mpvTwo.setOptionString("hwdec", "no")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant