mac/type: add Int64 type conversion helper

This commit is contained in:
der richter authored and sfan5 committed 2025-12-22 10:19:29 +01:00
1 parent d0e24ab17a
commit bf9ddf1db2
1 file changed
+5
+5
View File
@@ -78,6 +78,11 @@ class TypeHelper {
return UnsafePointer<Double>(OpaquePointer(obj))?.pointee
}
// MPV_FORMAT_INT64
class func toInt(_ obj: UnsafeMutableRawPointer) -> Int64? {
return UnsafePointer<Int64>(OpaquePointer(obj))?.pointee
}
// MPV_FORMAT_NODE
class func toNode(_ obj: UnsafeMutableRawPointer) -> mpv_node? {
return UnsafePointer<mpv_node>(OpaquePointer(obj))?.pointee