mpv-examples | 📚 -
kandi X-RAY | mpv-examples Summary
kandi X-RAY | mpv-examples Summary
📚
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of mpv-examples
mpv-examples Key Features
mpv-examples Examples and Code Snippets
Community Discussions
Trending Discussions on mpv-examples
QUESTION
I am trying to use libmpv in a swift project. I have everything linked up and am trying to follow the basic example.
The problem is, that to show a video, I have to pass an integer pointer (intptr_t) to the wid command. In Objective-C this would be done as the example above hints:
...ANSWER
Answered 2019-Jul-08 at 15:01It doesn't look like you need an int pointer, at all. The mpv_set_option() API
you're trying to call actually takes a void *
. In Swift, this is bridged as UnsafeRawPointer
.
I think you can just pass in &view
directly, which should bridge to UnsafeRawPointer
automatically. However, now you have to be careful, because you have to ensure that the lifetime your VC lasts at least as long as mpv
needs it.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mpv-examples
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page