summaryrefslogtreecommitdiff
path: root/mpv.py
diff options
context:
space:
mode:
authorDepFA <35278260+dfaker@users.noreply.github.com>2022-04-20 13:55:22 +0100
committerGitHub <noreply@github.com>2022-04-20 13:55:22 +0100
commit87559cde89e0b6aff2bab80298552397f3f4bfbb (patch)
treed421cc21290c48aea1a9dd6422f53e39b3cd0435 /mpv.py
parent9fbe39d3b4acb4679b2ff32e71291ea5c73f3eb5 (diff)
downloadpython-mpv-87559cde89e0b6aff2bab80298552397f3f4bfbb.tar.gz
python-mpv-87559cde89e0b6aff2bab80298552397f3f4bfbb.tar.bz2
python-mpv-87559cde89e0b6aff2bab80298552397f3f4bfbb.zip
Remove dropped mpv-2 api methods.
Diffstat (limited to 'mpv.py')
-rw-r--r--mpv.py22
1 files changed, 3 insertions, 19 deletions
diff --git a/mpv.py b/mpv.py
index 5392d44..83a4150 100644
--- a/mpv.py
+++ b/mpv.py
@@ -29,12 +29,12 @@ import re
import traceback
if os.name == 'nt':
- dll = ctypes.util.find_library('mpv-1.dll')
+ dll = ctypes.util.find_library('mpv-2.dll')
if dll is None:
- raise OSError('Cannot find mpv-1.dll in your system %PATH%. One way to deal with this is to ship mpv-1.dll '
+ raise OSError('Cannot find mpv-2.dll in your system %PATH%. One way to deal with this is to ship mpv-2.dll '
'with your script and put the directory your script is in into %PATH% before "import mpv": '
'os.environ["PATH"] = os.path.dirname(__file__) + os.pathsep + os.environ["PATH"] '
- 'If mpv-1.dll is located elsewhere, you can add that path to os.environ["PATH"].')
+ 'If mpv-2.dll is located elsewhere, you can add that path to os.environ["PATH"].')
backend = CDLL(dll)
fs_enc = 'utf-8'
else:
@@ -495,9 +495,6 @@ WakeupCallback = CFUNCTYPE(None, c_void_p)
RenderUpdateFn = CFUNCTYPE(None, c_void_p)
-OpenGlCbUpdateFn = CFUNCTYPE(None, c_void_p)
-OpenGlCbGetProcAddrFn = CFUNCTYPE(c_void_p, c_void_p, c_char_p)
-
def _handle_func(name, args, restype, errcheck, ctx=MpvHandle, deprecated=False):
func = getattr(backend, name)
func.argtypes = [ctx] + args if ctx else args
@@ -598,19 +595,6 @@ _handle_func('mpv_render_context_render', [POINTER(MpvRenderParam)
_handle_func('mpv_render_context_report_swap', [], None, errcheck=None, ctx=MpvRenderCtxHandle)
_handle_func('mpv_render_context_free', [], None, errcheck=None, ctx=MpvRenderCtxHandle)
-
-# Deprecated in v0.29.0 and may disappear eventually
-if hasattr(backend, 'mpv_get_sub_api'):
- _handle_func('mpv_get_sub_api', [MpvSubApi], c_void_p, notnull_errcheck, deprecated=True)
-
- _handle_gl_func('mpv_opengl_cb_set_update_callback', [OpenGlCbUpdateFn, c_void_p], deprecated=True)
- _handle_gl_func('mpv_opengl_cb_init_gl', [c_char_p, OpenGlCbGetProcAddrFn, c_void_p], c_int, deprecated=True)
- _handle_gl_func('mpv_opengl_cb_draw', [c_int, c_int, c_int], c_int, deprecated=True)
- _handle_gl_func('mpv_opengl_cb_render', [c_int, c_int], c_int, deprecated=True)
- _handle_gl_func('mpv_opengl_cb_report_flip', [c_ulonglong], c_int, deprecated=True)
- _handle_gl_func('mpv_opengl_cb_uninit_gl', [], c_int, deprecated=True)
-
-
def _mpv_coax_proptype(value, proptype=str):
"""Intelligently coax the given python value into something that can be understood as a proptype property."""
if type(value) is bytes: