History

mac/libmpv: remove unused functions

der richter committed 2 years ago

Commit 9cee4411 parent 12782aa1 file · +0 −37Browse files

Unified · Split

osdep/mac/libmpv_helper.swift+0−37
@@ -168,43 +168,6 @@ class LibmpvHelper { · 167 unmodified lines
168168 }
169169 }
170170
171− func commandAsync(_ cmd: [String?], id: UInt64 = 1) {
172− if mpvHandle == nil { return }
173− var mCmd = cmd
174− mCmd.append(nil)
175− var cargs = mCmd.map { $0.flatMap { UnsafePointer<Int8>(strdup($0)) } }
176− mpv_command_async(mpvHandle, id, &cargs)
177− for ptr in cargs { free(UnsafeMutablePointer(mutating: ptr)) }
178− }
179−
180− // Unsafe function when called while using the render API
181− func command(_ cmd: String) {
182− if mpvHandle == nil { return }
183− mpv_command_string(mpvHandle, cmd)
184− }
185−
186− func getBoolProperty(_ name: String) -> Bool {
187− if mpvHandle == nil { return false }
188− var value = Int32()
189− mpv_get_property(mpvHandle, name, MPV_FORMAT_FLAG, &value)
190− return value > 0
191− }
192−
193− func getIntProperty(_ name: String) -> Int {
194− if mpvHandle == nil { return 0 }
195− var value = Int64()
196− mpv_get_property(mpvHandle, name, MPV_FORMAT_INT64, &value)
197− return Int(value)
198− }
199−
200− func getStringProperty(_ name: String) -> String? {
201− guard let mpv = mpvHandle else { return nil }
202− guard let value = mpv_get_property_string(mpv, name) else { return nil }
203− let str = String(cString: value)
204− mpv_free(value)
205− return str
206− }
207−
208171 func deinitRender() {
209172 mpv_render_context_set_update_callback(mpvRenderContext, nil, nil)
210173 mp_render_context_set_control_callback(mpvRenderContext, nil, nil)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t